Hi! 

I was wondering how the ATT data (desired roll, roll, desired pitch, pitch, desired yaw, yaw) in Mission Planner flash logs are calculated? 

I tried to get the same angles using the raw data from IMU (with a complimentary filter). What confused me was that ATT and IMU were updated at different rates (the ATT data is 10 Hz and IMU is 25 Hz), and therefore there is more IMU data than ATT data.

I would really appreciate any insight! 

Views: 154

Reply to This

Replies to This Discussion

As far as I know the recorded rate is not necessarily the rate at which the modules of the firmware communicate with each other. I would look how the logger is configured and possibly (I am not sure if it is the same as with the telemetry on the UARTs) modify it.

You should caution that the log rate is not the same with the actual calculate rate. A complimentary filter can't perform well with only 10 Hz. It should at least be 100 Hz

Thanks for the responses, Armin and Jack!

I've been told that a Kalman filter would work much better than a complimentary filter. Is that true? How much more complicated would it be?

Thanks again!

You are welcome. As usually it depends:-) I am not as much in that topic any more as 10 years ago so I will not really comment on that, but I think it would be great to state what you using (Pixhawk/PX4)? The PX4 software stack uses now an EKF as standard.

Sorry, I am relatively new to the world of quadcopters. I am using Pixhawk with APM v3.5.3 

I understand that the ATT data that I see in my logs were calculated using an EKF. Is there any way for me to see the algorithm that was used? I would like to try to replicate their calculations.  

Thanks!

EKF is short for Extended Kalman Filter, which is the nonlinear version of a linear Kalman Filter.

So you have already what you wanted? In case that didn't answer your question, then you might have to explain a bit more what you do.

I would highly recommend the PX4 flight stack on the Pixhawk if you looking more into depth. I am a fan of the PX4 flight stack (sorry APM guys).

Like Armin said, PX4 code is more suitable for your demand. APM code is transferred from the old AVR based Arduino code. Actually I am using APM code because my old code is for APM 2.6. And it is easy to transfer to pixhawk hardware if I continue using Ardupilot library. The algorithm in APM is located in library folder something like "navEKF". However, I fully recommend you to find some paper and MATLAB code to understand the Kalman Filter

This paper is a classic and has some really great figures in it.

http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf

Thanks, I'll definitely read that paper to get a better understanding of how EKF works.

Does PX4 have many advantages over APM? I know that Matlab recently released a pilot support package where Simulink algorithms can be directly uploaded to PX4. Are there any other significant advantages to using PX4?

On that note, how would I switch my firmware from ATM to PX4?

Thanks again!

Reply to Discussion

RSS

© 2017   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service