Skip to content

Commit

Permalink
filtering shorter and cleaner notation
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Nov 14, 2023
1 parent 7c68b79 commit b7bf55a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sw/airborne/modules/rot_wing_drone/rot_wing_automation.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,8 @@ void update_wind_vector(void)
VECT2_DIFF(rot_wing_a.windvect, *groundspeed, airspeed_v);

// Filter the wind
update_butterworth_2_low_pass(&rot_wing_automation_wind_filter[0], rot_wing_a.windvect.x);
update_butterworth_2_low_pass(&rot_wing_automation_wind_filter[1], rot_wing_a.windvect.y);

// Update the filtered wind vector
rot_wing_a.windvect_f.x = rot_wing_automation_wind_filter[0].o[0];
rot_wing_a.windvect_f.y = rot_wing_automation_wind_filter[1].o[0];
rot_wing_a.windvect_f.x = update_butterworth_2_low_pass(&rot_wing_automation_wind_filter[0], rot_wing_a.windvect.x);
rot_wing_a.windvect_f.x = update_butterworth_2_low_pass(&rot_wing_automation_wind_filter[1], rot_wing_a.windvect.y);
}

// Function to visualize from flightplan, call repeadely
Expand Down

0 comments on commit b7bf55a

Please sign in to comment.