mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
Fixes for master: prevent falling over on simulation start and fix 2nd order filter (#3312)
* prevent falling over on simulation start * Small fix for new inflight filter tuning. --------- Co-authored-by: Ewoud Smeur <e.j.j.smeur@tudelft.nl>
This commit is contained in:
committed by
GitHub
parent
15f95e592b
commit
3d87525cd1
@@ -52,7 +52,7 @@
|
||||
<ground_reactions>
|
||||
<contact type="STRUCTURE" name="CONTACT_FRONT">
|
||||
<location unit="M">
|
||||
<x>-0.15 </x>
|
||||
<x>-0.5 </x>
|
||||
<y> 0 </y>
|
||||
<z>-0.1 </z>
|
||||
</location>
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<contact type="STRUCTURE" name="CONTACT_BACK">
|
||||
<location unit="M">
|
||||
<x> 0.15</x>
|
||||
<x> 0.5</x>
|
||||
<y> 0 </y>
|
||||
<z>-0.1 </z>
|
||||
</location>
|
||||
@@ -85,7 +85,7 @@
|
||||
<contact type="STRUCTURE" name="CONTACT_RIGHT">
|
||||
<location unit="M">
|
||||
<x> 0. </x>
|
||||
<y> 0.15</y>
|
||||
<y> 0.5</y>
|
||||
<z>-0.1 </z>
|
||||
</location>
|
||||
<static_friction> 0.8 </static_friction>
|
||||
@@ -101,7 +101,7 @@
|
||||
<contact type="STRUCTURE" name="CONTACT_LEFT">
|
||||
<location unit="M">
|
||||
<x> 0. </x>
|
||||
<y>-0.15</y>
|
||||
<y>-0.5</y>
|
||||
<z>-0.1 </z>
|
||||
</location>
|
||||
<static_friction> 0.8 </static_friction>
|
||||
|
||||
@@ -448,9 +448,15 @@ void stabilization_indi_update_filt_freq(float freq)
|
||||
stabilization_indi_filter_freq = freq;
|
||||
float tau = 1.0 / (2.0 * M_PI * freq);
|
||||
float sample_time = 1.0 / PERIODIC_FREQUENCY;
|
||||
#if STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
|
||||
init_butterworth_2_low_pass(&rates_filt_so[0], tau, sample_time, stateGetBodyRates_f()->p);
|
||||
init_butterworth_2_low_pass(&rates_filt_so[1], tau, sample_time, stateGetBodyRates_f()->q);
|
||||
init_butterworth_2_low_pass(&rates_filt_so[2], tau, sample_time, stateGetBodyRates_f()->r);
|
||||
#else
|
||||
init_first_order_low_pass(&rates_filt_fo[0], tau, sample_time, stateGetBodyRates_f()->p);
|
||||
init_first_order_low_pass(&rates_filt_fo[1], tau, sample_time, stateGetBodyRates_f()->q);
|
||||
init_first_order_low_pass(&rates_filt_fo[2], tau, sample_time, stateGetBodyRates_f()->r);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user