Description Usage Arguments Value Examples
Calculates the destination coordinates from a starting point, initial bearing and distance travelling along a (shortest distance) great circle arc
1 | dtDestination(latFrom, lonFrom, distance, bearing)
|
latFrom |
latitude from (in degrees) |
lonFrom |
longitude from (in degrees) |
distance |
distance in metres |
bearing |
from north (in degrees) |
list of latitude and longitude coordinates at the destination
1 2 3 4 5 6 7 8 9 10 11 | dtDestination(0, 0, earthsRadius(), 90)
n <- 10
set.seed(20170511)
lats <- -90:90
lons <- -180:180
b <- 0:360
dt <- data.table::data.table(lat = sample(lats, size = n, replace = T),
lon = sample(lons, size = n, replace = T),
bearing = sample(b, size = n, replace = T))
dt[, c("destinationLat", "destinationLon") := dtDestination(lat, lon, 90)]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.