141
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
Contents
DwValidFields DWORD
The validity or invalidity of retrieved data is shown in Bits for
each GPS_POSITION structural field.
stUTCTime
SYSTEMTIME
UTC time retrieved from the satellites is shown in
SYSTEMTIME format.
dblLatitude
Double
Latitude is expressed in degrees.
A positive value indicates northern latitude.
dblLongitude
Double
Longitude is expressed in degrees.
A positive value indicates an eastern longitude.
flSpeed
Float
Traveling speed is shown in knots (nautical miles/hour)
flHeading
Float
Traveling direction is expressed in degrees. 0° represents true
north.
FixType
GPS_FIX_TYPE
GPS measurement is shown in either 2D or 3D.
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()
.
3
Figure 2.12 shows the flowchart of the procedure.
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.
Summary of Contents for IT-800 Series
Page 173: ...173 Copyrights Tab This tab is for displaying the OS copyright information Figure 3 19 ...
Page 201: ...201 Date Tab This tab is for setting display format of date Figure 3 56 ...
Page 247: ...247 4 2 Games The terminal comes with two games Solitaire and Bubble Breaker Figure 4 2 ...
Page 255: ...255 4 5 Calculator The application can be used to operate nine digit calculator Figure 4 11 ...