Description Usage Arguments Details Value Author(s) References Examples
View source: R/CalcLongitude.R
Calculate the longitude of a destination given initial latitude and longitude, distance traveled, bearing and final latitude.
1 | CalcLongitude(initialLat, destinationLat, initialLong, distance, bearing)
|
initialLat |
initial Latitude |
destinationLat |
final Latitude |
initialLong |
initial Longitude |
distance |
distance from initial to final in meters |
bearing |
bearing from point of departure to final destination |
Calculates a destination's longitude given initial latitude and longitude in degrees (e.g.162.546, Longitude values west
of the prime meridian are 0 to -180. Latitude values south of the equator are 0 to -90), destination latitude in
RADIANS (result of CalcLatitude
function), distance traveled in meters and bearing in radians. This function is
primarily used internally in the GPStable
and GeoReference
functions.
Longitude of final destination in radians.
Brian Battaile
https://www.movable-type.co.uk/scripts/latlong.html
1 2 3 4 5 6 7 8 9 10 | #Longitude of Los Angeles starting in Manhattan
Long <- CalcLongitude(40.7697,0.5943228,-73.9735,3938000,-1.507516)
#transform to degrees
Long*360/(2*pi)
##Use results of CalcLatitude
Lat<-CalcLatitude (40.7697,3938000,-1.507516)
Long <- CalcLongitude(40.7697,Lat,-73.9735,3938000,-1.507516)
#transform to degrees
Long*360/(2*pi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.