About GPS ToolKit
Introduction
Purchasing GPS ToolKit
Redistributing GPS ToolKit
License Agreement
Support
Getting Started
How to Use GPS ToolKit
Adding GPS ToolKit to a Visual Basic Project
Adding GPS ToolKit to a Visual C++ Project
Adding GPS ToolKit to an Excel Worksheet
Setting up the GPS
How to Use Events
Handling Events in Visual Basic
Handling Events in Visual C++
Handling Events in Microsoft Excel
GPS ToolKit Sample Projects
Handling GPS ToolKit Errors
Reference
Properties
Altitude
AltitudeUnits
ArrivedAtDest
AutomaticOperation
BaudRate
CrossTrackError
DegLabel
DestClosingVelocity
DestWptID
DestWptLatitude
DestWptLongitude
DistUnits
DGPSRefStationID
FixDateTime
FixGood
FixQuality
FixSatellitePRNs
GeoidHeightAboveWGS84Ellipsoid
HDOP
Latitude
LatLonFormat
Longitude
MagVariation
MinLabel
ModeIndicator
NumSatellitesInFix
NumSatellitesInView
OperationMode
OrigToDestMagBearing
OrigToDestTrueBearing
OriginWptID
PDOP
PortHandle
PortName
RangeToDest
RouteContainsAllWpts
RouteName
SatelliteInViewPRNs
SecLabel
Speed
SpeedUnits
TimeSinceLastDGPSUpdate
TrueBearingToDest
TrueCourse
VDOP
WptsInRoute
Methods
Close
GetSatelliteInfo
GetWptLocation
Open
OpenFile
Events
FixUpdate
FileComplete
NavUpdate
RawDataReceived
SatelliteUpdate

DistUnits Property

Sets/gets the units in which distance data is to be returned.

Syntax

Visual Basic

object.DistUnits [ = value ]

Visual C++

object.GetDistUnits()

object.SetDistUnits(value)

Part Description
object An object expression that evaluates to a GPS ToolKit object.
value A short integer indicating the units in which distance data is to be returned.

Example

Visual Basic

'Set distance units
myGPSToolKit.DistUnits = 1	' feet

'Get distance units
Dim distUnits As Integer
distUnits = myGPSToolKit.DistUnits

Visual C++

// Set distance units
_variant_t vtDistUnits((short)1);   // feet
m_myGPSToolKit.SetDistUnits(vtDistUnits);

// Get distance units
vtDistUnits = m_myGPSToolKit.GetDistUnits();
short distUnits = (short)vtDistUnits;

Remarks

This property affects the units of the RangeToDest property, as well as the range data supplied by the NavUpdate event.

Valid DistUnits values are as follows:
Setting Description
0 Meters (Default)
1 Feet
2 Miles
3 Nautical Miles

Default

0 (meters)

Returns

A VARIANT (type VT_I2/short) containing the units in which distance is to be returned.

Errors

Attempting to set DistUnits to an invalid value will cause GPS ToolKit to throw an "Invalid argument" exception.

See Also

AltitudeUnits property, RangeToDest property