[OSM-talk] GPSBabel scripts -Was: Re: GPSBabel screenshots
Robert Scott
lists at riscott.ukfsn.org
Thu Sep 7 18:44:33 BST 2006
On Thursday 07 September 2006 17:30, Ed Davies wrote:
> Funny, mine's pretty similar:
>
> #!/bin/sh
> PORT=/dev/ttyS0
> TARGET=~/projects/gpslogs
> STAMP=`date --utc +%Y%m%dT%H%M`
> echo Stamp $STAMP
> echo Reading waypoints...
> gpsbabel -i garmin -f $PORT -o gpx -F "$TARGET/${STAMP}waypoint.gpx"
> echo Reading tracklogs...
> gpsbabel -t -i garmin -f $PORT -o gpx -F "$TARGET/${STAMP}tracklog.gpx"
I clean up my traces with gpsman first, which is a wierd tcl application that
doesn't follow the normal unix rules, so I have to play a few games to get it
to launch gpsbabel at the end. I have still yet to figure out how to open a
gpx file in gpsman from the command line, so that's still manual. I also send
a poweroff command to the etrex at the end so I can go and do something else
without worrying about the batteries.
#!/bin/bash
GPSMANDIR=$HOME"/junk/gpsman-6.2.1"
GPSMANBIN="gpsman.tcl"
BASEDIR=$HOME"/geotracks"
DATESTAMP=${2:-`date +%Y%m%d`}
mkdir ${BASEDIR}/${DATESTAMP}
gpsbabel -t -i garmin -f /dev/tts/1 -o gpx -F
${BASEDIR}/${DATESTAMP}/${DATESTAMP}-${1:-"none"}.gpx
gpsbabel -i garmin,power_off -f /dev/tts/1
cd $GPSMANDIR
./$GPSMANBIN
robert.
More information about the talk
mailing list