Click or drag to resize
ICompactPositionReportingEncode Method
Encodes a latitude and longitude to CPR coordinates.

Namespace: VirtualRadar.Interface.Adsb
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
CompactPositionReportingCoordinate Encode(
	GlobalCoordinate globalCoordinate,
	bool oddFormat,
	byte numberOfBits
)

Parameters

globalCoordinate
Type: VirtualRadar.Interface.AdsbGlobalCoordinate
The latitude and longitude to encode.
oddFormat
Type: SystemBoolean
True if ODD formatting is required, false if EVEN formatting is required.
numberOfBits
Type: SystemByte
The number of bits to encode to - this can be one of 12, 14, 17 or 19.

Return Value

Type: CompactPositionReportingCoordinate
Remarks
Note that the standard only allows for even encoding when the number of bits is 14. Implementations do not have to police this. VRS does not use this method, implementations only need to supply a full version of this method if they want to pass the unit tests.
See Also