Monday, December 28, 2009

Annotating Waypoints, partially solved

I have been fretting about the problem of annotating way points for a decade. The general issue is that I wander around a place,and I mark points of personal interest. And later I don't know why I marked a place 'Pieta' or 'aslice.'

I have a long rant about this, but the main problem seems to be that the 'artistic' side of my brain knew that the system I had didn't work, but was not able to articulate that back to the 'engineer' side to let me just solve it.

The trick is to have a repository of points which you trust, and then to merge in new points, and to add annotations to those points.

I made a small script with GPSBabel. It handles most cases. Patches and suggestions welcome.
The key is a 'repository' of waypoints, in a GPX file, and then I merge that file with the GPS using the GPSBabel filter duplicates command.

# save the current 'repository' of waypoints in version control.
sudo svn commit -m "automatic commit before merging new waypoints from GPS" netbook_annotated.gpx
# Merge master file with the GPS. deduplicate
sudo gpsbabel -i gpx -f netbook_annotated.gpx -i garmin -f usb: \
-x duplicate,shortname,location -o gpx -F netbook_annotated.gpx
sudo chown rich:rich netbook_annotated.gpx
echo now edit netbook_annotated.gpx and write it back to the GPS
sudo vi netbook_annotated.gpx
echo temporarilly not writing back to GPS.
#sudo gpsbabel -i gpx -f netbook_annotated.gpx -o garmin -F usb:

Here is a sample waypoint in GPX Format

27-DEC-09 6:58:05PM Where the u2 karlsplatz line comes out
27-DEC-09 6:58:05PM
Flag, Blue

The key for my Garmin GPSmap 60CSx is that the cmt field does get written back to the GPS by GPSBabel, but if it is too long it will be abbreviates.

I have some waypoints where I seem to have done something wrong in editing the name field, and GPS babel attempts to shorten the name and thus generates new waypoints. I am working on that.

Also, I should take the date out of the desc field and reformat it in a proper GPX time field.

But for right now I am able to comfortably sit at the Ubahn station with a train which won't arrive for 4 minutes, connect my GPS to the netbook, import the waypoints, add annotations to them, and usually even pull my most recent track log in and look at them both in Google Earth.

In four minutes while waiting for a subway.

The next big challenge: how do I annotate track logs in a reasonable fashion? How do I mark the spot where we turned wrong and ran into a new adventure?

No comments:

Post a Comment