Download Print this page

Casio IT-800 Series Software Manual page 141

Hide thumbs Also See for IT-800 Series:

Advertisement

Positioning Data Using the GPS Intermediate Driver API
The Windows Mobile GPS intermediate driver provides an API to analyze NMEA character
strings and obtain positioning data.
The GPS intermediate driver API can be used in the following procedure.
1. Create an event with CreateEvent() in order to detect GPS module status changes and output.
2. Connect to the GPS module with GPSOpenDevice(). GPS module status and positional
changes can be registered for each event with GPSOpenDevice(). "Positional change" events
actually indicate that NMEA output from the GPS module has been received. The GPS module
generally outputs several lines of NMEA character strings each second.
3. Use WaitForMultipleObjects() or WaitForSingleObject() to wait for events.
4. When notification of a "positional change" is received, use GPSGetPosition() to retrieve the
data. Positioning data can be retrieved from each member inside the GPS_POSITION structure.
Some of the structural members are listed in the table below.
Table 2.107
Member
Format
DwValidFields DWORD
stUTCTime
SYSTEMTIME
dblLatitude
Double
dblLongitude
Double
flSpeed
Float
flHeading
Float
FixType
GPS_FIX_TYPE
5. Repeat steps 3 and 4 as required by the application.
6. When positioning data is no longer required, the connection can be terminated with
GPSCloseDevice().
F igure 2.12 shows the flowchart of the procedure.
3
Note:
Depending on the design of application, it may also be possible to retrieve regular positioning data
with GPSGetPosition() and status with GPSGetDeviceState() after opening the device with
GPSOpenDevice() without having to register events.
The validity or invalidity of retrieved data is shown in Bits for
each GPS_POSITION structural field.
UTC time retrieved from the satellites is shown in
SYSTEMTIME format.
Latitude is expressed in degrees.
A positive value indicates northern latitude.
Longitude is expressed in degrees.
A positive value indicates an eastern longitude.
Traveling speed is shown in knots (nautical miles/hour)
Traveling direction is expressed in degrees. 0° represents true
north.
GPS measurement is shown in either 2D or 3D.
141
Contents

Advertisement

loading