next_lat_long | R Documentation |
Given a current location (latitude and longitude), speed, direction (in radians), and time elapsed (in seconds), this function calculates the next latitude and longitude. The calculations are based on the assumption of a constant speed and direction during the elapsed time.
next_lat_long(latitude, longitude, speed, direction, dt)
latitude |
The current latitude in decimal degrees. |
longitude |
The current longitude in decimal degrees. |
speed |
The speed in kilometers per hour. |
direction |
The direction of movement in radians from due north (0 radians). |
dt |
The elapsed time in seconds. |
A numeric vector of length 2 containing the next latitude and longitude in decimal degrees.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.