android - How to detect phone orientation relative to direction of movement -
problem: consider android device mounted in vehicle. want measure various things using accelerometer. these measurements should relative vehicle's coordinate system. need figure out how device oriented in relation vehicle. simple solution average "early" acceleration after startup, i'm worried first thing driver leave parking lot or turning left onto road, describing curve. feasible ask user start measuring after getting on road, if there no acceleration @ point?
question: can suggest strategy or algorithm reasonable job of telling how phone oriented in relation vehicle? pointer foss source solves similar problem better.
notes:
- i not want use gps complicate things user.
- we can interact user, example requesting user starts measurements before starting out.
the accelerometer alone not provide sufficient information purpose, hazard: vectors acting upon device, besides vehicle acceleration, vibration of vehicle itself, road inclines, braking , centripetal force turns.
the amount of data sensors due forces impractical aggregate on phone, hence moving averages or other cumulation approaches not give vaguely precise results.
also, lot of acceleration data lost between sensor sampling times, if use highest available sensor rate.
recommendation: use gps or network positioning information, generate moving averages account minor aberrations, , use result.
Comments
Post a Comment