View source: R/calculate_course.R
calculate_course | R Documentation |
calculate_course
internally uses the atan2
function to calculate the vessel's course (angle), then the %% operator is used to standardize the angle to 360 degrees. Then, the obtained angle is multiplied by 180/pi to convert the response in radians (the default output of atan2) to degrees.
The angle obtained is based on the standard trigonometric form where "East" = 0 degrees. So, it is necessary to scale the obtained angle to the navigation scale where "North" = 0. This is obtained by subtracting our obtained angle with the 90 degrees angle.
calculate_course(x, y)
x |
longitude in decimal degrees |
y |
latitude in decimal degrees |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.