Skip to content

Commit

Permalink
[fix] use variable instead of macro for thrust dyn in guidance_indi (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Dec 12, 2023
1 parent 864cfba commit 481a53d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 481a53d

Please sign in to comment.