80 if (_last_t == 0 || dt > 1000) {
91 float delta_time = (float) dt / 1000.0
f;
98 if (fabsf(bank_angle) < 1.5707964f) {
115 float rate_hp_in =
ToDeg(omega_z - rate_offset);
123 _last_rate_hp_in = rate_hp_in;
126 float integ_in = -
_K_I * (
_K_A * accel_y + rate_hp_out);
131 if (!disable_integrator &&
_K_D > 0) {
133 if (aspeed >
float(aspd_min))
149 if (
_K_D < 0.0001
f) {
155 float intLimScaled =
_imax * 0.01f / (
_K_D * scaler * scaler);
virtual const Vector3f & get_gyro(void) const =0
DataFlash_Class::PID_Info _pid_info
static const struct AP_Param::GroupInfo var_info[]
#define AP_GROUPINFO(name, idx, clazz, element, def)
virtual bool airspeed_estimate(float *airspeed_ret) const
int32_t get_servo_out(float scaler, bool disable_integrator)
static auto MAX(const A &one, const B &two) -> decltype(one > two ? one :two)
const AP_Vehicle::FixedWing & aparm
const Vector3f & get_accel(uint8_t i) const
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
float constrain_float(const float amt, const float low, const float high)
AP_InertialSensor & ins()