Someone remind me later to properly blog about NYC this past weekend. For now, I'm buried underneath DB migration and bugs.

Last night on my way home, shortly after turning onto VA-234, the passenger rear tire on my trusty Subaru blew out (nothing too violent, but I had to get off the road pretty quick). I made NASCAR like time in changing it (under 10 minutes, judging by the timing of calls to my wife in my call log) and that includes getting the piles of crap out of the cargo area of my car to get AT the spare.

I called SWMBO then, to have her look up a nearby NTB, and thought, "Wait a second! This Garmin Nuvi has information like that in it!" I looked up auto repair near my position, and scrolled down until I found an NTB, and lo-and-behold, one 6 miles, on the same road, in Manassas. I thanked my wife for her valiant efforts, and headed east to get new rubber.

Since we are going to NYC this weekend in the 'ru, and that's gonna be a long trip, I turned down the free "road hazard warranty repair" of plugging the tire, and got two new skins for the rear of the car, and a precision balance (since I'm not a fan of vibration over 70MPH) Within 40 minutes of arriving, I was outta there and on the way home. (The Nuvi did give me some bogus directions that I ignored until it figured it out, but that's okay... I'll forgive poor Karen. She's from the other side of the planet.)

Check out my twitter or brightkite feeds tomorrow to track our progress to the Big Apple ;-)

Two weeks ago, I ordered myself a GPS system. More specifically, I picked the Garmin Nuvi 350, which is NOT a traditional GPS, but a Personal Navigation System. I was mildly disappointed that it did not support the saving or dumping of raw GPS data. After playing with it, and figuring out the basic hacks for it within a few days (I was fully up on it by Thursday, got it on Tuesday) I acquired a "straight GPS" from my buddy Erik. The second device is a Delorme Earthmate USB. This thing is great, and like many devices, has better support in Linux than it does in Windoze.

I got GPSDrive working, talking to gpsd, along with a horribly written BASH script that I fat fingered and failed me this morning. Here's the corrected one:


#!/bin/bash
# $HOME/GPS/scripts/FollowMe.sh
# author: Me!
# last updated: Mon Jul 07 07:19:56 EDT
# abstract: Polls gpsd and sends results to brightkits
# this script is NOT pretty, but it's commented

# start gpsd as root
sudo gpsd -n /dev/ttyUSB0

# create directory for this run's data and define files
DATE=`date +%y%m%d-%H%M%S`
mkdir ~/GPS/$DATE
GPSDUMPFILE=~/GPS/$DATE/dump.nmea
GPSDRIVEFILE=~/GPS/$DATE/dump.gpsdrive
RSLTFILE=~/GPS/$DATE/dump.rslt

# poll gpsd every $INTERVAL minutes
INTERVAL=10

# my shitty while loop
X=1

while [ $X -eq "1" ]
do
# poll gpsd with netcat and output to the nmea dump file
echo r | nc -i 3 localhost 2947 >> $GPSDUMPFILE
# convert the nmea data to simpler gpsdrive data
gpsbabel -i nmea -f $GPSDUMPFILE -o gpsdrive -F $GPSDRIVEFILE
# sample most recent result
CURRENTRESULT=`tail -1 $GPSDRIVEFILE`
# for debugging, echo the result to the terminal and read the result
# with festival
echo $CURRENTRESULT
echo '(SayText "Uploading current location to bright kite dot com '$CURRENTRESULT'")' | festival --pipe
# create the file that will be mailed
echo "@ $CURRENTRESULT" > $RSLTFILE
# mail the file with mutt (keep in mind that your .muttrc will be
# used for this
mutt -b whereami@checkin.com whereami@checkin.com < $RSLTFILE
# i know... bash can do this, but i used bc :-P
sleep `echo "$INTERVAL * 60" | bc -l `
done

# the script is just killed by a C-c


I know, it's not pretty at all, but it works (I think... I only missed the "@" symbol last night in the $RSLTFILE, but I was tired.

Check my twitter and brightkite feeds around 1600 today, and it should be working :-)

Newer Posts Older Posts Home