Displaying 1 result from an estimated 1 matches for "delta_lon".
Did you mean:
delta_ln
2012 Apr 08
0
multithreaded low level functions
...computer
running R. I have a distance function like this:
distance <- function(pointX, pointY, vecX, vecY)
{
#convert everything to radians
pointX = pointX * pi/180
pointY = pointY * pi/180
vecX = vecX * pi/180
vecY = vecY * pi/180
#data@coords[,2] = lat
#data@coords[,1] = lon
delta_lon = pointX - vecX
#print(sprintf("Len Pt X: %d Len Pt Y: %d",
length(pointX),length(pointY)))
#print(sprintf("Len Vec X: %d Len Vec Y: %d", length(vecX),length(vecY)))
#print(sprintf("Len delta_lon: %d", length(delta_lon)))
R = 6372.8 #Radius of the earth (km)...