Greets, since we were trying to figure out what’s the relationship between RMSRollP and P gain we set, we put the RMSRollP value in the previous time into the formula, the calculation didn’t fit as current rms value.
In that case, we are wondering that
- Where the rms update for every time stamps? and How?
- What could also be infered from the parameter in CTRL?
The formula path is “libraries/AC_AttitudeControl/ControlMonitor.cpp”
The function is as following,
void AC_AttitudeControl::control_monitor_filter_pid(float value, float &rms)
{
const float filter_constant = 0.99f;
// we don’t do the sqrt() here as it is quite expensive. That is
// done when reporting a result
rms = filter_constant * rms + (1.0f - filter_constant) * sq(value);
}
Thanks for all your patience!!