DavidEGrayson / minimu9-ahrs

Program for reading data from the Pololu MinIMU-9 over I²C. Works on the Raspberry Pi and other embedded ARM Linux boards.
Other
167 stars 68 forks source link

AHRS does not compensate for centripetal force #9

Open ssokol opened 11 years ago

ssokol commented 11 years ago

So today I took my minimu9-ahrs-based system up for a test flight and discovered that what looks good sitting at your desk doesn't always work as you expect in the real world. It seems that we need to include some additional processing to compensate for inertial factors like centripetal force. When I turned the plane the IMU initially registered the turn but quickly "leveled out" as the turn was sustained. The accelerometer sensed "down" as being perpendicular to the wings rather than gravity.

A bit of googling indicates that this kind of compensation is required for IMU / AHRS systems in fixed-wing aircraft. Apparently the magnetometer can help by indicating the rate of turn. A GPS can provide groundspeed and change in velocity values that can further assist in the correction. There appears to be several methods for doing this. There's an outline available here: http://wiki.paparazziuav.org/wiki/Subsystem/ahrs

I'm not mathematically literate enough to make my way through the complementary quaternion algorithms. Anyone feel up to the challenge? I'm more than happy to be the test pilot.

DavidEGrayson commented 11 years ago

Hello. The code I wrote was really just to make a cool desktop demo. All the things you mentioned might be good things to try, but I also have a suggestion: in minimu9-ahrs.cpp, try decreasing the value of the variable correction_strength. This will decrease the rate at which the algorithm uses the accelerometer to correct the readings, making the algorithm more dependent on the gyro.

ssokol commented 11 years ago

David,

Thanks. I will give that a try.

-S

On Wed, Jul 3, 2013 at 3:30 PM, David Grayson notifications@github.comwrote:

Hello. The code I wrote was really just to make a cool demo and I did not have a plane to test it in. All the things you mentioned might be good things to try, but I also have a suggestion: in minimu9-ahrs.cpp, try decreasing the value of the variable "correction_strength". This will decrease the rate at which the algorithm uses the accelerometer to correct the readings, making the algorithm more dependent on the gyro.

— Reply to this email directly or view it on GitHubhttps://github.com/DavidEGrayson/minimu9-ahrs/issues/9#issuecomment-20443039 .

Steven Sokol 408 Camelot Drive Liberty, MO 64068

mobile: +1 816-806-8844 fax: +1 816-817-0441

DavidEGrayson commented 10 years ago

I'll probably keep this issue open because it is a nice warning to other people who might try to use this program in a plane.

TilmanGriesel commented 10 years ago

Same problem here, do you solved it @ssokol?