Compute the wind support (or wind profit) from groundspeed and windspeed.
All speed vectors are expressed as complex value where the real part corresponds to the east-west
component and imaginary part to the north-south component. You can use abs()
(or Mod()
) to
compute the norm (or absolute value) of the speed vector and speed_to_bearing()
to compute the
bearing/orientation of the speed vector. The latter simply compute the trigonometric angle of the
speed vector with Arg()
and convert this angle to a bearing (North = 0° instead of 90°).
Alternatively, if drift = TRUE
, the function return the drift instead of wind support.