R/CalcLongitude.R

Defines functions CalcLongitude

Documented in CalcLongitude

CalcLongitude <-
function(initialLat, destinationLat, initialLong, distance, bearing) #distance in meters
{
	er<-6371000# earths radius in meters
	initialLat<-initialLat/360*2*pi
	initialLong<-initialLong/360*2*pi
	initialLong + atan2(sin(bearing)*sin(distance/er)*cos(initialLat),cos(distance/er)-sin(initialLat)*sin(destinationLat)) #Longitude Rad
}

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.