/gpsmap

A GPSD simulator using a map

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

gpsmap

This is a GPSD (http://gpsd.berlios.de/) simulator using a map.

This tool is designed for making possible to use Kismet (and other GPSD based tools) inside buildings, zones without GPS signal, or even without a GPS device.

The inner working is simple: you only have to set three reference coordinate points on the map using this tool, and the integrated GPSD emulator will start to send your position coordinates throught the localhost:2947 port.

This program can also save a planned route and replay it automatically at a certain speed (walk speed parameter).

Screenshot: gpsmap screenshot

Quick start

You will need Python and pyGTK libraries.

This program is written for Linux, but it should be work seamlessly on other UNIX platform. Due it uses sockets it may not work correctly on Windows.

To start the program run:

python ./gpsmap

To start a new project follow these steps:

  1. Load your image map (JPG, PNG, ...) using the "Config -> Load map image" menu option.

  2. Go to the "Config -> Reference points -> Set reference A". A yellow-cross following your mouse will apear on your map.

    Choose your reference base point (we call it Reference A) and click on it. A dialog will appear asking for the geographic coordinates for this point. Use some earth map software (like Google Earth) to find them.

    gpsmap screenshot

    Once confirmed you will get the following mark on your map:

    gpsmap screenshot

  3. You will need to do this operation two times more. Now we will set the horizontal axis reference point (we call it H).

    Go to the "Config -> Reference points -> Set reference H". This time you will get a yellow line with a little cross moving along it. This cross will set the position of the H point when you click with your mouse.

    Once you clicked it will appear a dialog asking for the geographical coordinates of this point.

    gpsmap screenshot

    Once confirmed you will get the following mark on your map:

    gpsmap screenshot

  4. Repeat this process, but this time with the verical axis setting the vertical axis reference point (we call it V).

    gpsmap screenshot

    Again you will get a mark on your map:

    gpsmap screenshot

  5. Now gpsmap is fully configured. You can test that it works using the ruler (go to "Edit" menu, and select "Ruler mode"), pressing and dragging the mouse left-button over the map:

    gpsmap screenshot

    Or testing the precision of your routes saving them with the "File -> Save KML route" option and loading them in Google Earth maps. If you have set correctly the three reference points your route will fit perfectly on the Google Earth maps!

    gpsmap screenshot

Sending your position

To send a particular position to the software connected to this emulator (i.e. Kismet), you only have to press the mouse left button in the "No editing mode". For selecting this mode enable the "Edit -> No editing" menu option.

Tracing a route

For tracing a route you only have to change to the "Edit route mode", choosing the "Edit -> Edit route" menu option. Once you are in the "Edit route mode" you only have to press the mouse left-button to add new route points:

gpsmap screenshot

Please note that if you have running a software that listens to the GPSD port, it will receive the coordinates of the point you a pressing. You will know which coordinates are being sent throught the GPSD port looking for a pulsating circle in your map:

gpsmap screenshot

Playing a route

For playing a route press the "Animate -> Start" option menu. It will start playing the route while you are moving with your laptop at the same speed:

gpsmap screenshot

You can configure your walking speed in the "Config -> Set walking speed":

gpsmap screenshot

Please note that if the "Animate -> Pause at checkpoints" option is checked, the route will pause automatically each time you reach a control point:

gpsmap screenshot

You can resume the route hitting the ENTER key. The "Pause at checkpoints" option is useful for resynchronizing your walking with the gpsmap walking :D

Please note that the ENTER key is a "PAUSE/RESUME" key binding.