Cloned from http://code.google.com/p/open-headtracker/