Author Topic: WinCE GPS Handling  (Read 5153 times)


  • Jr. Member
  • **
  • Posts: 57
  • Starless...
WinCE GPS Handling
« on: April 19, 2012, 09:07:12 pm »
[Skip this intro for main subject:] In this days I tried GPS on my windows mobile 6.5 while traveling. I was at night in some dangerous place so I found GPS with google maps quite useful for calculating distance left to safe place and so on. Garmin has not detailed maps in my country and seems will never have. Google maps uses internet connection and runs battery down in 3-4 hours. So i decided i need an ultimate app with pre caching Google maps for some area and using GPS.

For the beginning I need to get latitude and longitude for some point to try to calculate distance walked by me.

So how to get my coordinates.

I know there is some dll in windows mobile for working with gps.

But are there some units for higher level to work with gps ?

Or does anybody have some examples ?


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8476
  • FPC developer.
Re: WinCE GPS Handling
« Reply #1 on: April 19, 2012, 09:54:58 pm »
Afaik Tomtom used to communicate with GPS over serial?


  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: WinCE GPS Handling
« Reply #2 on: April 20, 2012, 02:04:03 pm »
Yes, AFAIR, in Windows Mobile 6.x the internal GPS is represented as a COM/serial port which you can presumably read out using e.g. synaser, then presumably parse the NMEA output to get position info.
Have no experience with this though...
Want quicker answers to your questions? Read

Open source including papertiger OCR/PDF scanning:

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified


  • Jr. Member
  • **
  • Posts: 57
  • Starless...
Re: WinCE GPS Handling
« Reply #3 on: April 20, 2012, 02:45:07 pm »
Afaik Tomtom used to communicate with GPS over serial?
It seems wince has gps intermediate driver called gpsapi.dll.

It has 4 main methods for opening and closing avaliable gps device if any exists on platform and for getting position and for checking device state.

GPSGetPosition method returns following structure:

typedef struct _GPS_POSITION {
  DWORD dwVersion;
  DWORD dwSize;
  DWORD dwValidFields;
  DWORD dwFlags;
  double dblLatitude;
  double dblLongitude;
  float  flSpeed;
  float  flHeading;
  double dblMagneticVariation;
  float  flAltitudeWRTSeaLevel;
  float  flAltitudeWRTEllipsoid;
  GPS_FIX_QUALITY     FixQuality;
  GPS_FIX_TYPE        FixType;
  GPS_FIX_SELECTION   SelectionType;
  float flPositionDilutionOfPrecision;
  float flHorizontalDilutionOfPrecision;
  float flVerticalDilutionOfPrecision;
  DWORD dwSatelliteCount;
  DWORD dwSatellitesInView;
  DWORD rgdwSatellitesInViewElevation[GPS_MAX_SATELLITES];
  DWORD rgdwSatellitesInViewAzimuth[GPS_MAX_SATELLITES];
  DWORD rgdwSatellitesInViewSignalToNoiseRatio[GPS_MAX_SATELLITES];

this structure contains all useful information

so i have to make good unit for that dll and thats all.


TinyPortal © 2005-2018