GPS Sample Latitude/Longitude not correct

I have a Pharos GPS unit with both the Blue Tooth and USB interface. I used hypertermal on a XP machine with the USB interface to record some raw GPS output.

Then I used the file redirect to run the GPS WM5.0 Sample code in VS2005 WM5.0 device emulator. It displays the correct information on the screen Lat 42 / lon 83 when reading the raw GPS data file that I created.

When I move the program to my WM 5.0 device and connect up to the GPS unit over BT, I get strange readings for the lat/lon. Lat 0d 42' 24.36 Lon 0d 83' 28.65. They look shifted right. What is degrees show up in the minutes.

The number of satellites and time are correct on the display.

The same GPS unit and WM 5.0 device with Pocket Streets will display the proper location on the map and the lat/lon are correct.

This has me stumped. Any ideas



Answer this question

GPS Sample Latitude/Longitude not correct

  • bchan

    Are you using any formatting when displaying the results or using default format providers The region/locale settings of Emulator and device may be different resulting in different output.

    Does this help

    Manav



  • Madrona

    There is definite differential of order of "100" between emulator and device! Emulator only emulates the ARM instructions. It runs the OS image i.e. WM5 in your case. So, the difference appears to be in OS version of the image running on the emulator and the real device.

    GPSGetPostition() API Ref - http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/wce51lrfGPSGetLocation.asp

    You may want to post this question in WM API forum for your specific questions on API.

    Manav



  • jianglinchun

    Very strange - looks like you've following 3 scenarios:

    1. GPS Unit + WM5 Device + Pocket Street =>Correct display

    2. GPS Unit + WM5 Emulator + Your Program =>Correct display

    3. GPS Unit + WM5 Device + Your Program => Incorrect display

    and Emulator and device have same region and locale settings. It appears that somehow your program is not behaving correctly within device security parameters or locked device settings. Emulator is not locked by default and a program that works well on emulator is not guranteed to work on the device because OEMs choose to configure devices in different ways and they may alternately choose to lock these devices.

    You should checkout the following:

    1. Is your device locked

    2. Any specific WM API you're using. If yes, than you should see how they behave in locked down mode. Try posting your question to the WM specifi forum.

    Thanks,

    Manav



  • Kendell

    I check the regional settings and they are set identical between the emulator and the device.

    The program is unmodified from the sample except for the bug fix that was posted earlier.


  • IanMB

    I have a CF gps receiver and how do i run my gps application using only WM 5.0 emulator and the receiver

    Please anyone help me how to connect these devices and make my application intially work.

    Thanks,

    Lavanya


  • geraud c

    I think I'm at the root of the problem. I debugged the code running in the emulator and on two different WM 5.0 devices.

    On the emulated device the api call "GPSGetPosition" returns in dbLatitude 4240.6088333.

    On the real devices the api call returns in dbLatitude 42.406088333.

    The emulator is version 5.1.1700 Build 14343.0.0.0 api returns 4240.6088333

    The Dell Axim is version 5.1.70 Build 14410.1.1.3 api returns 42.406088333

    The I-mate JasJar is version 5.1.195 Build 14847.2.0.0 api returns 42.406088333

    All of the test were using the emulated gps file driver using the same gps data text file.

    So my real devices are later builds than the emulator so I'm assuming there was a bug in the GPSGetPosition API in the earlier emulator build.


  • Enzoe

  • GPS Sample Latitude/Longitude not correct