There should be a way to use GPS to determine direction. I think that's how the compass in tomtom works.
Yes, this has been spoken of in nearly all of the previous posts. Your current GPS location is compared to your previous GPS location, a line is drawn between the two and that is your bearing. (direction)
this is quite true..but what if you combine data from the G-Sensor?
i.e you would have to move a short distance to obtain a GPS bearing hence initialise the compass then (assuming the HD was facing forwards at the time) use rotational data from the G-Sensor to maintain the compass until the next GPS update. Of course this would still only work if the HD was always held by the user in the same orientation????
i am not sure how accurate the G-sensor is or what sort of data it returns?
but the combination of the to could theoretically produce a pseudo-compass
if i get time i may have a play with this theory..i am sure somewhere i have a G-sensor SDK...just need to figure out how to access the GPS,
Can anyone confirm whether the g sensor supports rotational data i.e. when held flat and you turn around?
struggling to find spec on the sensor (only done a quick search)
The G-Sensor is just that, it senses the force of gravity or acceleration in 2 directions, an accelerometer. (AFAIK it is only a 2 axis unit, although it could be a 3 axis but that would seem unneeded) When the phone is laid flat, this is seen as tilt both forward and back along with side to side. When the phone is held upright one directional is maxed out where the other will detect tilt rotation of the phone left and right. (Or swinging of the phone left and right, this part is key to perhaps getting this to work)
The most predominate force, gravity is always down and because of this it is what one would usually use for screen rotation and games.
What you are thinking of is a gyroscopic sensor, a sensor capable of reporting rotational information, which would be very nice however is not included on our device.
However all hope is not lost, our sensor is capable of telling us acceleration in the left or right direction. So if you are holding the phone upright and rotate your body left and right, the acceleration would be recorded by the sensor. One thing you can try, is based on the acceleration and time (start and stop time of the acceleration) use this to try interpret how far the user has rotated themselves. Through some basic physics equations one could ROUGHLY give an idea of how far one has rotated from the predetermined north direction.
Several problems persist through this method, as simply how far the phone is held out from your body can greatly effect the arc length of the rotation resulting in an over / under estimation of the movement based on the acceleration data captured by the G-Sensor.