Okay, so I've never had any use for routes before, but I'm
planning a trip and wanted to put a route into my Nav Companion
software, so I spent some time reverse-engineering the format
of its route database. The results, unfortunately, don't seem
compatible with GPSBabel, so I'm open to suggestions as to how
we can shoehorn this all in.
For background, Nav Companion is an application that comes with
the Magellan GPS Companion for PalmOS. If you've read the
README.magnav that comes with GPSBabel, you've already seen how
many hoops the poor user ends up having to jump through to get
waypoints into it, because it wasn't designed for external waypoint
exchange. Routes might be even worse, unless we can automate
some of the crap.
Conceptually, a route is pretty simple. It's just a list of
references to waypoints that live in the waypoint database. The
difficulty this presents to GPSBabel, though, is that that means
there are two files that have to be in sync with each other to
specify a route. In addition, of course, all of the non-route
waypoints live in the same waypoint database.
So, because of the fact that the route database references the
waypoint database by uniqueID, the first change that will have
to be made to GPSBabel is to make that uniqueID persist if you
do something like
gpsbabel -i magnav -f foo.pdb -o magnav -F bar.pdb
The second thing that'll have to be done is we'll have to get
a little smarter about the uniqueIDs we generate; we can't just
start with 1 anymore, or merging two databases will result in
no-longer-unique uniqueIDs. I *think* all of this can be handled
relatively easily, perhaps by choosing a starting point at random
when creating new records.
As with the waypoint database, there's only one route database,
too, so we have to be able to merge routes. Here's what the
end user would have to do to import a hypothetical route in
mapsend format without losing his existing data:
gpsbabel -r \
-i magnav,wpts=Companion_Waypoints.PDB -f Companion_Routes.PDB \
-i mapsend -f route.mapsend \
-o magnav,wpts=new_waypoints.pdb -F new_routes.pdb
What I'd like to do is read ALL of the waypoints out of
Companion_Waypoints.PDB, not just the ones that are associated
with routes, and write them all into new_waypoints.pdb, along
with whatever new waypoints come from the mapsend route. I'm
not sure GPSBabel is set up to do this. If I can't add that,
the user then has to remember to
gpsbabel -i magnav -f Companion_Waypoints.PDB -f new_waypoints.pdb \
-x duplicate,shortname -o magnav -F new_waypoints_2.pdb
and hope that they don't get any collisions on uniqueID that
aren't also collisions on shortname.
So, enough rambling... Any thoughts?