2 ms·
...wait, how do you get orientation relative to things around you (rather than just your own previous orientation and gravity) from just gyro/accelerometer data
by tsukikage 8y ago
...wait, how do you get orientation relative to things around you (rather than just your own previous orientation and gravity) from just gyro/accelerometer data + location?
If you do have some source of absolute orientation, like a compass, surely you just use that and don't need the gyro.
- gugagore 8y agoThat's a good question. I suppose it may be possible to use GPS data to estimate the phone's absolute heading. I just took a quick look at https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation https://developer.mozilla.org/en-US/docs/Web/API/Detecting_d..., and it seems to provide orientation, and not angular velocities. So it could also be that browser implementations fuse magnetometer and inertial sensors to produce the orientation estimate. Is there another gyro API?
- deleted 8y ago[deleted]
- jefftk 8y agoMaybe the compass gives you noisy absolute information which is ok, but combined with accurate relative information from the gyroscope and accelerometer is better?