Support for GPS reference direction

Other small changes to support this