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

GetWptLocation Method

Returns the latitude and longitude of the specified waypoint in the current route.

Syntax

Visual Basic

object.GetWptLocation [in] WptName, [out] WptLatitude, [out] WptLongitude

Visual C++

object.GetWptLocation([in] WptName, [out] *pWptLatitude, [out] *pWptLongitude)

Part Description
object An object expression that evaluates to a GPS ToolKit object.
WptName A VARIANT containing the waypoint ID (name).
WptLatitude A VARIANT (type VT_BSTR/BSTR/VB String) containing the latitude of the specified waypoint.
WptLongitude A VARIANT (type VT_BSTR/BSTR/VB String) containing the longitude of the specified waypoint.

Example

Visual Basic

Dim wptLatitude, wptLongitude

'Get info for waypoint "MYWPT"
myGPSToolKit.GetWptLocation "MYWPT", wptLatitude, wptLongitude

Visual C++

_variant_t vtWptLat, vtWptLon;
CString wptLat, wptLon;

// Get info for waypoint "MYWPT"
_variant_t vtWptID("MYWPT");
m_myGPSToolKit.GetWptLocation(vtWptID, &vtWptLat, &vtWptLon);

wptLat = (LPCSTR)(_bstr_t)vtWptLat;
wptLon = (LPCSTR)(_bstr_t)vtWptLon;

Remarks

  • If latitude or longitude are not available for the specified waypoint, the associated variable will be empty (type VT_EMPTY).
  • Latitude and longitude are returned in the format defined in the LatLonFormat property. Degree, minute, and second labels are defined in the DegLabel, MinLabel, and SecLabel properties, respectively.
  • This property is not updated until the entire route waypoint list is sent by the GPS. Because waypoint location data is transmitted an the rate of one waypoint per data cycle (usually about 1 second), this data can take some time to update.

Returns

Nothing

Errors

None

See Also

WptsInRoute property, DestWptID property, OriginWptID property, LatLonFormat property, DegLabel property, MinLabel property, SecLabel property, NavUpdate event