Wednesday Jan 31, 2007

Blackbox GPS Data, Live

It could very well be that I have the "Geek of the Day" award for January 31st. Today I finished getting live data from a Project Blackbox GPS and put it up on the Google Map (above). It took a couple of days to get it right, but here's how it works (in text form).

Each container has a GPS on it. The data from the GPS flows to a fleet management company, Safefreight. The company has a variety of tools for managing fleets of vehicles. Perhaps you didn't realize it, but managing a fleet of trucks and their movements around the country is extremely complex. Every bit of information can help create a more efficient shipping fleet, help manage the costs involved with transportation (one of the largest components of a product's cost), and even create a safer environment for the fleet of trucks through ensuring drivers aren't on the road too much.

Your container with 8 racks of equipment is in good hands.

I use cURL to interact with Safe Freight's secure Web Service. cURL returns a SOAP document to me with the latest logs that were collected. The information includes the temperature, latitude, longitude, speed, and more. I traverse the data using Java's XML capabilities and convert the data to a JavaScript file. I use cURL again to FTP the JavaScript up to my ISP's free web space.

When you hit this blog page, I import the JavaScript containing the container GPS information. I then use the Google Maps API to build a map and put the current Blackbox location and information onto the map.

Some days, I just love my job.

Stay tuned, not only does the GPS data update regularly (typically every 40 minutes unless I have to change machines or shut this or that down), but I'm pretty sure we'll have more posts coming along.

- Paul Monday -

UPDATE: Since I first posted this, I have decided to remove some of the accuracy on the coordinates of the container. So, if you are at one of the roadshows and look at the map and go "Hey, d00d, somethings wrong with the GPS", its actually not a problem with the GPS. You all know how bad traffic can be and all of the gridlock in Menlo Park today, I'm pretty sure, was caused as people tried to get a view of our container based on the map so...in the name of the California traffic, I've removed accuracy to help your traffic situation. And be careful, if you start using this as weather.com, I'll be forced to tweak the temperature too. Thankfully, I put that in Celsius so most of us American's will be like "I didn't think it was THAT cold out".

Add to del.icio.us | Digg this

Technorati Technorati Tags: , , ,

About

pmonday

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today