APM_Control: added decay_I() function

used by VTOL planes to decay integrator on fixed wing components when
at very low airspeed
This commit is contained in:
Andrew Tridgell 2019-07-07 11:27:28 +10:00
parent f5bf610b9a
commit 3f765d8bbe
3 changed files with 25 additions and 1 deletions

View File

@ -26,6 +26,14 @@ public:
void reset_I();
/*
reduce the integrator, used when we have a low scale factor in a quadplane hover
*/
void decay_I() {
// this reduces integrator by 95% over 2s
_pid_info.I *= 0.995f;
}
void autotune_start(void) { autotune.start(); }
void autotune_restore(void) { autotune.stop(); }

View File

@ -26,6 +26,14 @@ public:
void reset_I();
/*
reduce the integrator, used when we have a low scale factor in a quadplane hover
*/
void decay_I() {
// this reduces integrator by 95% over 2s
_pid_info.I *= 0.995f;
}
void autotune_start(void) { autotune.start(); }
void autotune_restore(void) { autotune.stop(); }

View File

@ -28,6 +28,14 @@ public:
const DataFlash_Class::PID_Info& get_pid_info(void) const {return _pid_info; }
/*
reduce the integrator, used when we have a low scale factor in a quadplane hover
*/
void decay_I() {
// this reduces integrator by 95% over 2s
_pid_info.I *= 0.995f;
}
static const struct AP_Param::GroupInfo var_info[];
private: