I just wondered why the main loop in the ACM code is only executed at 100Hz
NG code runs at 200Hz (which is slow for a quad)
if you take a look at Aeroquad and Mikrokopter code: they all run at 500Hz
I now that the ADC on APM runs at 400Hz, but I also know that it is capable of 2000Hz readings.
So why not speed the ADC up and let the code run at 200 (or maybe more) Hz ?
Replies
Like Randy and Jason said, we are using DCM others mostly using Kalman and other methods to estimate angles. DCM is much more efficient on those. We have tested on earlier ArduCopter 100Hz and even that gave really good results. Speed up from 100 to 200Hz did not give any great change on stability. Also most of ESCs will filter out updates that are coming faster than 150Hz. So it's rather useless to send updates faster than that to motors.
NG main loop actually runs with 160Hz.
I believe this is at least partially because we use DCM which gives us a quick and accurate estimation of attitude which means we don't need to update as quickly to get stable results. I read somewhere that once you get up to really high rates (like 2000hz) you're updating the instructions to the engines every quarter turn of the prop. It's hard to imagine that that's really necessary... in fact, it's hard to imagine that it's useful to cycle at anything above the update frequency of the gyros and ESCs.