When I started bicycling a week or so ago, I wanted to use a site like MotionBased to track my rides. MotionBased is owned by Garmin, so it's not a surprise that it doesn't handle Magellan's MapSend track format natively. Fine, no problem, I'll convert to GPX first and then upload my track.
MotionBased managed to mangle horribly each track that I uploaded. I verified that the GPX files were correct, but still, hate from MotionBased. Meh.
So, I searched for an alternative site. All of them favor or support only Garmin. Grumpy as I am, I said, "Fine. I'll come up with my own thing." Here's what I'm using to generate the maps on this weblog.
GPS Visualizer is a very powerful site for handling GPS data. I started using the map form to generate PNGs for my posts, and was happy with the result. The problem was remembering the options I used each time.
I rooted through the web form, and came up with a URL that would give me the same results each time.
http://www.gpsvisualizer.com/map?output&format=png&width=400&height=auto&margin=40&units=us&bg_map=demis_usa&bg_opacity=70&connect_segments=1&trk_name=0&trk_colorize=speed&remote_data=http://homemachine.feep.org/~josh/gps/biking/20070728.trk
Since I was using GPSBabel to acquire the track from my GPS device, I thought that it was probably the time to put everything in a script.
I'll spare you the entire script, but the important parts follow.
Acquiring the track, putting it in a web-accessible location so that GPS Visualizer can load it up:
gpsbabel -t -i magellan,baud=19200 -f /dev/ttyUSB0 \
-o mapsend -F ~/public_html/gps/biking/20070728.trk
Generating a PNG map using GPS Visualizer:
wget -q -r -l1 -nd -np -A.png --user-agent="" \
"http://www.gpsvisualizer.com/map?output&format=png&width=400&height=auto&margin=40&units=us&bg_map=demis_usa&bg_opacity=70&connect_segments=1&trk_name=0&trk_colorize=speed&remote_data=http://homemachine.feep.org/~josh/gps/biking/20070827.trk"
I then take the resulting PNG in the current directory and upload it to the web server.
Of course, the script does more things, like date handling and error checking, but the snippets above are the useful parts. And now I can avoid buying a new fitness GPS device. Maybe.