(Untitled)

May 05, 2008 09:51

The Summer of James has begun.
I will be leaving Mountain View in the next few hours heading toward Pittsburgh.
If you're bored and want to follow along at home, here's a map of my recent progress:
http://where.jo2y.com/

summer of james

Leave a comment

uberjames May 6 2008, 07:21:15 UTC
I can post more specific details eventually.
On the computer in the car:
I use GPSD, gpspipe and cronolog to create an nmea logs from the gps that is split into a new file every minute.
Then I have a perl script that looks every minute to see if there are any new files that aren't being written to currently. If it finds any, it compresses them, and then uploads them to a server.
On the webserver:
I have another script that looks for new uploads, when one is found, it verifies a sha1sum, then uncompresses it.
For each line in the file, it saves the nmea sentence into a postgresql table specific to that sentence.
I also collect the long and lat from the GPRMC sentences and pass them to Geo::Google::PolylinEncoder. That module takes an array of points, does some math to remove redundant points, then returns an encoded string per these directions. That string is also inserted into the database. It looks like he just released a new version today. I'll need to see if fixes the broken line problems I currently have. In theory all of the lines should all be smooth and connected.
Without the encoded lines, my first day's test was a 4.5MB page that sometimes took 90 seconds to fully draw the lines. The encoded lines dropped that to about 11K.

The actual webpage is a crude php file based mostly on the maps api example they provide when you sign up. I just changed it to php and added the database queries. The later plans involve rewriting it in HTML::Mason.

I also have plan to add images, and some data from the onboard diagnostic port. I have many of the parts for those already, but I just ran out of time.

Reply


Leave a comment

Up