mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 18:07:25 +08:00
[INDI] small compile error fix
This commit is contained in:
@@ -309,13 +309,13 @@ void stabilization_indi_set_earth_cmd_i(struct Int32Vect2 *cmd, int32_t heading)
|
||||
static void stabilization_indi_calc_cmd(struct Int32Quat *att_err, bool rate_control, bool in_flight)
|
||||
{
|
||||
|
||||
struct FloatRates rate_ref;
|
||||
if(rate_control) {//Check if we are running the rate controller
|
||||
rate_ref.p = (float)radio_control.values[RADIO_ROLL] / MAX_PPRZ * STABILIZATION_INDI_MAX_RATE;
|
||||
rate_ref.q = (float)radio_control.values[RADIO_PITCH] / MAX_PPRZ * STABILIZATION_INDI_MAX_RATE;
|
||||
rate_ref.r = (float)radio_control.values[RADIO_YAW] / MAX_PPRZ * STABILIZATION_INDI_MAX_RATE;
|
||||
} else {
|
||||
//calculate the virtual control (reference acceleration) based on a PD controller
|
||||
struct FloatRates rate_ref;
|
||||
rate_ref.p = reference_acceleration.err_p * QUAT1_FLOAT_OF_BFP(att_err->qx)
|
||||
/reference_acceleration.rate_p;
|
||||
rate_ref.q = reference_acceleration.err_q * QUAT1_FLOAT_OF_BFP(att_err->qy)
|
||||
|
||||
Reference in New Issue
Block a user