GPStable {TrackReconstruction} | R Documentation |
Takes DateTime, Latitude and Longitude in decimal degrees and converts Latitude and Longitude into radians and calculates bearing and distance between consecutive locations
GPStable(rawdata)
rawdata |
data frame with DateTime, or Date and Time separately, in same format as deadreckoning data, Latitude and Longitude in decimal degrees. Must use those column labels. |
Data must be provided in decimal 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. DateTime must be in the same format as output of DeadReckoning
function or separated as Date and Time that can be pasted together to create the same format as output of the Deadreckoning
function. Distance is calculated using the Spherical Law of Cosines (see references).
Returns a data frame with columns DateTime, Latitude(Decimal Degrees), Longitude(Decimal Degrees), LatRad(Radians), LongRad(Radians), BearingRad, BearingDeg, DistanceKm. BearingRad and BearingDeg are the bearing calculated from point x to point x+1. DistanceKm is the distance between point x and point x-1.
Brian Battaile
https://www.movable-type.co.uk/scripts/latlong.html
data(gpsdata02)
head(gpsdata02)
gpsformat<-GPStable(gpsdata02)
head(gpsformat)