Description Usage Arguments Details Value Author(s) References Examples
Takes DateTime, Latitude and Longitude in decimal degrees and converts Latitude and Longitude into radians and calculates bearing and distance between consecutive locations
1 |
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
1 2 3 4 |
Loading required package: fields
Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.5-1 (2019-12-12) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: ‘spam’
The following objects are masked from ‘package:base’:
backsolve, forwardsolve
See https://github.com/NCAR/Fields for
an extensive vignette, other supplements and source code
Loading required package: RColorBrewer
DateTime Latitude Longitude
1 21-Jul-2009 09:30:00 53.93111 -168.0349
2 22-Jul-2009 01:23:39 53.93306 -168.0346
3 22-Jul-2009 01:45:09 53.94334 -168.0436
4 22-Jul-2009 02:07:13 53.94441 -168.0607
5 22-Jul-2009 02:36:46 53.94956 -168.1028
6 22-Jul-2009 02:56:31 53.94757 -168.1132
DateTime Latitude Longitude LatRad LongRad BearingRad
1 21-Jul-2009 09:30:00 53.93111 -168.0349 0.9412755 -2.932762 0.09180597
2 22-Jul-2009 01:23:39 53.93306 -168.0346 0.9413094 -2.932757 -0.47828271
3 22-Jul-2009 01:45:09 53.94334 -168.0436 0.9414889 -2.932915 -1.46424471
4 22-Jul-2009 02:07:13 53.94441 -168.0607 0.9415076 -2.933213 -1.36558342
5 22-Jul-2009 02:36:46 53.94956 -168.1028 0.9415975 -2.933948 -1.88773642
6 22-Jul-2009 02:56:31 53.94757 -168.1132 0.9415627 -2.934128 -1.47080487
BearingDeg DistanceKm
1 5.260095 0.0000000
2 332.596419 0.2170772
3 276.104958 1.2876086
4 281.757833 1.1241930
5 251.840670 2.8147816
6 275.729088 0.7123356
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.