From 481a53dbafbacb81a031b941d8b8d50cdbf4edf9 Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Tue, 12 Dec 2023 15:49:04 +0100 Subject: [PATCH] [fix] use variable instead of macro for thrust dyn in guidance_indi (#3200) --- sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c b/sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c index 80db82c1cb..259431e600 100644 --- a/sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c +++ b/sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c @@ -84,7 +84,7 @@ static void guidance_indi_filter_thrust(void); #warning GUIDANCE_INDI_THRUST_DYNAMICS is deprecated, use GUIDANCE_INDI_THRUST_DYNAMICS_FREQ instead. #warning "The thrust dynamics are now specified in continuous time with the corner frequency of the first order model!" #warning "define GUIDANCE_INDI_THRUST_DYNAMICS_FREQ in rad/s" -#warning "Use -log(1 - old_number) * PERIODIC_FREQUENCY to compute it from the old value." +#warning "Use -ln(1 - old_number) * PERIODIC_FREQUENCY to compute it from the old value." #endif #ifndef GUIDANCE_INDI_THRUST_DYNAMICS_FREQ @@ -354,7 +354,7 @@ struct StabilizationSetpoint guidance_indi_run_mode(bool in_flight UNUSED, struc void guidance_indi_filter_thrust(void) { // Actuator dynamics - thrust_act = thrust_act + GUIDANCE_INDI_THRUST_DYNAMICS * (thrust_in - thrust_act); + thrust_act = thrust_act + thrust_dyn * (thrust_in - thrust_act); // same filter as for the acceleration update_butterworth_2_low_pass(&thrust_filt, thrust_act);