Hi menion,
In my previous post, I suggested a method to make the Roll and Pitch display more meaningful when the phone is not help 'flat', e.g. somewhat upright in a car cradle. However, this method now appears quite complicated and perhaps cumbersome to use and implement, because I found that the phone, when fitted to a car cradle, is basically upright (90 deg) and square to the car.
I also found that the roll display can get 'confused' in this orientation and sometimes shows 180 degree roll - perhaps a different axis of the sensor needs to be used in that orienation.
It may therefore be a simple matter of using the phone's direction to automatically switch to different axes of the sensors and add offsets as multiples of 90 degrees to show 0 degrees pitch and roll when the phone is held 'straight' upright. A filter would be good to prevent intermittent switching on a bumpy track.
An option to switch the display from 0...360 to -180...+180 would still be good, as explained in my previous post.
Such an improved display would be useful for offroad driving, where the vehicle can assume quite steep angles. Many (expensive) 4WDs have built-in roll and pitch indicators - mine hasn't.
Thanks
In my previous post, I suggested a method to make the Roll and Pitch display more meaningful when the phone is not help 'flat', e.g. somewhat upright in a car cradle. However, this method now appears quite complicated and perhaps cumbersome to use and implement, because I found that the phone, when fitted to a car cradle, is basically upright (90 deg) and square to the car.
I also found that the roll display can get 'confused' in this orientation and sometimes shows 180 degree roll - perhaps a different axis of the sensor needs to be used in that orienation.
It may therefore be a simple matter of using the phone's direction to automatically switch to different axes of the sensors and add offsets as multiples of 90 degrees to show 0 degrees pitch and roll when the phone is held 'straight' upright. A filter would be good to prevent intermittent switching on a bumpy track.
An option to switch the display from 0...360 to -180...+180 would still be good, as explained in my previous post.
Such an improved display would be useful for offroad driving, where the vehicle can assume quite steep angles. Many (expensive) 4WDs have built-in roll and pitch indicators - mine hasn't.
Thanks