Date Thu 07 January 2010

Marco Hugentobler and I have been working on integrating C++ based GPS integration into QGIS core.

New functionality

There are two parts:

- a gps background process implemented by Marco that communicates with a GPS and extracts nmea strings and then propogates them to any listing classes
- a user interface, implemented by myself, as a dock panel that shows position, signal strength bar chart, satellite polar chart, options

Similar to Martin Dobias's GPS project, the GPS ui can be used to capture features (and attributes using the normal attribute dialog mechanism). The ui part uses Qwt for the charting functions.

How is it used?

- Add any reference layers to your project (e.g. satellite imagery backdrop)
- Create or add zero or more vector layers (lines, points, polygons) and enable editing
- Connect the GPS via a serial port (our test systems use serial to usb adaptors)
- Tick the auto-add vertices box in the options pane for easy use
- Now get on the train / bus / car :-)

As you drive along, focus one of your vector layers, and click the Add feature button.

If it's a point layer a new point will be added, the add attribute dialog will appear and the track will not be destroyed.
If it's a line layer (should work with poly too, I didn't test yet), the add dialog will appear and after closing it the feature is added to your dataset and the track will be destroyed - ready to start creating the next feature.

For more control of the vertices assignment you can disable auto-add vertices and click the add vertex button when you want a vertex. Here is what the main panel looks like with auto-add vertices disabled.

The main display after your device is connected,

The Add Vertex button hides when auto add vertex check box is enabled. The add vertex and add feature buttons grow to use all available vertical space to make them easier targets to hit when trying to operate the laptop in a moving vehicle.

The track marker rubber band colour can be specified making it easier to see (e.g. on dark reference maps you can set the track marker to a light colour). For similar reasons, the rubber band width can be specified.

The reset feature button next to the Add feature button is there so that you can discard collected track data if you want to start your feature from your current location rather than your last saved feature's end.

Other features

The tool can show a simple histogram showing signal strength:

Signal strength graph

It can also show a polar chart showing relative satellite positions:

Satellite position graph

An options panel allows you to specify your device port and various other choices. The map can be panned to be always centered on the GPS position, or recenter when the GPS cursor will leave the current view extents (so minimising refreshing), or never following the GPS. This panel is also where you specify the track width and colour.

GPS capture tool options

When you click the Add feature button, the normal attribute dialog mechanism is invoked allowing you to capture attribute data for your feature. Here is a screen shot showing point capture.

Capturing a point feature.

In the field

Here is a pic of my in car setup while testing the software:

In car navigation

Note that the dog is still learning to operate the laptop so at the moment I keep her responsible for looking out the window for points of interest.


Comments

comments powered by Disqus