[fix] cleanup make all conf airframes (#3127)

* cleanup all conf airframes

* docs update
This commit is contained in:
Christophe De Wagter
2023-10-04 08:21:19 +02:00
committed by GitHub
parent 4c848665d7
commit db4c67d64a
21 changed files with 73 additions and 71 deletions
+3 -3
View File
@@ -40,7 +40,7 @@
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_float_invariant.xml modules/nav_basic_rotorcraft.xml modules/stabilization_indi.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_float_invariant.xml modules/logger_sd_chibios.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml"
gui_color="#ffff7f7f0000"
/>
<aircraft
@@ -117,7 +117,7 @@
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/filter_1euro_imu.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/jevois.xml modules/logger_sd_chibios.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml modules/tag_tracking.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/electrical.xml modules/filter_1euro_imu.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/jevois.xml modules/logger_sd_chibios.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml modules/tag_tracking.xml"
gui_color="#3ce8d771db45"
/>
<aircraft
@@ -139,7 +139,7 @@
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/competitions/IMAV2022_drop.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/jevois.xml modules/logger_sd_chibios.xml modules/nav_basic_rotorcraft.xml modules/nav_survey_poly_rotorcraft.xml modules/stabilization_indi.xml modules/switch_servo.xml modules/tag_tracking.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/jevois.xml modules/logger_sd_chibios.xml modules/nav_rotorcraft.xml modules/nav_survey_poly_rotorcraft.xml modules/stabilization_indi.xml modules/switch_servo.xml modules/tag_tracking.xml"
gui_color="#c6d33e3ef958"
/>
<aircraft
+4 -1
View File
@@ -84,7 +84,10 @@
<module name="gps" type="ublox">
<configure name="GPS_BAUD" value="B115200"/>
</module>
<module name="stabilization" type="indi"/>
<module name="stabilization" type="indi">
<define name="WLS_N_U" value="4"/>
<define name="WLS_N_V" value="4"/>
</module>
<module name="guidance" type="indi">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.2"/>
@@ -46,7 +46,10 @@
<define name="USE_GPS_UBX_RTCM" value="TRUE"/>
</module>
<module name="stabilization" type="indi"/>
<module name="stabilization" type="indi">
<define name="WLS_N_U" value="4" />
<define name="WLS_N_V" value="4" />
</module>
<module name="guidance" type="indi">
<define name="GUIDANCE_INDI_SPECIFIC_FORCE_GAIN" value="-500.0"/>
<define name="GUIDANCE_INDI_THRUST_DYNAMICS" value="0.03"/>
+4 -1
View File
@@ -44,7 +44,10 @@
<configure name="GPS_BAUD" value="B115200"/>
</module>
<module name="stabilization" type="indi"/>
<module name="stabilization" type="indi">
<define name="WLS_N_U" value="4" />
<define name="WLS_N_V" value="4" />
</module>
<module name="guidance" type="indi">
<define name="GUIDANCE_INDI_SPEED_GAIN" value="3.0"/>
<define name="GUIDANCE_INDI_SPECIFIC_FORCE_GAIN" value="-500.0"/>
@@ -48,7 +48,10 @@
<define name="USE_GPS_UBX_RTCM" value="TRUE"/>
</module>
<module name="stabilization" type="indi"/>
<module name="stabilization" type="indi">
<define name="WLS_N_U" value="4" />
<define name="WLS_N_V" value="4" />
</module>
<module name="guidance" type="indi">
<define name="GUIDANCE_INDI_SPECIFIC_FORCE_GAIN" value="-500.0"/>
<define name="GUIDANCE_INDI_THRUST_DYNAMICS" value="0.03"/>
@@ -34,6 +34,8 @@
<define name="GUIDANCE_INDI_SPECIFIC_FORCE_GAIN" value="-500.0"/>
<define name="GUIDANCE_INDI_THRUST_DYNAMICS" value="0.1"/>
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="WLS_N_U" value="4"/>
<define name="WLS_N_V" value="4"/>
</module>
<module name="geo_mag"/>
@@ -18,6 +18,8 @@
<module name="imu" type="bebop"/>
<module name="gps" type="datalink"/>
<module name="stabilization" type="indi">
<define name="WLS_N_U" value="4"/>
<define name="WLS_N_V" value="4"/>
<define name="INDI_RPM_FEEDBACK" value="TRUE"/>
</module>
<module name="ahrs" type="int_cmpl_quat">
+2
View File
@@ -289,6 +289,8 @@
</module>
<module name="stabilization" type="indi">
<define name="INDI_THRUST_ON_PITCH_EFF" value="23.0"/>
<define name="WLS_N_U" value="4" />
<define name="WLS_N_V" value="4" />
</module>
<module name="guidance" type="indi_hybrid">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
@@ -56,7 +56,9 @@
<module name="actuators" type="disco"/>
<!--<module name="control" type="new"/>-->
<module name="stabilization" type="indi">
<configure name="INDI_NUM_ACT" value="3"/>
<define name="WLS_N_U" value="4"/>
<define name="WLS_N_V" value="4"/>
<configure name="INDI_NUM_ACT" value="3"/>
</module>
<module name="guidance" type="indi_hybrid"/>
<!--<module name="sonar_bebop">
@@ -81,13 +83,6 @@
<axis name="YAW" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THRUST" value="@THROTTLE"/>
<set command="ROLL" value="@ROLL"/>
<set command="PITCH" value="@PITCH"/>
<set command="YAW" value="@YAW"/>
</rc_commands>
<section name="MIXER">
<define name="AILEVON_AILERON_RATE" value="0.75"/>
<define name="AILEVON_ELEVATOR_RATE" value="0.75"/>
+2
View File
@@ -20,6 +20,8 @@
<module name="gps" type="datalink"/>
<module name="stabilization" type="indi">
<define name="INDI_RPM_FEEDBACK" value="TRUE"/>
<define name="WLS_N_U" value="4"/>
<define name="WLS_N_V" value="4"/>
</module>
<module name="stabilization" type="rate_indi"/>
<module name="ahrs" type="int_cmpl_quat">
+1 -7
View File
@@ -111,6 +111,7 @@
<module name="stabilization" type="indi">
<configure name="INDI_NUM_ACT" value="8"/>
<define name="WLS_N_U" value="8"/>
<define name="WLS_N_V" value="4"/>
<define name="TILT_TWIST_CTRL" value="TRUE"/>
</module>
<module name="stabilization" type="rate_indi"/>
@@ -214,13 +215,6 @@
<axis name="THRUST" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THRUST" value="@THROTTLE" />
<set command="ROLL" value="@YAW" />
<set command="PITCH" value="@PITCH/2" />
<set command="YAW" value="-@ROLL/4" />
</rc_commands>
<section name="MIXING" prefix="MOTOR_MIXING_">
<!-- frontleft left (CCW), frontleft mid (CW), frontleft right (CCW), frontright left (CW), frontright mid (CCW), frontright right (CW) -->
<!-- backleft left (CW), backleft mid (CCW), backleft right (CW), backright left (CCW), backright mid (CW), backright right (CCW) -->
+1 -7
View File
@@ -107,6 +107,7 @@
<module name="stabilization" type="indi">
<configure name="INDI_NUM_ACT" value="8"/>
<define name="WLS_N_U" value="8"/>
<define name="WLS_N_V" value="4"/>
<define name="TILT_TWIST_CTRL" value="TRUE"/>
</module>
<module name="stabilization" type="rate_indi"/>
@@ -195,13 +196,6 @@
<axis name="THRUST" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THRUST" value="@THROTTLE" />
<set command="ROLL" value="@YAW" />
<set command="PITCH" value="@PITCH/2" />
<set command="YAW" value="-@ROLL/4" />
</rc_commands>
<section name="MIXING" prefix="MOTOR_MIXING_">
<!-- frontleft left (CCW), frontleft mid (CW), frontleft right (CCW), frontright left (CW), frontright mid (CCW), frontright right (CW) -->
<!-- backleft left (CW), backleft mid (CCW), backleft right (CW), backright left (CCW), backright mid (CW), backright right (CCW) -->
+1 -7
View File
@@ -107,6 +107,7 @@
<module name="stabilization" type="indi">
<configure name="INDI_NUM_ACT" value="8"/>
<define name="WLS_N_U" value="8"/>
<define name="WLS_N_V" value="4"/>
<define name="TILT_TWIST_CTRL" value="TRUE"/>
</module>
<module name="stabilization" type="rate_indi"/>
@@ -195,13 +196,6 @@
<axis name="THRUST" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THRUST" value="@THROTTLE" />
<set command="ROLL" value="@YAW" />
<set command="PITCH" value="@PITCH/2" />
<set command="YAW" value="-@ROLL/4" />
</rc_commands>
<section name="MIXING" prefix="MOTOR_MIXING_">
<!-- frontleft left (CCW), frontleft mid (CW), frontleft right (CCW), frontright left (CW), frontright mid (CCW), frontright right (CW) -->
<!-- backleft left (CW), backleft mid (CCW), backleft right (CW), backright left (CCW), backright mid (CW), backright right (CCW) -->
+1 -7
View File
@@ -107,6 +107,7 @@
<module name="stabilization" type="indi">
<configure name="INDI_NUM_ACT" value="8"/>
<define name="WLS_N_U" value="8"/>
<define name="WLS_N_V" value="4"/>
<define name="TILT_TWIST_CTRL" value="TRUE"/>
</module>
<module name="stabilization" type="rate_indi"/>
@@ -195,13 +196,6 @@
<axis name="THRUST" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THRUST" value="@THROTTLE" />
<set command="ROLL" value="@YAW" />
<set command="PITCH" value="@PITCH/2" />
<set command="YAW" value="-@ROLL/4" />
</rc_commands>
<section name="MIXING" prefix="MOTOR_MIXING_">
<!-- frontleft left (CCW), frontleft mid (CW), frontleft right (CCW), frontright left (CW), frontright mid (CCW), frontright right (CW) -->
<!-- backleft left (CW), backleft mid (CCW), backleft right (CW), backright left (CCW), backright mid (CW), backright right (CCW) -->
+2 -7
View File
@@ -87,6 +87,8 @@
<define name="USE_GPS_UBX_RTCM" value="TRUE"/>
</module> -->
<module name="stabilization" type="indi">
<define name="WLS_N_U" value="4"/>
<define name="WLS_N_V" value="4"/>
<!--define name="TILT_TWIST_CTRL" value="TRUE"/-->
</module>
<module name="stabilization" type="rate_indi"/>
@@ -135,13 +137,6 @@
<axis name="THRUST" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THRUST" value="@THROTTLE" />
<set command="ROLL" value="@ROLL" />
<set command="PITCH" value="@PITCH" />
<set command="YAW" value="@YAW" />
</rc_commands>
<section name="MIXING" prefix="MOTOR_MIXING_">
<define name="TYPE" value="QUAD_X"/>
</section>
+8
View File
@@ -9,13 +9,17 @@
<configure name="INDI_OUTPUTS" default="4"/>
<configure name="INDI_NUM_ACT" default="4"/>
<define name="TILT_TWIST_CTRL" value="FALSE|TRUE" description="assume twist is slower than tilt and solve separately"/>
<section name="RC_SETPOINT" prefix="STABILIZATION_ATTITUDE_">
<define name="SP_MAX_PHI" value="45." description="max setpoint for roll angle" unit="deg"/>
<define name="SP_MAX_THETA" value="45." description="max setpoint for pitch angle" unit="deg"/>
<define name="SP_MAX_R" value="90." description="max setpoint for yaw rate" unit="deg/s"/>
<define name="DEADBAND_R" value="250" description="deadband on yaw rate input"/>
</section>
<section name="STABILIZATION_ATTITUDE_INDI" prefix="STABILIZATION_INDI_">
<define name="ALLOCATION_PSEUDO_INVERSE" value="FALSE|TRUE" description="Master setting: leave false for WLS allocation, and use TRUE if not overactuated and no WLS"/>
<define name="G1_ROLL" value="{20 , -20, -20 , 20 }" description="control effectiveness of every actuator on the roll axis"/>
<define name="G1_PITCH" value="{14 , 14, -14 , -14 }" description="control effectiveness of every actuator on the pitch axis"/>
<define name="G1_YAW" value="{-1, 1, -1, 1}" description="control effectiveness of every actuator on the yaw axis"/>
@@ -29,16 +33,20 @@
<define name="REF_RATE_R" value="28.0" description="INDI gains linear controller"/>
<define name="MAX_R" value="120.0" description="max yaw rate" unit="deg/s"/>
<define name="FILT_CUTOFF" value="8.0" description="second order cutoff frequency for angular accelerations in Hz"/>
<define name="FILTER_RATES_SECOND_ORDER" value="FALSE|TRUE" description="use second order rate filters instead of first order"/>
<define name="STABILIZATION_INDI_FILT_CUTOFF_P" value="20.0" description="First order cutoff freq for angular rate in Hz"/>
<define name="STABILIZATION_INDI_FILT_CUTOFF_Q" value="20.0" description="First order cutoff freq for angular rate in Hz"/>
<define name="STABILIZATION_INDI_FILT_CUTOFF_R" value="20.0" description="First order cutoff freq for angular rate in Hz"/>
<define name="ESTIMATION_FILT_CUTOFF" value="8.0" description="second order cutoff parameter"/>
<define name="ACT_DYN" value="{0.1, 0.1, 0.1, 0.1}" description="actuator dynamics"/>
<define name="ACT_IS_SERVO" value="{0,0,0,0}" description="1 for every actuator that is a servo"/>
<define name="ACT_IS_THRUSTER_X" value="{0,0,0,0}" description="1 for every actuator that is a thruster in the body-x direction"/>
<define name="ACT_RATE_LIMIT" value="{9600,9600,9600,9600}" description="rate limit in PPRZ units per timestep (depends on control frequency)"/>
<define name="ACT_PREF" value="{0.0, 0.0, 0.0, 0.0}" description="preferred (low energy) actuator value. Important when the system is over-determined!"/>
<define name="USE_ADAPTIVE" value="FALSE|TRUE" description="enable adaptive gains"/>
<define name="ADAPTIVE_MU" value="0.0001" description="adaptation parameter"/>
<define name="WLS_PRIORITIES" value="{1000, 1000, 1, 100, 100}" description="WLS control objective priorities: roll, pitch, thrust, yaw, thrust_x"/>
<define name="WLS_WU" value="{1, 1, 1, 1}" description="WLS actuator cost (size of INDI_NUM_ACT)"/>
</section>
</doc>
<settings>
+4 -4
View File
@@ -84,7 +84,7 @@
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotorcraft_optitrack_path.xml"
settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_speed.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/geo_mag.xml modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_basic_rotorcraft.xml modules/stabilization_indi.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/electrical.xml modules/geo_mag.xml modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml"
gui_color="#ffffcccaccca"
/>
<aircraft
@@ -117,7 +117,7 @@
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_optitrack.xml"
settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_speed.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/gps.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_basic_rotorcraft.xml modules/stabilization_indi.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/electrical.xml modules/gps.xml modules/guidance_pid_rotorcraft.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml"
gui_color="#ffffbc3bce5b"
/>
<aircraft
@@ -392,7 +392,7 @@
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotorcraft_optitrack_path.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_basic_rotorcraft.xml modules/stabilization_indi.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/electrical.xml modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/logger_sd_chibios.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml"
gui_color="blue"
/>
<aircraft
@@ -535,7 +535,7 @@
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/tudelft/fan_demo.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml [modules/geo_mag.xml] modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_basic_rotorcraft.xml modules/stabilization_indi.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/air_data.xml modules/electrical.xml [modules/geo_mag.xml] modules/gps.xml modules/guidance_indi.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_extended.xml modules/nav_rotorcraft.xml modules/stabilization_indi.xml"
gui_color="#ffffcccaccca"
/>
<aircraft
@@ -702,6 +702,7 @@ struct StabilizationSetpoint guidance_indi_run_mode(bool in_flight UNUSED, struc
}
}
#ifdef GUIDANCE_INDI_SPECIFIC_FORCE_GAIN
/**
* Filter the thrust, such that it corresponds to the filtered acceleration
*/
@@ -714,6 +715,8 @@ void guidance_indi_filter_thrust(void)
update_butterworth_2_low_pass(&thrust_filt, thrust_act);
}
#endif
/**
* Low pass the accelerometer measurements to remove noise from vibrations.
* The roll and pitch also need to be filtered to synchronize them with the
@@ -71,14 +71,14 @@
#define STABILIZATION_INDI_ALLOCATION_PSEUDO_INVERSE FALSE
#endif
#ifndef INDI_FILTER_RATES_SECOND_ORDER
#define INDI_FILTER_RATES_SECOND_ORDER FALSE
#ifndef STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
#define STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER FALSE
#endif
// Airspeed [m/s] at which the forward flight throttle limit is used instead of
// the hover throttle limit.
#ifndef INDI_HROTTLE_LIMIT_AIRSPEED_FWD
#define INDI_HROTTLE_LIMIT_AIRSPEED_FWD 8.0
#ifndef STABILIZATION_INDI_THROTTLE_LIMIT_AIRSPEED_FWD
#define STABILIZATION_INDI_THROTTLE_LIMIT_AIRSPEED_FWD 8.0
#endif
#if INDI_OUTPUTS > 4
@@ -88,16 +88,15 @@
#endif
#ifdef SetCommandsFromRC
#warning SetAutoCommandsFromRC not used: STAB_INDI overwrites actuators
#warning SetCommandsFromRC not used: STAB_INDI overwrites actuators
#endif
#if !STABILIZATION_INDI_ALLOCATION_PSEUDO_INVERSE
#if INDI_NUM_ACT > WLS_N_U
#error Matrix-WLS_N_U too small: increase WLS_N_U in airframe file
#error Matrix-WLS_N_U too small or not defined: define WLS_N_U >= INDI_NUM_ACT in airframe file
#endif
#if INDI_OUTPUTS > WLS_N_V
#error Matrix-WLS_N_V too small: increase WLS_N_V in airframe file
#error Matrix-WLS_N_V too small or not defined: define WLS_N_U >= INDI_OUTPUTS in airframe file
#endif
#endif
@@ -256,7 +255,7 @@ Butterworth2LowPass estimation_input_lowpass_filters[INDI_NUM_ACT];
Butterworth2LowPass measurement_lowpass_filters[3];
Butterworth2LowPass estimation_output_lowpass_filters[3];
Butterworth2LowPass acceleration_lowpass_filter;
#if INDI_FILTER_RATES_SECOND_ORDER
#if STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
Butterworth2LowPass rates_filt_so[3];
#else
static struct FirstOrderLowPass rates_filt_fo[3];
@@ -420,7 +419,7 @@ void init_filters(void)
// Filtering of the accel body z
init_butterworth_2_low_pass(&acceleration_lowpass_filter, tau_est, sample_time, 0.0);
#if INDI_FILTER_RATES_SECOND_ORDER
#if STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
tau = 1.0 / (2.0 * M_PI * STABILIZATION_INDI_FILT_CUTOFF_P);
init_butterworth_2_low_pass(&rates_filt_so[0], tau, sample_time, 0.0);
tau = 1.0 / (2.0 * M_PI * STABILIZATION_INDI_FILT_CUTOFF_Q);
@@ -543,7 +542,7 @@ void stabilization_indi_rate_run(struct FloatRates rate_sp, bool in_flight)
//Note that due to the delay, the PD controller may need relaxed gains.
struct FloatRates rates_filt;
#if STABILIZATION_INDI_FILTER_ROLL_RATE
#if INDI_FILTER_RATES_SECOND_ORDER
#if STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
rates_filt.p = update_butterworth_2_low_pass(&rates_filt_so[0], body_rates->p);
#else
rates_filt.p = update_first_order_low_pass(&rates_filt_fo[0], body_rates->p);
@@ -552,7 +551,7 @@ void stabilization_indi_rate_run(struct FloatRates rate_sp, bool in_flight)
rates_filt.p = body_rates->p;
#endif
#if STABILIZATION_INDI_FILTER_PITCH_RATE
#if INDI_FILTER_RATES_SECOND_ORDER
#if STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
rates_filt.q = update_butterworth_2_low_pass(&rates_filt_so[1], body_rates->q);
#else
rates_filt.q = update_first_order_low_pass(&rates_filt_fo[1], body_rates->q);
@@ -561,7 +560,7 @@ void stabilization_indi_rate_run(struct FloatRates rate_sp, bool in_flight)
rates_filt.q = body_rates->q;
#endif
#if STABILIZATION_INDI_FILTER_YAW_RATE
#if INDI_FILTER_RATES_SECOND_ORDER
#if STABILIZATION_INDI_FILTER_RATES_SECOND_ORDER
rates_filt.r = update_butterworth_2_low_pass(&rates_filt_so[2], body_rates->r);
#else
rates_filt.r = update_first_order_low_pass(&rates_filt_fo[2], body_rates->r);
@@ -718,7 +717,7 @@ void WEAK stabilization_indi_set_wls_settings(float use_increment)
//limit minimum thrust ap can give
if (!act_is_servo[i]) {
if ((guidance_h.mode == GUIDANCE_H_MODE_HOVER) || (guidance_h.mode == GUIDANCE_H_MODE_NAV)) {
if (airspeed < INDI_HROTTLE_LIMIT_AIRSPEED_FWD) {
if (airspeed < STABILIZATION_INDI_THROTTLE_LIMIT_AIRSPEED_FWD) {
du_min_stab_indi[i] = GUIDANCE_INDI_MIN_THROTTLE - use_increment * actuator_state_filt_vect[i];
} else {
du_min_stab_indi[i] = GUIDANCE_INDI_MIN_THROTTLE_FWD - use_increment * actuator_state_filt_vect[i];
@@ -52,8 +52,6 @@ extern float act_pref[INDI_NUM_ACT];
extern float indi_Wu[INDI_NUM_ACT];
extern bool act_is_servo[INDI_NUM_ACT];
struct Indi_gains {
struct FloatRates att;
struct FloatRates rate;
+9 -1
View File
@@ -48,7 +48,15 @@
*
* @return Number of iterations: (imax+1) means it ran out of iterations
*/
int wls_alloc(float* u, float* v,
#ifndef WLS_ALLOC_HEADER
#define WLS_ALLOC_HEADER
extern int wls_alloc(float* u, float* v,
float* umin, float* umax, float** B,
float* u_guess, float* W_init, float* Wv, float* Wu,
float* ud, float gamma, int imax, int n_u, int n_v);
#endif