calculate_course: Course of the vessel

View source: R/calculate_course.R

calculate_courseR Documentation

Course of the vessel

Description

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.

Usage

calculate_course(x, y)

Arguments

x

longitude in decimal degrees

y

latitude in decimal degrees


PabloMBooster/vmsR documentation built on June 29, 2023, 11:16 a.m.