Posts Tagged ‘GPSGetPosition’

GPS Intermediate Driver for Windows Mobile (and getting it to work!)

Monday, August 25th, 2008

My last two Windows Mobile phones have both had GPS, so I’ve played with code to get my location from the GPS a few times. These have generally been quick hacked-together bits and pieces. In all of them, I wrote my own GPS code. I knew that the GPS device would be accessible through a serial port, so I just connected to the relevant COM port and started reading. It’s easy to parse – NMEA sentences are written with an update on each line, in comma-separated strings.

After sharing my OpenCellId client last week, I was encouraged to try rewriting the GPS code for it using the Windows Mobile GPS Intermediate Driver. So I had a quick try. I was vaguely aware of it before, but hadn’t taken a proper look. In this post, I’ll describe briefly what it is, it’s benefits over home-grown hacks such as my own, and share a couple of things that I had to do to get it to work.

(more…)