Question about integrating ArduIMU with Paparazzi

I am in a group working on Paparazzi. For my 48" Delta wing airframes, I have been using the thermopiles for a while which actually prevent me from getting my project going. So I turned to low cost IMU and Ardu is the very first choice. So far I have made the Ardu+Ublox configuration work with Paparazzi autopilot and it looks great on the ground, and I have done several flight tests.
         But when I flew it,the IMU data got distorted, basically in Paparazzi Auto1 mode (which means the UAV is supposed to fly straight and keep the same altitude without any control input from the safety pilot), the plane will turn left itself, and when the safety pilot tries to turn it, the plane will descend and almost get into tip stall situation.
          I am thinking it is because how I set up the timer for the IMU and GPS. I am not using the newest ArduIMU 1.8.1 code because there are some stuff I don't need (like the air pressure sensor and compass). I am also trying to understand the new DCM code so right now I am still using the
ArduIMUV2_DCM_V10 as my base code and I adopted the GPS parsing part from the 1.8.1 version. However, what I found was very strange, the ID NAV-POSLLH (longitude, latitude,etc) and ID NAV-STATUS (Receiver navigation status) able to update at 4Hz but ID NAV-SOL (Navigation solution information) and ID NAV-VELNED (ground speed, course) can not be updated at 4Hz when I set the millis()-timerDecGPS)>=250 (I checked the update of iTOW for both class and they are different, sometimes the iTOW for NAV-VELNED just remains constant or updates randomly). I also check the version 1.8.1 and it does the same thing, so I am wondering whether anybody here experience similar problem and have any comments.
        Because I used the version ArduIMUV2_DCM_V10, the filter and parsings are using different timers. I also noticed that when I separated the loop function for the DCM filter(50Hz), parsing IMU(50Hz) and parsing GPS (4Hz), the parsing IMU updating rate got affected and probably so does the filter function, which cause the flight performance very unstable. So I am wondering whether I should use the version 1.8.1's loop function since it looks more reasonable to me.
        Thanks for any inputs on these problems.

Views: 209

Reply to This

Replies to This Discussion

So just to be clear, your two questions are:

1) Why is the uBlox ground speed not updated at 4Hz?
2) When you fiddle with the ArduIMU DCM code, the timing gets messed up. Would that be better in 1.8.x?

I can't answer either of them, but perhaps the core dev team can. I know that the DCM libraries have been updated recently, so you might want to check with Doug Weibel about that and follow the progress in the SVN repositories.
Thanks, Chris. Yes the first question is uBlox ground speed, heading, down velocity can not be updated at 4Hz while the longitude, latitude, etc can. The timing for version 1.8.1 is also strange because it decodes the GPS at 8Hz but send them at 50Hz, and I don't quite understand this. I set up some messages can record the timings for IMU and GPS on Paparazzi while it receives the data from Ardu IMU, the version (ArduIMUV2_DCM_V10 + same GPS parsing code from 1.8.1) can almost guarantee GPS updates at 4Hz, IMU updates at 50Hz, but the version 1.8.1 can not guarantee those, the timings are really random.
Hi Dee,

Have I answered your questions by PM, or do you still have questions?
Thanks, Doug, you have answered my questions. But I am still curious about how different is the new DCM code (1.8.1) compared with the version ArduIMUV2_DCM_V10, because from my flight test, it didn't improve much, maybe it is still because the timer setting I have caused the filter couldn't run correctly.
The DCM algorithm is basically the same. The difference is just in using libraries for the gps and magnetometers.

We are migrating lots of pieces of code into libraries so that they are easier to maintain across all of the "products".

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service