Browse Source

APM_Control: tweak the activation detection to catch more events

c415-sdk
Andrew Tridgell 4 years ago
parent
commit
767a0b2a99
  1. 2
      libraries/APM_Control/AP_AutoTune.cpp

2
libraries/APM_Control/AP_AutoTune.cpp

@ -203,7 +203,7 @@ void AP_AutoTune::update(AP_Logger::PID_Info &pinfo, float scaler, float angle_e @@ -203,7 +203,7 @@ void AP_AutoTune::update(AP_Logger::PID_Info &pinfo, float scaler, float angle_e
}
// thresholds for when we consider an event to start and end
const float rate_threshold1 = 0.75 * MIN(att_limit_deg / current.tau.get(), current.rmax_pos);
const float rate_threshold1 = 0.6 * MIN(att_limit_deg / current.tau.get(), current.rmax_pos);
const float rate_threshold2 = 0.25 * rate_threshold1;
bool in_att_demand = fabsf(angle_err_deg) >= 0.3 * att_limit_deg;

Loading…
Cancel
Save