Expand description
Velocity made good and laylines.
Structs§
- Tack
Legs - How far to sail on each tack to fetch a mark dead to windward.
Constants§
- LAYLINE_
LENGTH_ FACTOR - How far past the mark a layline ray reaches from
layline_rays, as a multiple of the vessel’s own current distance to the mark – long enough that the ray always extends past wherever the vessel actually is on the chart, short enough that it does not dominate a zoomed-in view. A fixed on-screen length cannot do this: it would either vanish at ocean scale or blot out a marina at pier scale.pubso every client draws the same length rather than picking its own. - TACK_
RAY_ LENGTH_ NM - How far a tack ray reaches from the vessel in
tack_rays.
Functions§
- close_
hauled_ headings_ deg - The two close-hauled headings for a given wind, degrees true.
- layline_
rays - The two laylines through
mark, as ray endpoints frommarkitself –(mark, starboard_end, port_end)– orNonewhenmarkdoes not need a beat at all. - tack_
legs - Splits the distance to an upwind mark into one leg on each tack.
- tack_
rays - The vessel’s own two close-hauled headings right now, as ray endpoints
from
vesselitself –(starboard_end, port_end). - vmg_
to_ waypoint_ kn - Speed made good directly towards a waypoint, knots.
- vmg_
to_ wind_ kn - Speed made good directly to windward, knots.