Originally Posted by
Uplinker
Don’t phones also use GPS?
Probably. I know that many of the open-source autopilots for drones do; if you know how fast you're going (ground speed, not airspeed) and how tight the turn is then you can calculate what the expected centripetal acceleration is, subtract that from the measured acceleration, and get a good idea of where gravity is.
As for just using a phone by itself - the algorithms tend to be tuned for the intended application. For use in the air, it would make sense to place a greater reliance on the gyros and lesser reliance on the accelerometers; this will give you more time in a continued turn before the new "gravity" (a combination of real gravity and centripetal acceleration) starts to mess with your readings. The downside is that you'll be more prone to errors from the gyros drifting - but modern gyro drift rates should be pretty low. Getting it down to something approaching 0.05deg/s should be practical even with the sensors in a phone (ie selected for price, size, and power consumption - not accuracy) and that gives you a few minutes with the horizon mostly showing sensible data before the accelerometers have any significant effect.