我是R的新手,我正在尝试找到一种方法,允许我使用遥测数据估算发射机信号的位置。但是对于每个信号我只有两个轴承。我尝试在R中使用sigloc包。我可以轻松地计算与此包的交集,但是当我尝试计算位置时,我收到一条错误消息(见下文)。当我人为地创建具有三个轴承的数据集时,我可以轻松地计算位置。这是否意味着我只能使用两个带有sigloc的轴承来计算位置?如果是这样,还有另一个包/方法可以让我这样做吗?以下是使用sigloc的数据和脚本的子集:
Date<- c(08/02/2017,08/02/2017,08/02/2017,08/02/2017,08/02/2017,08/02/2017)
Time<- c(0.8013888889,0.8013888889,0.8027777778,0.8027777778,0.8708333333,0.8708333333)
Easting<-c(623235,623240,623220,623214,623701,623842)
Northing<-c(838644,838653,838627,838678,839005,838954)
Azimuth<-c(240,268,260,312,231,122)
GID<-c(1,1,2,2,3,3)
df<-data.frame(Date,Time,Easting,Northing,Azimuth,GID)
library(sigloc)
bats<-as.receiver(df)
plot(bats,bearings=TRUE,xlab="Easting",ylab="Northing")
intersectBats<-findintersects(bats)
intersectBats
GID X Y
1 1 623251.3 838653.4
2 1 NA NA
3 1 623251.3 838653.4
4 1 NA NA
5 1 NA NA
6 1 NA NA
7 2 623262.3 838634.5
8 2 NA NA
9 2 623262.3 838634.5
10 2 NA NA
11 2 NA NA
12 2 NA NA
13 3 623726.9 839025.9
14 3 NA NA
15 3 623726.9 839025.9
16 3 NA NA
17 3 NA NA
18 3 NA NA
plot(intersectBats,xlab="Easting",ylab="Northing")
loc<-locate(bats)
Error in nleqslv(c(start_point_x, start_point_y), solver) :
'x' contains a non-finite value at index=1