R/CalcDistance.R

Defines functions CalcDistance

Documented in CalcDistance

CalcDistance <-
function(initialLat, initialLong, finalLat, finalLong)
{
	initialLat<-initialLat/360*2*pi
	initialLong<-initialLong/360*2*pi
	finalLat<-finalLat/360*2*pi
	finalLong<-finalLong/360*2*pi
	acos(sin(initialLat)*sin(finalLat)+cos(initialLat)*cos(finalLat)*cos(finalLong-initialLong))*6371
}

Try the TrackReconstruction package in your browser

Any scripts or data that you put into this service are public.

TrackReconstruction documentation built on July 16, 2019, 1:02 a.m.