This might sound really, really stupid, but since the n900 has GPS on it, why not just use the GPS as a compass? As long as it can get a 3D lock, it can tell you what direction you're facing. Even my Garmin can do that.