mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
better initialization guidance_indi (#2063)
This commit is contained in:
committed by
Gautier Hattenberger
parent
4fa4a6effd
commit
f1f43d47f9
@@ -107,17 +107,17 @@ static void guidance_indi_calcG(struct FloatMat33 *Gmat);
|
|||||||
* Call upon entering indi guidance
|
* Call upon entering indi guidance
|
||||||
*/
|
*/
|
||||||
void guidance_indi_enter(void) {
|
void guidance_indi_enter(void) {
|
||||||
thrust_in = 0.0;
|
thrust_in = stabilization_cmd[COMMAND_THRUST];
|
||||||
thrust_act = 0;
|
thrust_act = thrust_in;
|
||||||
|
|
||||||
float tau = 1.0/(2.0*M_PI*filter_cutoff);
|
float tau = 1.0/(2.0*M_PI*filter_cutoff);
|
||||||
float sample_time = 1.0/PERIODIC_FREQUENCY;
|
float sample_time = 1.0/PERIODIC_FREQUENCY;
|
||||||
for(int8_t i=0; i<3; i++) {
|
for(int8_t i=0; i<3; i++) {
|
||||||
init_butterworth_2_low_pass(&filt_accel_ned[i], tau, sample_time, 0.0);
|
init_butterworth_2_low_pass(&filt_accel_ned[i], tau, sample_time, 0.0);
|
||||||
}
|
}
|
||||||
init_butterworth_2_low_pass(&roll_filt, tau, sample_time, 0.0);
|
init_butterworth_2_low_pass(&roll_filt, tau, sample_time, stateGetNedToBodyEulers_f()->phi);
|
||||||
init_butterworth_2_low_pass(&pitch_filt, tau, sample_time, 0.0);
|
init_butterworth_2_low_pass(&pitch_filt, tau, sample_time, stateGetNedToBodyEulers_f()->theta);
|
||||||
init_butterworth_2_low_pass(&thrust_filt, tau, sample_time, 0.0);
|
init_butterworth_2_low_pass(&thrust_filt, tau, sample_time, thrust_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user