Skip to main content

track_error

Function track_error 

Source
pub fn track_error(
    from: Position,
    to: Position,
    vessel: Position,
) -> Option<TrackError>
Expand description

Cross-track and along-track distance of vessel relative to the great circle leg from from to to.

Returns None when the leg has no direction to be off – from and to are the same position, so “left or right of it” is meaningless. Callers should treat that as “waypoint reached”, not as an error.