Click or drag to resize
IAircraftSanityCheckerCheckPosition Method
Checks the position for an ICAO.

Namespace: VirtualRadar.Interface
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
Certainty CheckPosition(
	int aircraftId,
	DateTime messageReceived,
	double latitude,
	double longitude
)

Parameters

aircraftId
Type: SystemInt32
The unique identifier of the aircraft.
messageReceived
Type: SystemDateTime
The UTC date and time that the message was received.
latitude
Type: SystemDouble
The latitude that the aircraft has reported.
longitude
Type: SystemDouble
The longitude that the aircraft has reported.

Return Value

Type: Certainty
A value indicating whether the position could be correct.
Remarks

The code needs to build up some history before it can determine whether the aircraft could reach the position specified without travelling faster than it can. The first call for an aircraft will always return Uncertain. If the second position is compatible with the first then it will return ProbablyRight, otherwise if at least one of them is wrong then more messages may need to be received until the code can start returning Certainty values of ProbablyRight. Whenever this returns CertainlyWrong you should discard the position.

Once this method returns CertainlyWrong it will reset and will not return ProbablyRight until a pair of positions have been received that seem to be sane.

See Also