This method provides the client with information about the unit settings in the user interface. This method is useful if the client has a user interface and is interested in working with the same units as the TerraExplorer user interface.
Note: This has no effect on the units that are actually being passed to a COM method call, which should always be as described in the Units topic.
HRESULT GetUserUnits(
[out] VARIANT* shortSpeed,
[out] VARIANT* shortAltitude,
[out] VARIANT* shortAltitudeType,
[out] VARIANT* shortLatLongType)
Parameters:
shortSpeed – Determines what unit of speed is being used in the user interface.
UNIT_SPEED_KMH = 0 (Kilometers/hr)
UNIT_SPEED_MPH = 1 (Miles/hr)
UNIT_SPEED_KNOTS = 2 (Knots)
shortAltitude – Determines what unit is being used for the altitudes and distances in the user interface.
UNIT_ALTITUDE_METERS = 3 (Meters)
UNIT_ALTITUDE_FEET = 4(Feet)
shortAltitudeType – Determines what kind of altitude is being used in the user interface.
UNIT_ALTITUDE_AGL = 5 (Above Ground Level)
UNIT_ALTITUDE_ABSOLUTE = 6 (Above the terrain database vertical datum base ellipsoid)
shortLatLongType – If you use
Lat-Long, this parameter determines whether the coordinates are
displayed in degrees-minutes-seconds format, or in decimal degrees
format.
Note: If you are not using Lat-Long, the
return value is “NA”. In this case you can determine the units for
the coordinates using the ITerrain interface.
UNIT_LATLONG_NA = 7 (N/A)
UNIT_LATLONG_DEGREES = 8 (Degrees-Minutes-Seconds)
UNIT_LATLONG_DECIMAL = 9 (Decimals degrees)
Return Values:
S_OK if the method call succeeded.