Expand
Using the FakeGPS Utility
Windows Mobile 6.5
4/19/2010

GPS application development can be difficult because many GPS receivers don't function well indoors, where most developers do their work. The Windows Mobile 6.5.3 DTK ships with a utility called FakeGPS that uses text files containing GPS to simulate the functionality of a GPS receiver. Applications that use the GPS Intermediate Driver will function exactly as they would if a GPS receiver was present and do not need to be modified in any way to use the utility.

Enabling FakeGPS

The FakeGPS utility is shipped in the SDK in the form of a .cab file that should be installed on your device. The default installation path for the FakeGPS.cab file is C:\Program Files\Windows Mobile 6.5.3 DTK\Tools\GPS.

The procedure title
  1. Cradle your device or emulator and wait for ActiveSync to connect.

  2. Click the Explore button in the ActiveSync application window.

  3. Copy and paste the FakeGPS.cab file from your desktop computer to a folder in the Mobile Device window.

  4. On your device or on the emulator, navigate to the folder where you copied the FakeGPS.cab file and click on the file. This will install the FakeGPS application.

  5. Select Programs from the Start menu and select Fake GPS.

  6. When the Fake GPS application launches, select Enabled from the Fake GPS drop-down list. Choose any value from the NMEA File drop-down list.

    Bb158722.b3719de1-74c2-4ad9-95fc-bdd6951620e2(en-us,MSDN.10).gif

Community ContentAdd
Installation issue on localized system

If you try to install the FakeGps on the non-English system you will encounter following error: "No NMEA files, ...".

http://developers.de/blogs/damir_dobric/archive/2008/08/06/fakegps-installation-problem.aspx

Typo obviously
"Windows Mobile emulators. FakeGPS can also be used with", which should be "FakeGPS can also be used with Windows Mobile emulators."

Set the Shared folder of your Emulator to C:\Program Files\Windows Mobile 6 SDK\Tools\GPS by click File - Configure..., then browse to Storage Card, install the FakeGPS and play with it according to above instructions.
FAKEGPS and some applications requires the GLL sentence.
On my HTC phone, the GPS does NOT create the GLL sentence, however, the GGA (more comprehensive sentence) is, so, while capturing I'm creating the GLL starting from the GGA NMEA sentence as follows:


PrivateFunction GLLfromGGA(ByVal _l AsString) AsString
' $GPGLL,4916.45,N,12311.12,W,225444,A 
' $GPGGA,143346.0,2617.198217,N,08012.222742,W,1,08,1.0,-23.5,M,,,,*04
Dim w() AsString = _l.Split(","c) 
Dim GLL AsString = String.Format("$GPGLL,{0},{1},{2},{3},{4},{5}", w(2), w(3), w(4), w(5), w(1), "A") 
ReturnString.Format("{0}*{1}", GLL, GetNMEAchecksum(GLL)) 
EndFunction
' Calculates the checksum for a sentence
PublicFunction GetNMEAchecksum(ByVal sentence AsString) AsString
' Loop through all chars to get a checksum
Dim Character AsChar
Dim Checksum AsInteger
ForEach Character In sentence 
SelectCase Character 
Case"$"c
' Ignore the dollar sign
Case"*"c
' Stop processing before the asterisk
ExitFor
CaseElse
' Is this the first value for the checksum?
If Checksum = 0 Then
' Yes. Set the checksum to the value
Checksum = Convert.ToByte(Character)
Else
' No. XOR the checksum with this character's value
Checksum = Checksum 
Xor Convert.ToByte(Character) 
EndIf
EndSelect
Next
' Return the checksum formatted as a two-character hexadecimal
Return Checksum.ToString("X2") 
EndFunction
Page view tracker