diff --git a/conf/firmwares/subsystems/fixedwing/control.makefile b/conf/firmwares/subsystems/fixedwing/control.makefile deleted file mode 100644 index 74f657321a..0000000000 --- a/conf/firmwares/subsystems/fixedwing/control.makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# Standard fixed wing control loops - - -$(TARGET).srcs += $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c - -$(TARGET).CFLAGS += -DCTRL_TYPE_H=\"firmwares/fixedwing/guidance/guidance_v.h\" -#$(TARGET).CFLAGS += -DCTRL_VERTICAL_LANDING=1 diff --git a/conf/firmwares/subsystems/fixedwing/control_adaptive.makefile b/conf/firmwares/subsystems/fixedwing/control_adaptive.makefile deleted file mode 100644 index b867d966cd..0000000000 --- a/conf/firmwares/subsystems/fixedwing/control_adaptive.makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# fixed wing control loops with adaptive horizontal control - - -$(TARGET).srcs += $(SRC_FIRMWARE)/stabilization/stabilization_adaptive.c $(SRC_FIRMWARE)/guidance/guidance_v.c - -$(TARGET).CFLAGS += -DCTRL_TYPE_H=\"firmwares/fixedwing/guidance/guidance_v.h\" - diff --git a/conf/firmwares/subsystems/fixedwing/control_energy.makefile b/conf/firmwares/subsystems/fixedwing/control_energy.makefile deleted file mode 100644 index 84119585f9..0000000000 --- a/conf/firmwares/subsystems/fixedwing/control_energy.makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# Standard fixed wing control loops - - -$(TARGET).srcs += $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/energy_ctrl.c - -$(TARGET).CFLAGS += -DCTRL_TYPE_H=\"firmwares/fixedwing/guidance/energy_ctrl.h\" - diff --git a/conf/firmwares/subsystems/fixedwing/control_energyadaptive.makefile b/conf/firmwares/subsystems/fixedwing/control_energyadaptive.makefile deleted file mode 100644 index 7b4f6dc790..0000000000 --- a/conf/firmwares/subsystems/fixedwing/control_energyadaptive.makefile +++ /dev/null @@ -1,8 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# Standard fixed wing control loops - - -$(TARGET).srcs += $(SRC_FIRMWARE)/stabilization/stabilization_adaptive.c $(SRC_FIRMWARE)/guidance/energy_ctrl.c - -$(TARGET).CFLAGS += -DCTRL_TYPE_H=\"firmwares/fixedwing/guidance/energy_ctrl.h\" diff --git a/conf/firmwares/subsystems/fixedwing/control_new.makefile b/conf/firmwares/subsystems/fixedwing/control_new.makefile deleted file mode 100644 index 0df9d74f6f..0000000000 --- a/conf/firmwares/subsystems/fixedwing/control_new.makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# new fixed wing control loops with merged auto pitch and auto throttle, adaptive horizontal control - -$(TARGET).srcs += $(SRC_FIRMWARE)/stabilization/stabilization_adaptive.c $(SRC_FIRMWARE)/guidance/guidance_v_n.c - -$(TARGET).CFLAGS += -DCTRL_TYPE_H=\"firmwares/fixedwing/guidance/guidance_v.h\" - - diff --git a/conf/firmwares/subsystems/fixedwing/navigation.makefile b/conf/firmwares/subsystems/fixedwing/navigation.makefile deleted file mode 100644 index baa5a6ddc0..0000000000 --- a/conf/firmwares/subsystems/fixedwing/navigation.makefile +++ /dev/null @@ -1,12 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# Standard fixed wing navigation - - -#add these to all targets - -$(TARGET).CFLAGS += -DNAV -$(TARGET).srcs += $(SRC_FIRMWARE)/nav.c -#$(TARGET).srcs += subsystems/navigation/common_nav.c -$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/common_flight_plan.c -$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/nav_survey_rectangle.c diff --git a/conf/modules/control.xml b/conf/modules/control.xml new file mode 100644 index 0000000000..5aadc85b4f --- /dev/null +++ b/conf/modules/control.xml @@ -0,0 +1,15 @@ + + + + + + Basic control for fixed-wing aircraft. + Based on: + - stabilization_attitude_fw + - guidance_basic_fw + + + + + + diff --git a/conf/modules/control_adaptive.xml b/conf/modules/control_adaptive.xml new file mode 100644 index 0000000000..6320e89c9e --- /dev/null +++ b/conf/modules/control_adaptive.xml @@ -0,0 +1,15 @@ + + + + + + Adaptive control for fixed-wing aircraft. + Based on: + - stabilization_adaptive_fw + - guidance_basic_fw + + + + + + diff --git a/conf/modules/control_energy.xml b/conf/modules/control_energy.xml new file mode 100644 index 0000000000..9d4046a4f3 --- /dev/null +++ b/conf/modules/control_energy.xml @@ -0,0 +1,15 @@ + + + + + + Energy control for fixed-wing aircraft. + Based on: + - stabilization_attitude_fw + - guidance_energy + + + + + + diff --git a/conf/modules/control_energyadaptive.xml b/conf/modules/control_energyadaptive.xml new file mode 100644 index 0000000000..7645f7236f --- /dev/null +++ b/conf/modules/control_energyadaptive.xml @@ -0,0 +1,15 @@ + + + + + + Energy control for fixed-wing aircraft with adaptive stabilization. + Based on: + - stabilization_adaptive_fw + - guidance_energy + + + + + + diff --git a/conf/modules/control_new.xml b/conf/modules/control_new.xml new file mode 100644 index 0000000000..9ae3b1046a --- /dev/null +++ b/conf/modules/control_new.xml @@ -0,0 +1,15 @@ + + + + + + Full PID control for fixed-wing aircraft. + Based on: + - stabilization_adaptive_fw + - guidance_full_pid_fw + + + + + + diff --git a/conf/modules/guidance_basic_fw.xml b/conf/modules/guidance_basic_fw.xml new file mode 100644 index 0000000000..7e2d91e221 --- /dev/null +++ b/conf/modules/guidance_basic_fw.xml @@ -0,0 +1,56 @@ + + + + + + Legacy vertical control for fixedwing aircraft based on throttle (default) or pitch + +
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
diff --git a/conf/modules/guidance_energy.xml b/conf/modules/guidance_energy.xml new file mode 100644 index 0000000000..0e0bf11fa4 --- /dev/null +++ b/conf/modules/guidance_energy.xml @@ -0,0 +1,69 @@ + + + + + + Energy based vertical control for fixedwing aircraft. + Airspeed sensor is mandatory for this controller. + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
diff --git a/conf/modules/guidance_full_pid_fw.xml b/conf/modules/guidance_full_pid_fw.xml new file mode 100644 index 0000000000..e08bcf0e8a --- /dev/null +++ b/conf/modules/guidance_full_pid_fw.xml @@ -0,0 +1,84 @@ + + + + + + Vertical control for fixedwing aircraft based on PID + By default, throttle and pitch are used to track vertical speed and altitude. + Airspeed or ground speed control can be activated. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
diff --git a/conf/modules/nav_basic_fw.xml b/conf/modules/nav_basic_fw.xml new file mode 100644 index 0000000000..7d7b13c71c --- /dev/null +++ b/conf/modules/nav_basic_fw.xml @@ -0,0 +1,36 @@ + + + + + + Standard navigation patterns and flight plan handling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
diff --git a/conf/modules/navigation.xml b/conf/modules/navigation.xml new file mode 100644 index 0000000000..a45d63e413 --- /dev/null +++ b/conf/modules/navigation.xml @@ -0,0 +1,11 @@ + + + + + + Meta module for loading proper navigation module + + + + + diff --git a/sw/airborne/firmwares/fixedwing/main_ap.c b/sw/airborne/firmwares/fixedwing/main_ap.c index c1b452c26d..cdc76906d5 100644 --- a/sw/airborne/firmwares/fixedwing/main_ap.c +++ b/sw/airborne/firmwares/fixedwing/main_ap.c @@ -62,9 +62,6 @@ PRINT_CONFIG_MSG_VALUE("USE_BARO_BOARD is TRUE, reading onboard baro: ", BARO_BO // autopilot & control #include "state.h" #include "firmwares/fixedwing/autopilot.h" -#include "firmwares/fixedwing/stabilization/stabilization_attitude.h" -#include CTRL_TYPE_H -#include "firmwares/fixedwing/nav.h" #include "generated/flight_plan.h" // datalink & telemetry @@ -207,9 +204,6 @@ void init_ap(void) /************ Internal status ***************/ autopilot_init(); - h_ctl_init(); - v_ctl_init(); - nav_init(); modules_init();