AltitudeUnits Property
Sets/gets the units in which altitude data is to be returned.
Syntax
Visual Basic
object.AltitudeUnits [ = value ]
Visual C++
object.GetAltitudeUnits()
object.SetAltitudeUnits(value)
| Part
| Description |
| object |
An object expression that evaluates to a GPS ToolKit object. |
| value |
A short integer indicating the units in which altitude data is to be returned.
|
Example
Visual Basic
'Set altitude units
myGPSToolKit.AltitudeUnits = 1 ' feet
'Get altitude units
Dim altUnits As Integer
altUnits = myGPSToolKit.AltitudeUnits
Visual C++
// Set altitude units
_variant_t vtAltUnits((short)1); // feet
m_myGPSToolKit.SetAltitudeUnits(vtAltUnits);
// Get altitude units
vtAltUnits = m_myGPSToolKit.GetAltitudeUnits();
short altUnits = (short)vtAltUnits;
Remarks
This property affects the units of the Altitude and
GeoidHeightAboveWGS84ellipsoid properties, as well
as the altitude data supplied by the FixUpdate event.
Valid AltitudeUnits values are as follows:
| Setting
| Description |
| 0 |
Meters (Default) |
| 1 |
Feet |
Default
0 (meters)
Returns
A VARIANT (type VT_I2/short) containing the units in which altitude is to be returned.
Errors
Attempting to set AltitudeUnits to an invalid value will cause GPS ToolKit to throw an "Invalid argument" exception.
See Also
Altitude property, GeoidHeightAboveWGS84ellipsoid property, FixUpdate event, SpeedUnits property
|