Fix airframes in master (#3380)

* Nederdrone fixes

* fix automation
This commit is contained in:
Christophe De Wagter
2024-10-02 09:59:07 +02:00
committed by GitHub
parent 5fce15418b
commit 903b4897f8
4 changed files with 4 additions and 37 deletions
-1
View File
@@ -141,7 +141,6 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rotwing_automation"/>
<module name="ground_detect"/>
<module name="rotwing_state"/>
<module name="preflight_checks">
-31
View File
@@ -1,31 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="rotwing_automation" dir="rotwing_drone">
<doc>
<description>Functions to automate the navigation and guidance of the rotating wing drone</description>
<section name="ROTWING_AUTOMATION" prefix="ROTWING_AUTOMATION_">
<define name="TRANS_ACCEL" value="1.0" description="Longitudinal maximum acceleration during a transition"/>
<define name="TRANS_DECEL" value="0.5" description="Longitudinal maximum deceleration during a transition"/>
<define name="TRANS_LENGTH" value="200.0" description="Maximum transition distance (at which to draw waypoints)"/>
<define name="TRANS_AIRSPEED" value="" description="Airspeed threshold above which the transiton is considered complete"/>
<define name="ROTWING_AUTOMATION_WIND_FILT_CUTOFF" value="0.001" description="Wind low-pass filtering cutoff frequency"/>
</section>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="transition">
<dl_setting var="rotwing_a.trans_accel" min="0.1" max="5.0" step="0.1" shortname="trans_accel" param="ROTWING_AUTOMATION_TRANS_ACCEL"/>
<dl_setting var="rotwing_a.trans_decel" min="0.1" max="5.0" step="0.1" shortname="trans_decel" param="ROTWING_AUTOMATION_TRANS_DECEL"/>
<dl_setting var="rotwing_a.trans_length" min="10" max="500." step="1.0" shortname="trans_distance" param="ROTWING_AUTOMATION_TRANS_LENGTH"/>
<dl_setting var="rotwing_a.trans_airspeed" min="10.0" max="20.0" step="0.1" shortname="trans_airspeed" param="ROTWING_AUTOMATION_TRANS_AIRSPEED"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="rotwing_automation.h"/>
</header>
<init fun="init_rotwing_automation()"/>
<periodic fun="periodic_rotwing_automation()" freq="10."/>
<makefile>
<file name="rotwing_automation.c"/>
</makefile>
</module>
@@ -46,7 +46,6 @@ extern float thrust_bx_state_filt;
extern float act_pref[INDI_NUM_ACT];
extern float indi_Wu[INDI_NUM_ACT];
struct Indi_gains {
struct FloatRates att;
struct FloatRates rate;
@@ -32,7 +32,7 @@ not use this module at the same time!
#include "state.h"
#include "autopilot.h"
#include "modules/radio_control/radio_control.h"
#include "generated/radio.h"
//#include "generated/radio.h"
#include "modules/actuators/actuators.h"
#define INDI_SCHEDULING_LOWER_BOUND_G1 0.0001
@@ -232,15 +232,15 @@ void schdule_control_effectiveness(void) {
if(airspeed > 15.0) {
uint8_t i;
for (i = 0; i < 4; i++) {
indi_Wu[i] = indi_Wu_original[i]*pref_flaps_factor;
wls_stab_p.Wu[i] = indi_Wu_original[i]*pref_flaps_factor;
}
for (i = 4; i < 8; i++) {
indi_Wu[i] = indi_Wu_original[i]/pref_flaps_factor;
wls_stab_p.Wu[i] = indi_Wu_original[i]/pref_flaps_factor;
}
} else {
uint8_t i;
for (i = 0; i < 8; i++) {
indi_Wu[i] = indi_Wu_original[i];
wls_stab_p.Wu[i] = indi_Wu_original[i];
}
}
}