Great to see this all going so well. On the question of loop rates. We are have some more work to do before we can increase loop rates above 1k. The attitude controller needs to be broken up so that the rate loops can be run at a faster rate than the attitude loops. This needs some additional filter design work to be done and an input slew function to be implemented. I have done most of this work and will add the slew function in the final step. We will get this done but it requires a significant change in the fast loop structure so it isn’t a change to be taken lightly or rushed.
This is my PID filter changes that add filtering to the rate request to reduce the noise that enters through the EKF and low frequency RC input.
@wicked1 I added the parameter
ACRO_THR_MID to define the mid point of the throttle when using manual throttle modes. This then uses an expo function to smoothly transition through the throttle range. When it is set to 0 it defaults to the hover throttle so you can switch from alt hold to stab without needing to change the throttle position.
@kd0aij Can you go into a little more detail about what you thought looked wrong and what you did in your curves and your thought processes behind them?
@Anubis That is pretty much correct. The expo function is chosen to linearise the thrust curve of the battery/esc/motor/propeller. The equations used are based on the thrust of a propeller driven by a brushless DC motor from a variable voltage source. So the expo equations used are basically the solution to a perfect propeller thrust curve combined with a motor efficiency and RPM range. Then as Anubis said we remove the strongly nonlinear component at the top where the ESC no longer increases thrust (changes from ESC to ESC). The lower end tends to fit this curve very well but we remove that to avoid sync issues and very high current issues with the ESC.
MOT_SPIN_MAX should be used to ensure linear behaviour of the motors to maximise the quality of the tuning.
ACRO_THR_MID should be used to get the desired feel from the throttle when in manual throttle flight modes.
I hope that helps explain my thinking on these parts of the code.