This function converts a speed vector represented in complex number into a bearing angle (0°=N ; 90°=E...). This conversion is needed because trigonometric angles are different than bearing.
Usage
speed2bearing(
speed,
speed_ref = complex(real = 0, imaginary = 1),
positive = TRUE
)Examples
speed2bearing(complex(real = 10, imaginary = 5))
#> [1] 63.43495
