The physics of making an iPad into an accurate aviation instrument
x-plane.com
x-plane.com
More Austin Meyer goodness: http://www.x-plane.com/x-world/austins_adventures/
Building his own airplane (in incredible detail): http://www.x-plane.com/hardware/evo/evo.html
Incredible in-flight engine failure autoland device: http://www.x-plane.com/hardware/evo/9_seeker/Seeker.html
A rather convincing explanation of why very small jets just don't make sense: http://www.x-plane.com/hardware/evo/0_nojet.html
(Imagine an accelerometer hanging from a rope. If you swing that rope in a circle around your head, the accelerometer will report that the force vector points to its bottom, away from your head, and not down to your feet as gravity alone would indicate.)
Which gets me to the OP. Because the article does not make a single mention of angular momentum (among other reasons), I would guess that the author doesn't understand how gyroscopes work. A gyroscope is essentially a spinning disc-shaped mass that resists change to its axis of rotation. If you built a housing that allowed it freedom of motion in three dimensions (called a gimbal (http://en.wikipedia.org/wiki/Gimbal)), it would remain on its original axis no matter how you tilted its enclosure (barring the inevitable energy loss due to friction, etc.)
So, in the case of an airplane, you would set the disc spinning on level ground. Then, while you're flying, any changes to your pitch or roll would be around the gyroscope (which, remember, is allowed to move freely relative to the cabin). The gyroscope wants to preserve its angular momentum, so it will still be spinning on the same axis relative to level ground. Any difference between the gyro and the cabin therefore indicates the orientation of the plane relative to the ground.
You'd probably get a more concise explanation from the Wikipedia page on Gyroscopes (http://en.wikipedia.org/wiki/Gyroscope). The Wikipedia page on attitude indicators (the visual display for a cockpit gyro) is also quite coherent and less prone to rambling (http://en.wikipedia.org/wiki/Attitude_indicator).
[EDIT: Toned down some grumpiness. I must be tired.]
I've always wondered how the attitude indicator self levels, and the OP's explanation sounds plausible. Next time I go flying I'll have to spend a few minutes in a constant rate turn to see if I can make the attitude indicator drift like he says it should.
Edit to add, here's a link to a youtube video showing the inner working of an AI, including the pendulous vanes, neat:
I've heard that during prolonged banks or pitches, the AI can eventually find a different "level" than the true horizon. I'm trying to find more info into that phenomenon though.
In the mean time, I've found this article that seems to be talking about the same accuracy and drift issues as the original post, but explains the issues with more clarity and also includes sensor graphs and code samples: http://myahrs.wordpress.com/2012/04/24/turning-errors-contin...
The gyroscopes in iDevices only measure rotational acceleration, which is only the second derivative of your orientation, so you need to do a bit more work to extract an (slightly error-prone) orientation out of it.
I'm also curious why he doesn't mention any use of magnetometers, which can give absolute orientation (not just the derivatives). Are the changes in position/elevation too large for airplanes to rely upon the local magnetic field of the earth?
Unless you flew far enough that local level ground is no longer approximately parallel with level ground where you took off.
Far too many hyperbole. Much of this is straightforward when dealing with GPS data. And all the shortcomings of relying on gyro data can be found by searching for dead reckoning systems.
Don't get me wrong, I am very impressed with the x-plane application, but the writing style assumes a complete idiot.
> While on the ground, use the ACCELEROMETERS to see which way is up.
Oh. Yeah, I guess I should have seen that coming.
Still, the more people write this enthusiastically about a topic considered as "mundane" as this by an average "complete idiot", then I'm all for it.
Because despite the writing style, I could feel the excitement in this, and it was worth it for that alone.
And it has made me more excited about this topic.
As others have pointed out, outdoors you would use mostly GPS, and maybe a camera pointing to the ground to estimate the position. Accelerometer are more or less worthless when you want to estimate a translational position of a free flying rigid body. However, orientation can bes estimated very well with the sensors you find in a smartphone. At least outdoors.
The acceleration gives you the orientation of the earth gravity vector, assuming that translational acceleration can be neglected. This information corresponds to pitch and roll in an airplane. The iPad, and most smartphones, also have a magnetometer (digital compass) which gives you the direction of the earth magnetic field and which works reasonably well outdoors. You can combine these two 3D vectors with an iterative algorithm, e.g. QUEST [3] or Madgwicks AHRS [4] to obtain an estimation of your orientation in quaternions. No gyroscope required so far. Usually, the gyroscope is only used to give a more accurate angular velocity and acceleration signal, speed up the orientation estimation and serve as a short term replacement in case of a larger disturbance in acceleration or the magnetic field. A Kalman filter is the most common way to do this.
If you want to play around with these values on your phone I recommend the Sensor Kinetics [5] app for Android, or if you have an iOS device, I believe XSens has an app, too. There is usually need to implement the above method yourself. Most IMU's you can buy of the shelf provide these higher level estimations already.
[1] http://en.wikipedia.org/wiki/MEMS_gyroscope#MEMS_gyroscope [2] http://www.apple.com/ipad/specs/ [3] e.g. EXTENDED QUEST ATTITUDE DETERMINATION FILTERING Mark L. Psiaki 1999 http://www.google.ch/url?sa=t&rct=j&q=&esrc=s... [4] Includes working (tested it myself) Matlab, C and C# code http://www.x-io.co.uk/node/8 [5] https://play.google.com/store/apps/details?id=com.innoventio...
I can think of a few people I'd like to see receive a package from fedex containing a crazed baboon high on crack.
http://xcsoar.org/ https://play.google.com/store/apps/details?id=org.xcsoar
It's designed for sailplane, hang glider and paraglider pilots, and is slowly disrupting the incumbents in this space. Source code is C++.
For example: http://www.mygoflight.com/external-gps/
I do appreciate the layperson's explanation of an attitude system applied to a smartphone/tablet. Many do not realize just how powerful these mobile devices actually are.