[GRASSLIST:969] Re: live GRASS/GPS interface

Radim Blazek blazek at itc.it
Mon Aug 18 05:28:15 EDT 2003


On Friday 15 August 2003 05:21, Hamish wrote:
> I've been thinking about how to do a real-time GRASS/GPS interface.
>
> General idea is to have a GPS feeding NMEA statements into the laptop's
> serial port, and have a program running in the background which parses
> the statement, feeds it through PROJ, and appends the result into a
> site_lists/gps_track file, as well as replacing the single point in a
> site_lists/latest_postion sites file. Lat-Lon, Time, COG, SOG, other GPS
> messages would be written to the site's comments. (or even run r.what
> for that position and use that in the comment string)
>
> e.g.:
>
> d.rast topo
> d.vect contours
> d.sites gps_track color=red size=1
> d.sites latest_position color=red size=3
> d.site.labels latest_position attr=...
>
> then, d.redraw or d.pan should update the track whenever I update the
> monitor.
>
> I suppose you could also have a background process which runs:
> g.region sites=latest_postion
> d.redraw
> every few minutes if you wanted. It could even do a little math so it
> only redraws when latest_postion is outside WIND ...
> I suppose a 5.1-style GUI could be written to control all this..
>
>
> Not very clean, but I think it should work.
>
> I've already written the NMEA parser, output to the sites format is
> trivial, but I'm not sure about how to go about the serial port daemon
> (although I am pretty familiar with RS232 i/o).
>
> Anybody have thoughts or suggestions before I dive into the gpsdrive
> code?

I think that what you described (write to site files + d.sites etc.)
can be easily done in few minutes but it is far from optimal solution.
I would suggest PostGIS as data store (as ready for use solution for
simultaneous read/write access) and QGIS as interface.
It would require some simple extension for vector layer in QGIS
(periodically zoom to vector). QGIS can work with both PostGIS
and GRASS data. GRASS can also access PostGIS data.

Radim




More information about the grass-user mailing list