Thursday, March 24, 2011

Weekend Hack: Adding an Auxiliary Input to VW Radio with Satellite and iPod Adapter

I've bought cars over the internet for the past decade without ever seeing then, so when I bought a 2009 VW Jetta TDI with an iPod adapter I thought, "that would be a nice option." However, VW's iPod interface is terrible. For example, albums and playlists are treated as CDs and even basic mp3 tags such as album or song names are displayed as Folder N or Track N. The iPod option also removes the auxiliary audio input. After trying to hack an auxiliary input on to the iPod adapter and failing because the the adapter needs an iPod attached to work, I decided to try a different route.
The car came with a Sirius satellite radio (pre XM acquisition) that I don't use for a number of reasons, but mainly because Sirius pissed me off with the way they handled pre-merger XM contracts. It occurred to me that I could use the satellite radio audio output as an auxiliary input.

The satellite radio box is mounted in the trunk. The speaker outputs from the radio are on a plug with a group of three purple wires and two orange striped wires.
I originally thought about running a line with 3.5mm mini stereo plug to the center console, but I decided to add a blue tooth receiver instead. This offers more flexibility and I can play music from multiple devices including Pandora on my Android phone.

Parts list:
Bluelink Bluetooth Music Receiver
USB Car Charger
A to A USB Cable

The Bluelink Bluetooth Music receiver is an inexpensive bluetooth receiver that can run on either 110 volts or through a USB cable. The Jetta has a convenient 12 volt socket in the trunk so the Bluelink can be powered with a USB car charger connected via a male A to A USB cable.
The Bluelink comes with a 3.5mm mini stereo to RCA cable which I used to make a new cable connecting the audio wires fron the satellite radio to the Bluelink input.
The wiring schematic from the satellite radio is:
  • purple w/ blue stripe > ground (black)
  • purple w/ white stripe > right channel (red)
  • purple w/ green stripe > left channel (white)
After the wires were soldered, they were covered with heat shrink tubing and wire connectors were added. I've found that electronics in cars are constantly vibrating and using connectors improves the reliability of the installation.

The Bluelink was ziptied to the rear deck frame and the cable from the satellite radio and USB power cable were tucked away and ziptied as needed.

Wednesday, March 23, 2011

Install script for the OpenGeo Suite Community Edition on Ubuntu

OpenGeo released a packaged version of the OpenGeo Suite that can be installed through apt or yum. The install requires some familiarity with Linux, which maybe a barrier if you are coming from the Windows world. I've posted an install script for OpenGeo Suite Community Edition with the Apache2 proxy configured. The script is available on gist

The script does the following:

  • update the list of repositories to include OpenGeo's repository
  • install the OpenGeo Suite Community Edition
  • install apache2
  • configure apache2 to proxy the Suite web applications to port 80 

The script was tested on Ubuntu Desktop 10.10 Desktop and the Canonical Ubuntu 10.10 64-bit AMI ami-cef405a7.

Sunday, March 20, 2011

How-To: Spatial and Ruby on OSX

Notes on getting started using Ruby and rgeo on OSX to manipulate spatial data. 

1. Download and install ruby 1.92
$ curl -o ruby-1.9.2-p180.tar.gz 
$ tar xvfz ruby-1.9.2-p180.tar.gz
$ cd ruby-1.9.2-p180
$ ./configure
$ make
$ sudo make install
2. Download and install homebrew package manager
$ ruby -e "$(curl -fsSLk"
3. Download and install geos and proj libraries. The ruby gem rgeo requires geos and proj. While it is possible to build rgeo against  the Kyng Chaos Frameworks, it's far easier to install these libraries using brew.
$ brew install geos
$ brew intall proj
4. Install rgeo. RGeo is a ruby gem based on the OGC Simple Features Specification.
$ sudo gem install rgeo
5. Install supporting rgeo gems.
$ sudo gem install dbf
$ sudo gem install rgeo-shapefile
$ gem install pg
$ gem install rgeo-activerecord
$ gem install activerecord-postgis-adapter
$ gem install rgeo-geojson

Thursday, March 10, 2011

Overcome by Events: Chicago Tribune shows how to map

Clint Waggoner1 (an old boss) once told me, "If you wait just a little bit longer, things tend to resolve themselves." After saying WMS is OBE and baiting people with the #WMSisdead hashtag on Twitter, I felt that I should prove my point by using the tools I mentioned and documenting the process to create custom tiles and display them on the web. 

Project deadlines, a long weekend at the beach, telecons, and a cruise to Cozumel :) resulted in putting it off. As usual Clint was right.

The Chicago Tribune published a five part series on how to make custom maps using PostGIS, TileMill, Mapnik and display it on Google maps. Their code is also available on github.

1I have undying respect for Clint because he used to dynamically allocate memory by wiring magnetic-core memory as his program was running. He did this on a PDP11. In a sub. Next to a nuclear reactor.

Wednesday, March 2, 2011

and the shift away from W*S architecture continues

On the Safe blog, Paul Nalos writes about Iowa DOT's data publishing strategy:
Second – and this is where it gets really interesting – they presented an approach where multiple data sources are fused together in the visualization stage. The idea is that it is easier to query multiple data sources (e.g., using web services) in the visualization layer than to keep composite or centralized data stores in sync. Merging data this late in the game likely doesn’t make sense in all cases (e.g., if complex analysis or transformation is required), but the basic advantages are clear: users benefit from an integrated display of data in one system when they would previously have consulted two.
"An integrated display of data" sounds a lot like a tile cache.