Thread
:
digital compass on n900
View Single Post
Hamzeh
2010-09-30 , 21:52
Posts: 9 | Thanked: 1 time | Joined on Apr 2010
#
29
I have an idea which I think will work for "emulating" compass functionality on the N900. Here is how it would work:
Using the date, time, and GPS coordinates, the app should be able to know where the sun or moon is located in the sky and their direction on a compass.
With GPS turned on and the date and time set correctly, the user can point to the sun during the day, or the north pole star (or moon) during the night.
The app should now be able to know which direction on the compass the user is holding the phone to. Consider this the user calibrating or setting/resetting the "compass" app.
From that point on, the app uses information from the phone's hardware (GPS and accelerometer) to update the "compass" information as the user moves the phone around.
If the accelerometer works the way I understand it works from this page (
http://wiki.forum.nokia.com/index.ph..._N900_using_Qt
), then this should work pretty well, shouldn't it?
EDIT: After playing with the AccDisplay app, I don't think the accelerometer will help keep track of the orientation. The accelerometer can detect all movements and orientation except for rotations around the z-axis because that's the same access gravity pulls at! Unfortunately, that's exactly the kind of rotation you'd need in a compass application
I guess the only remaining solution is the information from the GPS hardware, which relies on phone movement, but that only tells you the direction the phone is moving in, not necessarily where it's oriented. Big bummer
Hamzeh
Last edited by Hamzeh; 2010-09-30 at
22:11
.
Quote & Reply
|
Hamzeh
View Public Profile
Send a private message to Hamzeh
Find all posts by Hamzeh