127 if (_last_t == 0 || dt > 1000) {
140 float scaler = 1.0f / speed;
148 yaw_rate_earth *= -1.0f;
150 float rate_error = (desired_rate - yaw_rate_earth) * scaler;
154 float ki_rate =
_K_I *
_tau * 45.0f;
156 float k_ff =
_K_FF * 45.0f;
157 float delta_time = (float)dt * 0.001
f;
164 float integrator_delta = rate_error * ki_rate * delta_time * scaler;
167 integrator_delta =
MAX(integrator_delta , 0);
170 integrator_delta =
MIN(integrator_delta, 0);
179 float intLimScaled =
_imax * 0.01f;
191 float derate_constraint = 4500;
219 float desired_rate =
ToDeg(desired_accel / speed);
237 float desired_rate = angle_err * 0.01f /
_tau;
#define AP_GROUPINFO(name, idx, clazz, element, def)
float get_yaw_rate_earth(void) const
static auto MAX(const A &one, const B &two) -> decltype(one > two ? one :two)
bool is_zero(const T fVal1)
int32_t get_steering_out_lat_accel(float desired_accel)
float constrain_float(const float amt, const float low, const float high)
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
DataFlash_Class::PID_Info _pid_info
int32_t get_steering_out_rate(float desired_rate)
static const struct AP_Param::GroupInfo var_info[]
int32_t get_steering_out_angle_error(int32_t angle_err)