Also, do you know if integrator reset is called during mode changes? (e.g. changing between manual flight and stabilized flight mode). At the moment, the code only resets the integrator in FixedwingPositionControl.cpp and only during takeoff and not mode switches.
Shouldn’t it reset during mode switches? If there is a long time between mode changes (e.g. stabilized -> manual -> stabilized), the integrator still contains previous accumulated error terms from the first stabilized flight segment which has probably no relation to the current stabilized flight segment.
I deal primarily with manual and stabilized mode (for my own implementation), I’m not sure if a integrator_reset affects other operation modes (e.g position_control etc).
These ECL controllers in fw_att_control are always running and active except in manual mode. Right now pure manual mode happens to pass through the attitude controller, but should probably bypass it entirely. When switching between stabilized, altitude control, position, or full auto we don’t need to worry about the reset.