Movmap GPS Tracker ================== Movmap is a simple moving map GPS tracking program. It can run on GPS PNAs that use WinCE 4.2 .NET core OS. A PocketPC 2003 port is also available. While there are many moving map programs available for the PocketPC OS, I could not find any that runs on my embedded GPS PNA with WinCE 4.2 .NET core OS. Therefore, I wrote this program for my own use. This is a freeware program and its source code is also available. Users are encouraged to adapt, modify or improve the source code for their own use. Any commercial use of this program or its source code is not allowed. Description =========== This program is a simple graphics viewer that shows your current GPS position on any geographical map in bitmap (.bmp) format. Each picture map requires a calibration (.ndx) file. See below for details. The program supports only NMEA type GPS receivers. Tracks can be plotted on the map by autologging the past positions. Users can save or load their autologged track data. Manual logging of GPS data is also possible. Maps ==== Any geographical map in bitmap (.bmp) format can be used. The PocketPC version supports .jpg and .gif formats also. Such maps are easily available on the Web. The Google Earth program is an excellent example. Bitmap digital maps can also be prepared using programs like cGPSmapper. Make sure that North is oriented exactly vertical on your map. Once you have obtained your map file, you need to prepare a simple calibration(.ndx) file for it. This is a text (.txt) file that contains lat/long information about two points on the map. Select two points on your map: one near the SW corner and another near the NE corner. Note down the (nx,ny) pixel coordinates of these two points using a graphics viewer (e.g. Windows 2000 paint program). Using Google Earth or Nasa's Whirlwind program, obtain the long/lat data in degrees for these two points. Enter this information in your calibration (.ndx) text file in a single line with the following format: nxSW, nySW, (+/-)longSW, (+/-)latSW, nxNE, nyNE, (+/-)longNE, (+/-)latNE Use -ve signs for lat/long data in W/S hemispheres. See the sample map file for details. With this, you should be able to get better than 10m accuracy on Google maps. As curvature effects are not considered, do not make Google Earth maps that cover a very large region (say >1000kms). Installation ============ On the PocketPC, copy the movmap.exe file along with your map files and calibration files to any directory. Then use the file explorer to execute it. If you wish, you can create a short cut to the movmap.exe file in the /Windows/Start menu/ directory for easy access on the Start menu. For embedded GPS PNAs that run navigator programs from an SD card, you can rename the movmap.exe file to a suitable name and copy it to an appropriate directory on a new SD card. For e.g., my PNA launches the /Maps/Navigator.exe program on the SD card. (Advanced users can easily modify the registry to boot the PNA in the WinCE explorer mode. See gpspassion.com forums for details. The explorer program can also be started using the rapistart program available in the Windows Mobile Developer Power Toys.) Usage ===== First, select the correct COM port from the set menu. For embedded GPS PNAs, this default is usually COM2. The GPS light should turn on now. Bluetooth (BT) GPSs usually use port COM5. Make sure that the BT device is correctly paired up. The correct BT serial port address can be found in Start->Settings->Bluetooth Settings menu on the PocketPC. Next select correct baud rate and press Go. If the settings are correct, you should now be able to see the NMEA strings ($GP...) on the NMEA screen in the Tools menu. If not, try a different settings. In most cases, the default factory setting 4800N1 should work. You can also try to Force set the GPS to this default (only works for built-in NMEA GPS). USB type GPSs are not supported. Once the connection to the GPS is established, load the map (.bmp) file and its corresponding calibration (.ndx) file from the File->Load menu. Press the Go button to start GPS tracking. Now a blinking green/red cursor can be seen on your position in the map. The cursor turns green whenever you have a GPS lock with a valid position update (from the $GPGGA NMEA string). The Stop button disconnects the GPS. After stopping, you can free browse your map by using the cursor pad or by dragging the screen. Press Go button to start GPS tracking again. Set->OFF menu button powers off the built-in GPS. File->Exit menu button fully exits the program (not suspends!). On the PocketPC, press X on the Start bar to suspend the program. Zoom and Invert modes are available in the Tools menu. The Clear button clears any track shown on the screen. By default, the program runs on full screen mode. If you wish to access other programs (such as notepad editor or music player) during your session, turn on TbarON in the Tools menu to activate the Task bar button. TbarOFF button returns to full screen mode. Autologging of GPS data is turned on by default when the program is started. Press Autolog->display to see your past track on the map. Autolog->freq-> high is the default setting that logs your position once every 10 updates (about once every 10 secs when the connection is good). You can autolog upto 5000 points per session (good enough for more than 8 hours of drive in the high setting). The std and low frequency settings log position every 100 or 1000 position updates. Autologged data can be saved as a text (.txt) file at any time. You can also load a previous file and start to autolog from where you left off. The load or erase menu clears the current autologged data. The saved autolog text contains time (hhmmss) and long/lat data (in +/- degrees). The first number (separated by a ":") is the number of points logged. Any text editor can be used to view this file. (The manual log editor can view only a few hundred points). You can also manually log your GPS data in the Manlog menu. Short notes can be added to data before you save them. The NMEA menu shows the NMEA string recieved at that time. (The string data is valid upto the first * and checksum.) The cursor menu switches between tiny cursor size (2x2) and standard cursor size (6x6). Track is a simple and crude (but effective and useful) way to show your path continously on the map. It works by copying whatever that appears on the screen buffer to memory. Tracking stops when you touch the screen. The screen may get messed up if you use the controls of your PDA. If this happens, clear the screen and restart tracking. It works fine only on PNAs. If you don't like it, you can always use the autologging feature to display your past track. Things to do (or you can do!) ============================ 1) add support for a config.ini file to save the current settings as default. 2) add support for automap switching when you leave the current map region. 3) add POI editor, Way Point editor, Direction indicator, etc. Offline map editor for preparing calibration files. 4) add support for digital or vector format maps that can zoomed in or out to many levels of details. 5) improve speed and efficiency of the code, fix bugs etc. I could test this code only on two real machines: 1) my GPS PNA that uses ARM4I Samsung 2410 processor with WinCE 4.2 .NET core OS (320x240) and 2) a Bluetooth GPS connected to my PocketPC that uses ARM4 Intel PXA272 processor with Windows Mobile 2003 SE OS (240x320). If you use other older types of machines (SH3 or MIPS), you have to recompile the source code (or contact me for emulator tested binary versions). To compile, you need eVC4 with SP2 and the appropriate SDK for your machine. As with any freeware, this program comes with no support or warranty. I spent about two weeks of my summer break to develop this code and I cannot afford to spend anymore time now. You are free to use/modify/adapt/play with the source code for your purpose as long as it is not used for any commercial purpose. Have fun! C. Mathiazhagan cmathiaz@yahoo.com