« Previous - Version 2/3 (diff) - Next » - Current version
Anton Martchukov, 04/24/2010 07:45 pm


Console Client User Manual

GPFix software comes with a console client gpfclient.py located in utils/gpfclient directory of geotracker-software git repository. This client is able to simulate data coming from a device to the server by feeding them out of a track file.

Dependencies Installation

gpfix client requires opengpfix library that is the part of geotracker-software distribution. There are two options here: one is to use the library from the Debian package, second is to use the library from the git repository. The first option is preferable, especially if you are on Debian.

In order to install opengpfix library on Debian do the following:

  1. Add the following lines to your /etc/apt/sources.list:
    deb     http://debian.martchukov.com/apt  sid main contrib non-free
    deb-src http://debian.martchukov.com/apt  sid main contrib non-free
    
  2. Execute the following commands:
    sudo aptitude update
    sudo aptitude install opengpfix
    

Running the Tool

gpfclient.py supports usual "--help" switch to list its options and comes with pretty straightforward built-in help. In order to list all of the options, do the following:

  1. Go to the directory where client file is located (utils/gpfclient) in the git repository:
    cd PATH_TO_YOUR_GIT_CHECKOUT/utils/gpfclient
    
  2. Execute client with the "--help" switch:
    ./gpfclient.py --help
    

Here are brief and important things you need to know:

  1. The only argument accepted is a path to track file. This argument is required. In theory you shall be able to use any track file format supported by GDAL/OGR library, but only GPX format is known to work.
  2. You should specify server and port to connect. There are no default and those options are required. Use "--server" and "--port" switch to specify this information.
  3. Like any good UNIX tool by default when the things are going ok the client will not print anything to the console. If you want to check its operation use "--verbose" switch that will enable info messages printing to the stdin.

Now we are ready to send track file to the server:

./gpfclient.py --verbose --server=gpfix.com --port=7001 TRACK_FILE.gpx

By default client uses the dates contained within track file, if you want to override this, you can use "--use-current-time" switch will make the client using current system time each time when sending next coordinate effectively overriding what is in the track file.

For additional options (there are plenty off), consult the built in "--help" page.