Thursday, December 1, 2005

MINI Toronto trip Computery Goodness

This Time

while $(/bin/true); do
  timestamp=`date +%y%m%d_%k%M`
  lat_long=`echo "p"|netcat -q 1 localhost 2947|sed 's/GPSD,P=//g'|sed 's/ /_/g'`
  filename=$timestamp"_"$lat_long".jpg"
  echo $filename
  gqcam -t JPEG -s -d /home/jlapenna/trip/photos/$filename -v /dev/video0
  sleep 60
done

to snap a photo every minute and name it $timestamp$latitude$longitude.jpg in a directory of my choosing. I started gpsd using:

gpsd /dev/ttyUSB0

but that does not work on a consistent basis.

To get maps as appropriate, I created three waypoints corresponding to the prime locations we were going to be around in this short trip, chicago, IL; toronto, ON and lansing, MI. I then ran:

gpsfetchmap.pl -w WAYPOINT -sc "5000,15000,30000,50000,200000,500000,3000000" -a 5 --mapserver expedia -u miles -p

replacing WAYPOINT with home (chicago), toronto or lansing

Turns out something fishy happened with the lansing maps so they weren't accurate.

Next time

For next time I will investiage gpsdrive replacements, up to and including the possiblity of running WINE/VMware and a windows application. There are no good choices that I know of for navigation on linux.

Labels: ,

2 Comments:

At 7:54 AM, Anonymous Olivier MenguĂ© said...

There is a simpler (and more right) way to write:
while $(/bin/true); do

Here is it:
while :; do

Explanation: what is important for while is the return code, not the command output. Use of $(/bin/true) means "get the output of /bin/true".
':' is a shell builtin that just return 0 (true) and is equivalent to /bin/true (but different from $(/bin/true)), except it does not start a new process.

 
At 9:57 AM, Blogger Joe LaPenna said...

Thanks Oliver!

 

Post a Comment

Links to this post:

Create a Link

<< Home

The views and opinions expressed in the blog are of Joe LaPenna. Google has nothing to do with these pages.
For information about Google please visit: Google Press Center