Edit

Share via


GreatCircle.CrossTrackError Method

Definition

Computes cross-track error, that is the distance the current position is away from the route from origin to destination

public static void CrossTrackError (Iot.Device.Common.GeographicPosition origin, Iot.Device.Common.GeographicPosition destination, Iot.Device.Common.GeographicPosition currentPosition, out UnitsNet.Length crossTrackError, out UnitsNet.Length distanceTogoAlongRoute);
static member CrossTrackError : Iot.Device.Common.GeographicPosition * Iot.Device.Common.GeographicPosition * Iot.Device.Common.GeographicPosition * Length * Length -> unit
Public Shared Sub CrossTrackError (origin As GeographicPosition, destination As GeographicPosition, currentPosition As GeographicPosition, ByRef crossTrackError As Length, ByRef distanceTogoAlongRoute As Length)

Parameters

origin
GeographicPosition

Start of current leg

destination
GeographicPosition

End of current leg

currentPosition
GeographicPosition

Current position

crossTrackError
UnitsNet.Length

The distance perpendicular to the leg. Positive if the current position is to the right of the leg.

distanceTogoAlongRoute
UnitsNet.Length

Distance to go on track (with current position projected back to the leg)

Remarks

Accuracy may be limited for distances > 100km

Applies to