WinCE GPS Handling lazarus / 35-Windows CE ---------------------------------------------------------------------- BioHazard · 2012-04-19 19:07 [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 ? ---------------------------------------------------------------------- marcov · 2012-04-19 19:54 Afaik Tomtom used to communicate with GPS over serial? ---------------------------------------------------------------------- BigChimp · 2012-04-20 12:04 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... ---------------------------------------------------------------------- BioHazard · 2012-04-20 12:45 Quote from: marcov on April 19, 2012, 09:54:58 pmAfaik 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: http://msdn.microsoft.com/en-us/library/bb202062.aspx typedef struct _GPS_POSITION {   DWORD dwVersion;   DWORD dwSize;   DWORD dwValidFields;   DWORD dwFlags;   SYSTEMTIME stUTCTime;   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 rgdwSatellitesUsedPRNs[GPS_MAX_SATELLITES];   DWORD dwSatellitesInView;   DWORD rgdwSatellitesInViewPRNs[GPS_MAX_SATELLITES];   DWORD rgdwSatellitesInViewElevation[GPS_MAX_SATELLITES];   DWORD rgdwSatellitesInViewAzimuth[GPS_MAX_SATELLITES];   DWORD rgdwSatellitesInViewSignalToNoiseRatio[GPS_MAX_SATELLITES]; } GPS this structure contains all useful information so i have to make good unit for that dll and thats all.