I am working on adding compass support to the upcoming v0.87 libaries for RoboPi.
Currently, I am adding support for HMC6352 and HMC5883L based I2C compass modules in the upcoming v0.87 version of the firmware and libraries.
Two new API calls will be added:
int initCompass(int model, int offset) // model = HMC6352 | HMC5883, offset = difference between true north and magnetic north at current location
int getHeading() // returns 0-359 degrees, -1 means error / not initialized
I don't see any point in supporting fractional degrees, the accuracy of these modules is really only about 2 degrees anyway.
I will consider adding other popular inexpensive compass modules in the future, don't be shy about letting me know which are your favorites (please provide links)