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

SpeedUnits Property

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

Syntax

Visual Basic

object.SpeedUnits [ = value ]

Visual C++

object.GetSpeedUnits()

object.SetSpeedUnits(value)

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

Example

Visual Basic

'Set speed units
myGPSToolKit.SpeedUnits = 0	' mph

'Get speed units
Dim speedUnits As Integer
speedUnits = myGPSToolKit.SpeedUnits

Visual C++

// Set speed units
_variant_t vtSpeedUnits((short)0);   // mph
m_myGPSToolKit.SetSpeedUnits(vtSpeedUnits);

// Get speed units
vtSpeedUnits = m_myGPSToolKit.GetSpeedUnits();
short speedUnits = (short)vtSpeedUnits;

Remarks

This property affects the units of the Speed property, as well as the speed data supplied by the FixUpdate event.

Valid SpeedUnits values are as follows:
Setting Description
0 mph
1 kph
2 knots (Default)

Default

2 (knots)

Returns

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

Errors

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

See Also

Speed property, FixUpdate event