Click or drag to resize
IAircraftSanityCheckerCheckAltitude Method
Checks the altitude for an aircraft.

Namespace: VirtualRadar.Interface
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
Certainty CheckAltitude(
	int aircraftId,
	DateTime messageReceived,
	int altitude
)

Parameters

aircraftId
Type: SystemInt32
The unique identifier of the aircraft.
messageReceived
Type: SystemDateTime
The UTC date and time that the message was received.
altitude
Type: SystemInt32
The altitude in feet.

Return Value

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

The code needs to build up some history before it can determine whether the aircraft could attain the altitude specified without breaking the laws of physics. The first call for an aircraft will always return Uncertain. If the second altitude 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 altitude.

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

See Also