Class RouteTrack
- Namespace
- EncDotNet.S100.Navigation
- Assembly
- EncDotNet.S100.Navigation.dll
The track of a PassagePlan, built once per check and shared by every check: each leg's distances and corridor half-widths, and the position at a distance from departure.
public sealed class RouteTrack
- Inheritance
-
RouteTrack
- Inherited Members
Remarks
Distances run along each leg's own geometry (rhumb line or great circle), as PassageSchedule measures them.
Properties
Legs
The legs in route order.
public IReadOnlyList<RouteTrackLeg> Legs { get; }
Property Value
LengthMeters
The route's length, in metres.
public double LengthMeters { get; }
Property Value
Methods
Build(PassagePlan, RouteCheckSettings, Length)
Builds the track of a plan.
public static RouteTrack Build(PassagePlan plan, RouteCheckSettings settings, Length defaultLimit)
Parameters
planPassagePlanThe plan.
settingsRouteCheckSettingsThe corridor override.
defaultLimitLengthThe half-width of a side whose cross-track limit isn't set.
Returns
- RouteTrack
The track.
Exceptions
- ArgumentException
A leg is null or has fewer than two points.
LegAt(double)
The leg a distance from departure is on: the earlier leg at a waypoint.
public int LegAt(double distanceMeters)
Parameters
distanceMetersdoubleDistance from departure, in metres.
Returns
- int
The leg's index; 0 for an empty track.
Location(double, double)
The location of a span of the route: a point when it is empty.
public RouteFindingLocation Location(double fromMeters, double toMeters)
Parameters
fromMetersdoubleDistance from departure to the start.
toMetersdoubleDistance from departure to the end.
Returns
- RouteFindingLocation
The location.
PathBetween(double, double)
The positions along the route between two distances from departure, across legs and through every waypoint between them.
public IReadOnlyList<GeoPosition> PathBetween(double fromMeters, double toMeters)
Parameters
fromMetersdoubleDistance from departure to the start.
toMetersdoubleDistance from departure to the end.
Returns
- IReadOnlyList<GeoPosition>
The path; one position when the span is empty.
Exceptions
- InvalidOperationException
The track has no legs.
PositionAt(double)
The position at a distance from departure, clamped to the route.
public GeoPosition PositionAt(double distanceMeters)
Parameters
distanceMetersdoubleDistance from departure, in metres.
Returns
- GeoPosition
The position.
Exceptions
- InvalidOperationException
The track has no legs.