Re: WM5 GPS Position using GPS Intermediate Driver
- From: Henryk Birecki <soaringpilot@xxxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 11:38:05 -0700
Markus,
Go to http://vancouver-webpages.com/peter/nmeafaq.txt for a primer on
NMEA sentences. GPS sends out its information on a serial port (COM
port). WinCE accesses serial interfaces via names like "COM1:",
"COM2:" .... You get (and send) data from a serial interface by
opening a file handle to it (CreateFile function) and doing follow on
read and write on the handle typically in a multithreaded program
because of asynchronous nature of data processing. The Intermediate
GPS Driver that you are trying to use does all this for you and
presents "digested" data.
Unfortunately I cannot give you any code as all my code is C++ (I
cannot imagine life without pointers :) ), but I am certain that there
are general references to serial communication in the C# world. I am
also doubtful that going through the trouble would lead to better
results. Did you try to contact HTC and see what their folks have to
say about it? As I said, all I heard about HTC was troubles.
One thing you can do is to try my application and see if you can get
any position data from your device. Go to
http://www.soaringpilotsoftware.com/GPS_LOGpage.htm and download
GPS_LOG WinCE program. Read documentation section that talks about
NMEA setup (all this may be a bit intimidating). The RS232 port
selector should have an entry like #gpsAPI, or @gps-0. If it does not,
it means that HTC is not giving appropriate registry information, and
you probably should abandon GPS_LOG. If you use anything but #gpsAPI,
you should configure the GPS in your PPC GPS settings to NOT managed
by PPC. If @gps-0 is not there, you will have to find out which port,
and what baud rate to use.
There are probably other, simpler free GPS applications you may want
to try and see if they work.
Cheers,
Henryk
MarkusPoehler <poehler@xxxxxxxxxx> wrote:
Henryk, thanks for your advice.
I had tried my pcc outside before - without any change. It shws me etween 6
and 9 satellites but never any position information.
Please consider I am new to these things, so I dont' know what you mean with
"access COM port via CreateFile, and parse the NMEA sentences." What do I
have to do next? Can you provide me any sample code?
Thanks, Markus
"Henryk Birecki" wrote:
MarkusPoehler <poehler@xxxxxxxxxx> wrote:
Hi,
it took me about two days to get the c# GPS Sample project provided with WM
5/6 SDK running on my PPC 5/6 emulators. Actually I am using the code from
the SDK6 sample to run on my WM5 EMulator and on my WM5 PPC Hardware.
Everything works fine, the Emulator shows the position given from the FakeGPS
Textfile.
But on my PCC (HTC Trin100 where GPS device is built in) the application
never retireves any valid information about the position. It properly shows
the no of satellites using position.SatellitesInViewCountValid. But the
position.LongitudeValid and position.LatitudeValid values are never set to
true, so I can not get the DOUBLE values of the position.
I learned that the GPS Intermediate Driver is the "modern" way of connecting
to the GPS Hardware being able to use it through different apps at the same
time. So I focused on this way of connecting. I also read a few articles
explaining that one has to change the registry of WM to enable GPS, I wonder
if I have to do so and how. I am also confused about the software and
hardware port settings - let's say I would set them to any ports, what effect
might that have to my application, that doesn't have any port definition
inside itself?
Can anyone provide help on this?
Thanks, Markus
Go and test outside, where you get real GPS signal. More than likely
Intermediate driver is just flagging the fact that it is not getting a
real fix.
Yes, you can access the GPS hardware port directly. You probably need
to set your device to NOT manage the GPS. In that case you also neeed
to turn off all other programs using GPS, and access COM port via
CreateFile, and parse the NMEA sentences. Since I have heard nothing
but bad things about HTC products, you may also find out that this
approach may not work on their devices. At some point I was told that
there is an application called port splitter that had to be used in
order to get at raw GPS data on some of these, but this is hearsay.
If you want your application to run on older devices (prior to WM5)
you need to go the raw NMEA data from COM port route.
Cheers,
Henryk
.
- Follow-Ups:
- Re: WM5 GPS Position using GPS Intermediate Driver
- From: MarkusPoehler
- Re: WM5 GPS Position using GPS Intermediate Driver
- References:
- WM5 GPS Position using GPS Intermediate Driver
- From: MarkusPoehler
- Re: WM5 GPS Position using GPS Intermediate Driver
- From: Henryk Birecki
- Re: WM5 GPS Position using GPS Intermediate Driver
- From: MarkusPoehler
- WM5 GPS Position using GPS Intermediate Driver
- Prev by Date: Re: WM5 GPS Position using GPS Intermediate Driver
- Next by Date: GPSID: GPS data in unattended power mode on WM6 device
- Previous by thread: Re: WM5 GPS Position using GPS Intermediate Driver
- Next by thread: Re: WM5 GPS Position using GPS Intermediate Driver
- Index(es):
Relevant Pages
|