diff --git a/conf/airframes/CDW/ChimuTinyFw.xml b/conf/airframes/CDW/ChimuTinyFw.xml
index c7bddb800d..3831d918d2 100644
--- a/conf/airframes/CDW/ChimuTinyFw.xml
+++ b/conf/airframes/CDW/ChimuTinyFw.xml
@@ -191,7 +191,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/funjet2.xml b/conf/airframes/ENAC/fixed-wing/funjet2.xml
index 427e89f074..5ac71dd39b 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet2.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet2.xml
@@ -41,7 +41,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml b/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml
index 18931347d0..35a81064d0 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml
@@ -38,7 +38,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/funjet2_new.xml b/conf/airframes/ENAC/fixed-wing/funjet2_new.xml
index 49fa555e8d..0b3075f4fe 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet2_new.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet2_new.xml
@@ -38,7 +38,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/funjet3.xml b/conf/airframes/ENAC/fixed-wing/funjet3.xml
index b3b3f1dc30..976dad60b6 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet3.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet3.xml
@@ -25,6 +25,7 @@
+
@@ -38,9 +39,6 @@
-
-
-
diff --git a/conf/airframes/ENAC/fixed-wing/minimag1.xml b/conf/airframes/ENAC/fixed-wing/minimag1.xml
index 75e1f04b74..820b6b9350 100644
--- a/conf/airframes/ENAC/fixed-wing/minimag1.xml
+++ b/conf/airframes/ENAC/fixed-wing/minimag1.xml
@@ -3,6 +3,7 @@
+
@@ -14,9 +15,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/overview.xml b/conf/airframes/ENAC/fixed-wing/overview.xml
index da39395fe1..f376da0931 100644
--- a/conf/airframes/ENAC/fixed-wing/overview.xml
+++ b/conf/airframes/ENAC/fixed-wing/overview.xml
@@ -28,7 +28,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/spocIII-1.xml b/conf/airframes/ENAC/fixed-wing/spocIII-1.xml
index 7787074007..dbc2822dc1 100644
--- a/conf/airframes/ENAC/fixed-wing/spocIII-1.xml
+++ b/conf/airframes/ENAC/fixed-wing/spocIII-1.xml
@@ -24,7 +24,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/spocIII-2.xml b/conf/airframes/ENAC/fixed-wing/spocIII-2.xml
index d5408ba0ae..1036483158 100644
--- a/conf/airframes/ENAC/fixed-wing/spocIII-2.xml
+++ b/conf/airframes/ENAC/fixed-wing/spocIII-2.xml
@@ -31,7 +31,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/spocIII-3.xml b/conf/airframes/ENAC/fixed-wing/spocIII-3.xml
index 69bf25864c..11be1e9b4c 100644
--- a/conf/airframes/ENAC/fixed-wing/spocIII-3.xml
+++ b/conf/airframes/ENAC/fixed-wing/spocIII-3.xml
@@ -32,7 +32,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/twinjet2.xml b/conf/airframes/ENAC/fixed-wing/twinjet2.xml
index c567c58b5b..be8133bcc9 100644
--- a/conf/airframes/ENAC/fixed-wing/twinjet2.xml
+++ b/conf/airframes/ENAC/fixed-wing/twinjet2.xml
@@ -36,7 +36,6 @@
-
diff --git a/conf/airframes/ENAC/fixed-wing/weasel.xml b/conf/airframes/ENAC/fixed-wing/weasel.xml
index 70cbd8c994..2fec8df225 100644
--- a/conf/airframes/ENAC/fixed-wing/weasel.xml
+++ b/conf/airframes/ENAC/fixed-wing/weasel.xml
@@ -13,6 +13,8 @@
+
+
@@ -25,17 +27,13 @@
-
-
-
-
-
+
diff --git a/conf/airframes/ENAC/quadrotor/blender.xml b/conf/airframes/ENAC/quadrotor/blender.xml
index ec6b6ea16f..73c2e59ddf 100644
--- a/conf/airframes/ENAC/quadrotor/blender.xml
+++ b/conf/airframes/ENAC/quadrotor/blender.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/conf/airframes/ENAC/quadrotor/booz2_g1.xml b/conf/airframes/ENAC/quadrotor/booz2_g1.xml
index aea79635e4..5c0e701cde 100644
--- a/conf/airframes/ENAC/quadrotor/booz2_g1.xml
+++ b/conf/airframes/ENAC/quadrotor/booz2_g1.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/conf/airframes/ENAC/quadrotor/mkk1.xml b/conf/airframes/ENAC/quadrotor/mkk1.xml
index 16f34fc86a..c44af4ea1c 100644
--- a/conf/airframes/ENAC/quadrotor/mkk1.xml
+++ b/conf/airframes/ENAC/quadrotor/mkk1.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/conf/airframes/ENAC/quadrotor/navgo.xml b/conf/airframes/ENAC/quadrotor/navgo.xml
index dcb814865e..977d683724 100644
--- a/conf/airframes/ENAC/quadrotor/navgo.xml
+++ b/conf/airframes/ENAC/quadrotor/navgo.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/conf/airframes/ENAC/quadrotor/nova1.xml b/conf/airframes/ENAC/quadrotor/nova1.xml
index 7e91c0a7fe..1d75a0ee58 100644
--- a/conf/airframes/ENAC/quadrotor/nova1.xml
+++ b/conf/airframes/ENAC/quadrotor/nova1.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/conf/airframes/NoVa_L.xml b/conf/airframes/NoVa_L.xml
index e78a9fdccc..bdfeff07bf 100644
--- a/conf/airframes/NoVa_L.xml
+++ b/conf/airframes/NoVa_L.xml
@@ -266,8 +266,8 @@
-
-
+
+
diff --git a/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml b/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml
index c61e31f6b4..4e10892cf5 100644
--- a/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml
+++ b/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml
@@ -238,13 +238,13 @@
-
+
@@ -262,7 +262,6 @@
-
diff --git a/conf/airframes/Poine/booz2_a1.xml b/conf/airframes/Poine/booz2_a1.xml
index 098f386727..f90a486d32 100644
--- a/conf/airframes/Poine/booz2_a1.xml
+++ b/conf/airframes/Poine/booz2_a1.xml
@@ -207,7 +207,7 @@
-
+
diff --git a/conf/airframes/Poine/booz2_a7.xml b/conf/airframes/Poine/booz2_a7.xml
index a563e80f20..1ad69f0299 100644
--- a/conf/airframes/Poine/booz2_a7.xml
+++ b/conf/airframes/Poine/booz2_a7.xml
@@ -234,9 +234,9 @@
-
+
-
+
diff --git a/conf/airframes/Poine/h_hex.xml b/conf/airframes/Poine/h_hex.xml
index e5c5226b4d..db9214e262 100644
--- a/conf/airframes/Poine/h_hex.xml
+++ b/conf/airframes/Poine/h_hex.xml
@@ -186,7 +186,7 @@
-
+
diff --git a/conf/airframes/TU_Delft/MicrojetBRimu.xml b/conf/airframes/TU_Delft/MicrojetBRimu.xml
index f43c11d34e..1ee0c1e65a 100644
--- a/conf/airframes/TU_Delft/MicrojetBRimu.xml
+++ b/conf/airframes/TU_Delft/MicrojetBRimu.xml
@@ -295,8 +295,7 @@
-
-
+
diff --git a/conf/airframes/TU_Delft/MicrojetCDW.xml b/conf/airframes/TU_Delft/MicrojetCDW.xml
index e2886febb2..fc038e964e 100644
--- a/conf/airframes/TU_Delft/MicrojetCDW.xml
+++ b/conf/airframes/TU_Delft/MicrojetCDW.xml
@@ -214,7 +214,7 @@
-
+
diff --git a/conf/airframes/TU_Delft/skywalker.xml b/conf/airframes/TU_Delft/skywalker.xml
index 78943c5ba4..2aec015de3 100644
--- a/conf/airframes/TU_Delft/skywalker.xml
+++ b/conf/airframes/TU_Delft/skywalker.xml
@@ -235,7 +235,6 @@
-
diff --git a/conf/airframes/TU_Delft/yapa_xsens.xml b/conf/airframes/TU_Delft/yapa_xsens.xml
index f27b129aeb..daf296a3c2 100644
--- a/conf/airframes/TU_Delft/yapa_xsens.xml
+++ b/conf/airframes/TU_Delft/yapa_xsens.xml
@@ -220,7 +220,6 @@
-
diff --git a/conf/airframes/UofAdelaide/A1000_BOOZ.xml b/conf/airframes/UofAdelaide/A1000_BOOZ.xml
index d8a7ec2290..a5b9626618 100644
--- a/conf/airframes/UofAdelaide/A1000_BOOZ.xml
+++ b/conf/airframes/UofAdelaide/A1000_BOOZ.xml
@@ -294,7 +294,7 @@ second attempt
-
+
diff --git a/conf/airframes/UofAdelaide/A1000_LISA.xml b/conf/airframes/UofAdelaide/A1000_LISA.xml
index 42c914aee2..5493c8d8c5 100644
--- a/conf/airframes/UofAdelaide/A1000_LISA.xml
+++ b/conf/airframes/UofAdelaide/A1000_LISA.xml
@@ -203,7 +203,7 @@
-
+
diff --git a/conf/airframes/UofAdelaide/A1000_NOVA.xml b/conf/airframes/UofAdelaide/A1000_NOVA.xml
index a624234444..434662d06f 100644
--- a/conf/airframes/UofAdelaide/A1000_NOVA.xml
+++ b/conf/airframes/UofAdelaide/A1000_NOVA.xml
@@ -253,7 +253,7 @@
-
+
diff --git a/conf/airframes/booz2_flixr.xml b/conf/airframes/booz2_flixr.xml
index 568821c2ce..6aa4a7ee6d 100644
--- a/conf/airframes/booz2_flixr.xml
+++ b/conf/airframes/booz2_flixr.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/conf/airframes/booz2_ppzuav.xml b/conf/airframes/booz2_ppzuav.xml
index 6eb77f14fd..0961e3f73f 100644
--- a/conf/airframes/booz2_ppzuav.xml
+++ b/conf/airframes/booz2_ppzuav.xml
@@ -209,7 +209,7 @@
-
+
diff --git a/conf/airframes/easystar_ets_example.xml b/conf/airframes/easystar_ets_example.xml
index 7e4ca831bc..3bc7913c82 100644
--- a/conf/airframes/easystar_ets_example.xml
+++ b/conf/airframes/easystar_ets_example.xml
@@ -27,7 +27,6 @@
-
diff --git a/conf/airframes/esden/jt_lisam.xml b/conf/airframes/esden/jt_lisam.xml
index 9381f40d18..cd1948f709 100644
--- a/conf/airframes/esden/jt_lisam.xml
+++ b/conf/airframes/esden/jt_lisam.xml
@@ -198,7 +198,7 @@
-
+
diff --git a/conf/airframes/esden/lisa_asctec.xml b/conf/airframes/esden/lisa_asctec.xml
index 44251fb9ea..dcb7e5c6db 100644
--- a/conf/airframes/esden/lisa_asctec.xml
+++ b/conf/airframes/esden/lisa_asctec.xml
@@ -203,7 +203,7 @@
-
+
diff --git a/conf/airframes/esden/lisa_asctec_aspirin.xml b/conf/airframes/esden/lisa_asctec_aspirin.xml
index fa52416db1..1fe9ba9e8b 100644
--- a/conf/airframes/esden/lisa_asctec_aspirin.xml
+++ b/conf/airframes/esden/lisa_asctec_aspirin.xml
@@ -205,7 +205,7 @@
-
+
diff --git a/conf/airframes/esden/lisa_m_pwm.xml b/conf/airframes/esden/lisa_m_pwm.xml
index 34b819a1f1..c7aa63004b 100644
--- a/conf/airframes/esden/lisa_m_pwm.xml
+++ b/conf/airframes/esden/lisa_m_pwm.xml
@@ -226,7 +226,7 @@
-
+
diff --git a/conf/airframes/esden/lisa_pwm_aspirin.xml b/conf/airframes/esden/lisa_pwm_aspirin.xml
index f5a0931048..086d309423 100644
--- a/conf/airframes/esden/lisa_pwm_aspirin.xml
+++ b/conf/airframes/esden/lisa_pwm_aspirin.xml
@@ -205,8 +205,8 @@
-
-
+
+
diff --git a/conf/airframes/esden/synerani_4B.xml b/conf/airframes/esden/synerani_4B.xml
index 2c113fb72a..982054537c 100644
--- a/conf/airframes/esden/synerani_4B.xml
+++ b/conf/airframes/esden/synerani_4B.xml
@@ -207,9 +207,9 @@
-
+
-
+
diff --git a/conf/airframes/example_twog_analogimu.xml b/conf/airframes/example_twog_analogimu.xml
index d212c9586d..17be71780c 100644
--- a/conf/airframes/example_twog_analogimu.xml
+++ b/conf/airframes/example_twog_analogimu.xml
@@ -212,7 +212,7 @@
-
+
diff --git a/conf/airframes/flixr_discovery.xml b/conf/airframes/flixr_discovery.xml
index 95dd5eae07..3be9e364d8 100644
--- a/conf/airframes/flixr_discovery.xml
+++ b/conf/airframes/flixr_discovery.xml
@@ -36,9 +36,7 @@ http://paparazzi.enac.fr/w/index.php?title=Theory_of_Operation
-
-
-
+
diff --git a/conf/airframes/mm/fixed-wing/funjet43.xml b/conf/airframes/mm/fixed-wing/funjet43.xml
index 0126c730bf..22a4d7fb0c 100644
--- a/conf/airframes/mm/fixed-wing/funjet43.xml
+++ b/conf/airframes/mm/fixed-wing/funjet43.xml
@@ -24,7 +24,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/funjetdca.xml b/conf/airframes/mm/fixed-wing/funjetdca.xml
index 77653a653b..3b1da5e839 100644
--- a/conf/airframes/mm/fixed-wing/funjetdca.xml
+++ b/conf/airframes/mm/fixed-wing/funjetdca.xml
@@ -38,7 +38,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/funjetdcb.xml b/conf/airframes/mm/fixed-wing/funjetdcb.xml
index 543dadf191..5c134054fa 100644
--- a/conf/airframes/mm/fixed-wing/funjetdcb.xml
+++ b/conf/airframes/mm/fixed-wing/funjetdcb.xml
@@ -38,7 +38,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/funjetdcc.xml b/conf/airframes/mm/fixed-wing/funjetdcc.xml
index 76a077a444..66bd573829 100644
--- a/conf/airframes/mm/fixed-wing/funjetdcc.xml
+++ b/conf/airframes/mm/fixed-wing/funjetdcc.xml
@@ -38,7 +38,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/funjetmm.xml b/conf/airframes/mm/fixed-wing/funjetmm.xml
index 429d313314..1bd560aef8 100644
--- a/conf/airframes/mm/fixed-wing/funjetmm.xml
+++ b/conf/airframes/mm/fixed-wing/funjetmm.xml
@@ -41,7 +41,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/fw_ins_arduimu.xml b/conf/airframes/mm/fixed-wing/fw_ins_arduimu.xml
index c41ab6803c..6e35899c2f 100644
--- a/conf/airframes/mm/fixed-wing/fw_ins_arduimu.xml
+++ b/conf/airframes/mm/fixed-wing/fw_ins_arduimu.xml
@@ -39,7 +39,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/merlin.xml b/conf/airframes/mm/fixed-wing/merlin.xml
index ff576007fb..3aaa7e5f4b 100644
--- a/conf/airframes/mm/fixed-wing/merlin.xml
+++ b/conf/airframes/mm/fixed-wing/merlin.xml
@@ -186,7 +186,6 @@
-
diff --git a/conf/airframes/mm/fixed-wing/slowfast2.xml b/conf/airframes/mm/fixed-wing/slowfast2.xml
index 917858c056..226b3d2f19 100644
--- a/conf/airframes/mm/fixed-wing/slowfast2.xml
+++ b/conf/airframes/mm/fixed-wing/slowfast2.xml
@@ -27,7 +27,6 @@
-
diff --git a/conf/airframes/mm/rotor/qmk1.xml b/conf/airframes/mm/rotor/qmk1.xml
index 2e27d93ad0..2293a84efa 100644
--- a/conf/airframes/mm/rotor/qmk1.xml
+++ b/conf/airframes/mm/rotor/qmk1.xml
@@ -204,7 +204,7 @@
-
+
diff --git a/conf/airframes/test_hb.xml b/conf/airframes/test_hb.xml
index fc87901459..c3b11a5df8 100644
--- a/conf/airframes/test_hb.xml
+++ b/conf/airframes/test_hb.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/conf/autopilot/rotorcraft.makefile b/conf/autopilot/rotorcraft.makefile
index a98b4de180..27a2e084cf 100644
--- a/conf/autopilot/rotorcraft.makefile
+++ b/conf/autopilot/rotorcraft.makefile
@@ -1,7 +1,5 @@
# Hey Emacs, this is a -*- makefile -*-
#
-# $Id$
-#
# Copyright (C) 2010 The Paparazzi Team
#
# This file is part of Paparazzi.
diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_dcm.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_dcm.makefile
index 3d7c02b4c2..3c5cc89267 100644
--- a/conf/autopilot/subsystems/fixedwing/ahrs_dcm.makefile
+++ b/conf/autopilot/subsystems/fixedwing/ahrs_dcm.makefile
@@ -1,53 +1,3 @@
-# attitude estimation for fixedwings via dcm algorithm
+include $(CFG_FIXEDWING)/ahrs_float_dcm.makefile
-
-$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm.h\"
-
-ifeq ($(TARGET), ap)
-
-ap.CFLAGS += -DUSE_AHRS
-
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
-
-ifdef AHRS_ALIGNER_LED
- ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
-endif
-
-ifdef CPU_LED
- ap.CFLAGS += -DAHRS_CPU_LED=$(CPU_LED)
-endif
-
-ifdef AHRS_PROPAGATE_FREQUENCY
-else
- AHRS_PROPAGATE_FREQUENCY = 60
-endif
-
-ifdef AHRS_CORRECT_FREQUENCY
-else
- AHRS_CORRECT_FREQUENCY = 60
-endif
-
-ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY)
-ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
-
-endif
-
-# since there is currently no SITL sim for the Analog IMU, we use the infrared sim
-
-ifeq ($(TARGET), sim)
-
-sim.CFLAGS += -DIR_ROLL_NEUTRAL_DEFAULT=0
-sim.CFLAGS += -DIR_PITCH_NEUTRAL_DEFAULT=0
-
-sim.CFLAGS += -DUSE_INFRARED
-sim.srcs += subsystems/sensors/infrared.c
-sim.srcs += subsystems/sensors/infrared_adc.c
-
-sim.srcs += $(SRC_ARCH)/sim_ir.c
-sim.srcs += $(SRC_ARCH)/sim_imu.c
-
-endif
-
-jsbsim.srcs += $(SRC_ARCH)/jsbsim_ir.c
+$(warning The ahrs_dcm subsystem has been renamed, please replace with in your airframe file.)
diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile
new file mode 100644
index 0000000000..70f8f745e8
--- /dev/null
+++ b/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile
@@ -0,0 +1,55 @@
+# Hey Emacs, this is a -*- makefile -*-
+
+# attitude estimation for fixedwings via dcm algorithm
+
+
+$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm.h\"
+
+ifeq ($(TARGET), ap)
+
+ap.CFLAGS += -DUSE_AHRS
+
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
+
+ifdef AHRS_ALIGNER_LED
+ ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
+endif
+
+ifdef CPU_LED
+ ap.CFLAGS += -DAHRS_CPU_LED=$(CPU_LED)
+endif
+
+ifdef AHRS_PROPAGATE_FREQUENCY
+else
+ AHRS_PROPAGATE_FREQUENCY = 60
+endif
+
+ifdef AHRS_CORRECT_FREQUENCY
+else
+ AHRS_CORRECT_FREQUENCY = 60
+endif
+
+ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY)
+ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
+
+endif
+
+# since there is currently no SITL sim for the Analog IMU, we use the infrared sim
+
+ifeq ($(TARGET), sim)
+
+sim.CFLAGS += -DIR_ROLL_NEUTRAL_DEFAULT=0
+sim.CFLAGS += -DIR_PITCH_NEUTRAL_DEFAULT=0
+
+sim.CFLAGS += -DUSE_INFRARED
+sim.srcs += subsystems/sensors/infrared.c
+sim.srcs += subsystems/sensors/infrared_adc.c
+
+sim.srcs += $(SRC_ARCH)/sim_ir.c
+sim.srcs += $(SRC_ARCH)/sim_imu.c
+
+endif
+
+jsbsim.srcs += $(SRC_ARCH)/jsbsim_ir.c
diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_ic.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_ic.makefile
index 9e945577ee..d833629400 100644
--- a/conf/autopilot/subsystems/fixedwing/ahrs_ic.makefile
+++ b/conf/autopilot/subsystems/fixedwing/ahrs_ic.makefile
@@ -1,42 +1,4 @@
-#
-# AHRS_PROPAGATE_FREQUENCY
-# AHRS_H_X
-# AHRS_H_Y
-# AHRS_H_Z
-#
+include $(CFG_FIXEDWING)/ahrs_int_cmpl_quat.makefile
-AHRS_CFLAGS = -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR
-ifdef AHRS_ALIGNER_LED
-AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
-endif
-AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl.h\"
-AHRS_SRCS += subsystems/ahrs.c
-AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl.c
-AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
-
-ap.CFLAGS += $(AHRS_CFLAGS)
-ap.srcs += $(AHRS_SRCS)
-
-sim.CFLAGS += $(AHRS_CFLAGS)
-sim.srcs += $(AHRS_SRCS)
-
-
-# Extra stuff for fixedwings
-
-ifdef CPU_LED
- ap.CFLAGS += -DAHRS_CPU_LED=$(CPU_LED)
-endif
-
-ifdef AHRS_PROPAGATE_FREQUENCY
-else
- AHRS_PROPAGATE_FREQUENCY = 60
-endif
-
-ifdef AHRS_CORRECT_FREQUENCY
-else
- AHRS_CORRECT_FREQUENCY = 60
-endif
-
-ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY)
-ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
+$(warning The ahrs_ic subsystem has been renamed, please replace with in your airframe file.)
diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile
new file mode 100644
index 0000000000..75e0d2d75f
--- /dev/null
+++ b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile
@@ -0,0 +1,40 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# AHRS_PROPAGATE_FREQUENCY
+#
+
+AHRS_CFLAGS = -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR -DUSE_AHRS_CMPL
+ifdef AHRS_ALIGNER_LED
+AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
+endif
+AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler.h\"
+AHRS_SRCS += subsystems/ahrs.c
+AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl_euler.c
+AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
+
+ap.CFLAGS += $(AHRS_CFLAGS)
+ap.srcs += $(AHRS_SRCS)
+
+sim.CFLAGS += $(AHRS_CFLAGS)
+sim.srcs += $(AHRS_SRCS)
+
+
+# Extra stuff for fixedwings
+
+ifdef CPU_LED
+ ap.CFLAGS += -DAHRS_CPU_LED=$(CPU_LED)
+endif
+
+ifdef AHRS_PROPAGATE_FREQUENCY
+else
+ AHRS_PROPAGATE_FREQUENCY = 60
+endif
+
+ifdef AHRS_CORRECT_FREQUENCY
+else
+ AHRS_CORRECT_FREQUENCY = 60
+endif
+
+ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY)
+ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
+
diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile
new file mode 100644
index 0000000000..369d174caf
--- /dev/null
+++ b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile
@@ -0,0 +1,43 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# AHRS_PROPAGATE_FREQUENCY
+# AHRS_H_X
+# AHRS_H_Y
+# AHRS_H_Z
+#
+
+AHRS_CFLAGS = -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR
+ifdef AHRS_ALIGNER_LED
+AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
+endif
+AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl.h\"
+AHRS_SRCS += subsystems/ahrs.c
+AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl.c
+AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
+
+ap.CFLAGS += $(AHRS_CFLAGS)
+ap.srcs += $(AHRS_SRCS)
+
+sim.CFLAGS += $(AHRS_CFLAGS)
+sim.srcs += $(AHRS_SRCS)
+
+
+# Extra stuff for fixedwings
+
+ifdef CPU_LED
+ ap.CFLAGS += -DAHRS_CPU_LED=$(CPU_LED)
+endif
+
+ifdef AHRS_PROPAGATE_FREQUENCY
+else
+ AHRS_PROPAGATE_FREQUENCY = 60
+endif
+
+ifdef AHRS_CORRECT_FREQUENCY
+else
+ AHRS_CORRECT_FREQUENCY = 60
+endif
+
+ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY)
+ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
+
diff --git a/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile b/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile
index 6f51989bd1..8348ca111b 100644
--- a/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile
+++ b/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
# attitude via IR sensors
#
diff --git a/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile b/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile
index b3f9355b11..f2dfef5c87 100644
--- a/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile
+++ b/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# attitude via IR I2C sensors
$(TARGET).CFLAGS += -DUSE_INFRARED_I2C
diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile
index 2bcd6f2984..97e3ec91be 100644
--- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile
+++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile
@@ -1,5 +1,4 @@
-#
-# $Id: autopilot.makefile 4827 2010-04-21 08:02:18Z poine $
+# Hey Emacs, this is a -*- makefile -*-
#
# Copyright (C) 2008 Antoine Drouin
#
@@ -77,7 +76,6 @@ $(TARGET).srcs += sys_time.c
#
# InterMCU & Commands
#
-
$(TARGET).CFLAGS += -DINTER_MCU
$(TARGET).srcs += $(SRC_FIXEDWING)/inter_mcu.c
@@ -86,6 +84,12 @@ $(TARGET).srcs += $(SRC_FIXEDWING)/inter_mcu.c
#
$(TARGET).srcs += math/pprz_geodetic_int.c math/pprz_geodetic_float.c math/pprz_geodetic_double.c math/pprz_trig_int.c
+#
+# I2C
+#
+$(TARGET).srcs += mcu_periph/i2c.c
+$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
+
######################################################################
##
## COMMON FOR ALL NON-SIMULATION TARGETS
@@ -94,7 +98,6 @@ $(TARGET).srcs += math/pprz_geodetic_int.c math/pprz_geodetic_float.c math/pprz_
#
# Interrupt Vectors
#
-
ifeq ($(ARCH), lpc21)
ns_srcs += $(SRC_ARCH)/armVIC.c
else ifeq ($(ARCH), stm32)
@@ -111,13 +114,11 @@ endif
#
# Main
#
-
ns_srcs += $(SRC_FIRMWARE)/main.c
#
# LEDs
#
-
ns_CFLAGS += -DUSE_LED
ifeq ($(ARCH), stm32)
ns_CFLAGS += -DSYS_TIME_LED=1
@@ -128,7 +129,6 @@ endif
#
# Sys-time
#
-
ns_CFLAGS += -DUSE_SYS_TIME
ns_srcs += $(SRC_ARCH)/sys_time_hw.c
@@ -136,7 +136,6 @@ ns_srcs += $(SRC_ARCH)/sys_time_hw.c
#
# UARTS
#
-
ns_srcs += mcu_periph/uart.c
ns_srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ns_srcs += subsystems/settings.c
@@ -145,8 +144,7 @@ ns_srcs += $(SRC_ARCH)/subsystems/settings_arch.c
#
# ANALOG
#
-
- ns_CFLAGS += -DUSE_ADC
+ns_CFLAGS += -DUSE_ADC
#ifeq ($(ARCH), lpc21)
ns_srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
ifeq ($(ARCH), stm32)
diff --git a/conf/autopilot/subsystems/fixedwing/control.makefile b/conf/autopilot/subsystems/fixedwing/control.makefile
index 32a73aa34f..440dbdeda0 100644
--- a/conf/autopilot/subsystems/fixedwing/control.makefile
+++ b/conf/autopilot/subsystems/fixedwing/control.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# Standard fixed wing control loops
diff --git a/conf/autopilot/subsystems/fixedwing/control_adaptive.makefile b/conf/autopilot/subsystems/fixedwing/control_adaptive.makefile
index 3aba866aa3..a4d5e1aa9a 100644
--- a/conf/autopilot/subsystems/fixedwing/control_adaptive.makefile
+++ b/conf/autopilot/subsystems/fixedwing/control_adaptive.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# fixed wing control loops with adaptive horizontal control
diff --git a/conf/autopilot/subsystems/fixedwing/control_new.makefile b/conf/autopilot/subsystems/fixedwing/control_new.makefile
index db21505cbc..d10475f361 100644
--- a/conf/autopilot/subsystems/fixedwing/control_new.makefile
+++ b/conf/autopilot/subsystems/fixedwing/control_new.makefile
@@ -1,3 +1,5 @@
+# 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
diff --git a/conf/autopilot/subsystems/fixedwing/current_sensor.makefile b/conf/autopilot/subsystems/fixedwing/current_sensor.makefile
index ae447d3ba0..1d53e45510 100644
--- a/conf/autopilot/subsystems/fixedwing/current_sensor.makefile
+++ b/conf/autopilot/subsystems/fixedwing/current_sensor.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# Activate current sensor
#
diff --git a/conf/autopilot/subsystems/fixedwing/gps_mediatek_diy.makefile b/conf/autopilot/subsystems/fixedwing/gps_mediatek_diy.makefile
index 5b11c32b8d..7e013732be 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_mediatek_diy.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_mediatek_diy.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# Mediatek MT3329, DIYDrones V1.4/1.6 protocol
diff --git a/conf/autopilot/subsystems/fixedwing/gps_nmea.makefile b/conf/autopilot/subsystems/fixedwing/gps_nmea.makefile
index 9479e0289d..980bd4e903 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_nmea.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_nmea.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# NMEA GPS unit
diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox.makefile
index d8d5723be0..3b2f2ca3f3 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_ublox.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_ublox.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
# UBlox LEA 5H
diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox_hitl.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox_hitl.makefile
index 43d6130d6b..225ebdb7ed 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_ublox_hitl.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_ublox_hitl.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# UBlox Hardware In The Loop
diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox_utm.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox_utm.makefile
index 368d4e76a8..1680755f90 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_ublox_utm.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_ublox_utm.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
# UBlox LEA 4P
diff --git a/conf/autopilot/subsystems/fixedwing/gps_xsens.makefile b/conf/autopilot/subsystems/fixedwing/gps_xsens.makefile
index ed0607f397..0d5dba7efd 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_xsens.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_xsens.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# XSens Mti-G
diff --git a/conf/autopilot/subsystems/fixedwing/gyro_pitch.makefile b/conf/autopilot/subsystems/fixedwing/gyro_pitch.makefile
index c427d880c9..8984413809 100644
--- a/conf/autopilot/subsystems/fixedwing/gyro_pitch.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gyro_pitch.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# additional pitch stabilization with gyro
#
# this assumes you are already using a roll gyro
diff --git a/conf/autopilot/subsystems/fixedwing/gyro_roll.makefile b/conf/autopilot/subsystems/fixedwing/gyro_roll.makefile
index 9f4dc97352..78310a527d 100644
--- a/conf/autopilot/subsystems/fixedwing/gyro_roll.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gyro_roll.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# roll stabilization with gyro
#
diff --git a/conf/autopilot/subsystems/fixedwing/i2c.makefile b/conf/autopilot/subsystems/fixedwing/i2c.makefile
index faf4335abf..73ee98b011 100644
--- a/conf/autopilot/subsystems/fixedwing/i2c.makefile
+++ b/conf/autopilot/subsystems/fixedwing/i2c.makefile
@@ -1,3 +1,2 @@
#generic i2c driver
-$(TARGET).srcs += mcu_periph/i2c.c
-$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
+$(warning The i2c subsystem does not have to be specified explicitly anymore, it is always included now. Please remove the line from the firmware section of your airframe file!)
diff --git a/conf/autopilot/subsystems/fixedwing/imu_analog.makefile b/conf/autopilot/subsystems/fixedwing/imu_analog.makefile
index dbf35a8755..e4ed406a7d 100644
--- a/conf/autopilot/subsystems/fixedwing/imu_analog.makefile
+++ b/conf/autopilot/subsystems/fixedwing/imu_analog.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
#
# Analog IMU connected to MCU ADC ports
#
diff --git a/conf/autopilot/subsystems/fixedwing/imu_aspirin_i2c.makefile b/conf/autopilot/subsystems/fixedwing/imu_aspirin_i2c.makefile
index 87d72683c7..850ae5ca01 100644
--- a/conf/autopilot/subsystems/fixedwing/imu_aspirin_i2c.makefile
+++ b/conf/autopilot/subsystems/fixedwing/imu_aspirin_i2c.makefile
@@ -1,4 +1,4 @@
-
+# Hey Emacs, this is a -*- makefile -*-
include $(CFG_FIXEDWING)/imu_ppzuav.makefile
diff --git a/conf/autopilot/subsystems/fixedwing/imu_booz.makefile b/conf/autopilot/subsystems/fixedwing/imu_booz.makefile
index 34dcab210d..3a203f0da1 100644
--- a/conf/autopilot/subsystems/fixedwing/imu_booz.makefile
+++ b/conf/autopilot/subsystems/fixedwing/imu_booz.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
#
# Booz2 IMU booz2v1.2
#
diff --git a/conf/autopilot/subsystems/fixedwing/imu_ppzuav.makefile b/conf/autopilot/subsystems/fixedwing/imu_ppzuav.makefile
index c7a4b3910a..5f244ecdca 100644
--- a/conf/autopilot/subsystems/fixedwing/imu_ppzuav.makefile
+++ b/conf/autopilot/subsystems/fixedwing/imu_ppzuav.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
IMU_PPZUAV_CFLAGS = -DUSE_IMU
IMU_PPZUAV_CFLAGS += -DIMU_TYPE_H=\"modules/sensors/imu_ppzuav.h\"
diff --git a/conf/autopilot/subsystems/fixedwing/joystick.makefile b/conf/autopilot/subsystems/fixedwing/joystick.makefile
index bdbba85b10..00d7ed9fd4 100644
--- a/conf/autopilot/subsystems/fixedwing/joystick.makefile
+++ b/conf/autopilot/subsystems/fixedwing/joystick.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# joystick for fixedwings
$(TARGET).srcs += joystick.c
diff --git a/conf/autopilot/subsystems/fixedwing/navigation.makefile b/conf/autopilot/subsystems/fixedwing/navigation.makefile
index 5f699bc858..cdf3af3921 100644
--- a/conf/autopilot/subsystems/fixedwing/navigation.makefile
+++ b/conf/autopilot/subsystems/fixedwing/navigation.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# Standard fixed wing navigation
diff --git a/conf/autopilot/subsystems/fixedwing/navigation_bomb.makefile b/conf/autopilot/subsystems/fixedwing/navigation_bomb.makefile
index de839f98a0..257e563c04 100644
--- a/conf/autopilot/subsystems/fixedwing/navigation_bomb.makefile
+++ b/conf/autopilot/subsystems/fixedwing/navigation_bomb.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# standard and extra fixed wing navigation
diff --git a/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile b/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile
index 0ddcd7ca86..933150953b 100644
--- a/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile
+++ b/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# standard and extra fixed wing navigation
diff --git a/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile b/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile
index dc36fad956..6e22edbcc0 100644
--- a/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile
+++ b/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
NORADIO = False
diff --git a/conf/autopilot/subsystems/fixedwing/spi.makefile b/conf/autopilot/subsystems/fixedwing/spi.makefile
index d6ff15a24a..882bfbed79 100644
--- a/conf/autopilot/subsystems/fixedwing/spi.makefile
+++ b/conf/autopilot/subsystems/fixedwing/spi.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
#generic spi driver
$(TARGET).CFLAGS += -DUSE_SPI
diff --git a/conf/autopilot/subsystems/fixedwing/spi_slave_hs.makefile b/conf/autopilot/subsystems/fixedwing/spi_slave_hs.makefile
index f9f6826f98..bfb9eccc0f 100644
--- a/conf/autopilot/subsystems/fixedwing/spi_slave_hs.makefile
+++ b/conf/autopilot/subsystems/fixedwing/spi_slave_hs.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
#generic spi driver
$(TARGET).CFLAGS += -DUSE_SPI
diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile
index 594c6052f0..72ce361ba5 100644
--- a/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile
+++ b/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
ap.CFLAGS += -DUSE_$(MODEM_PORT)
diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile
index ac76515036..c9aa7a200b 100644
--- a/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile
+++ b/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
#serial USB (e.g. /dev/ttyACM0)
diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile
index eb0615df97..1332413a75 100644
--- a/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile
+++ b/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
# XBee modems in API mode
ap.CFLAGS += -DUSE_$(MODEM_PORT)
diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile
index 457f08f575..ca1db41118 100644
--- a/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile
@@ -1,16 +1,3 @@
-#
-# Fixed point complementary filter using euler angles for attitude estimation
-#
+include $(CFG_ROTORCRAFT)/ahrs_int_cmpl_euler.makefile
-ifdef AHRS_ALIGNER_LED
-ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
-endif
-ap.CFLAGS += -DUSE_AHRS_CMPL
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c
-
-sim.CFLAGS += -DUSE_AHRS_CMPL -DAHRS_ALIGNER_LED=3
-sim.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
-sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
-sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c
+$(warning The ahrs_cmpl subsystem has been renamed, please replace with in your airframe file.)
diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_ic.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_ic.makefile
index 193d347d13..b0a9744e32 100644
--- a/conf/autopilot/subsystems/rotorcraft/ahrs_ic.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/ahrs_ic.makefile
@@ -1,23 +1,3 @@
-#
-# AHRS_PROPAGATE_FREQUENCY
-# AHRS_H_X
-# AHRS_H_Y
-# AHRS_H_Z
-#
-
-AHRS_CFLAGS = -DUSE_AHRS
-ifdef AHRS_ALIGNER_LED
-AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
-endif
-AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl.h\"
-AHRS_SRCS += subsystems/ahrs.c
-AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl.c
-AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
-
-ap.CFLAGS += $(AHRS_CFLAGS)
-ap.srcs += $(AHRS_SRCS)
-
-sim.CFLAGS += $(AHRS_CFLAGS)
-sim.srcs += $(AHRS_SRCS)
-
+include $(CFG_ROTORCRAFT)/ahrs_int_cmpl_quat.makefile
+$(warning The ahrs_ic subsystem has been renamed, please replace with in your airframe file.)
diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile
new file mode 100644
index 0000000000..457f08f575
--- /dev/null
+++ b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile
@@ -0,0 +1,16 @@
+#
+# Fixed point complementary filter using euler angles for attitude estimation
+#
+
+ifdef AHRS_ALIGNER_LED
+ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
+endif
+ap.CFLAGS += -DUSE_AHRS_CMPL
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c
+
+sim.CFLAGS += -DUSE_AHRS_CMPL -DAHRS_ALIGNER_LED=3
+sim.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
+sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
+sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c
diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile
new file mode 100644
index 0000000000..b42b2e0370
--- /dev/null
+++ b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile
@@ -0,0 +1,24 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# AHRS_PROPAGATE_FREQUENCY
+# AHRS_H_X
+# AHRS_H_Y
+# AHRS_H_Z
+#
+
+AHRS_CFLAGS = -DUSE_AHRS
+ifdef AHRS_ALIGNER_LED
+AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
+endif
+AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl.h\"
+AHRS_SRCS += subsystems/ahrs.c
+AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl.c
+AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
+
+ap.CFLAGS += $(AHRS_CFLAGS)
+ap.srcs += $(AHRS_SRCS)
+
+sim.CFLAGS += $(AHRS_CFLAGS)
+sim.srcs += $(AHRS_SRCS)
+
+
diff --git a/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile b/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
index b927407e01..1ddafe759c 100644
--- a/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
#
# SITL Simulator
#
diff --git a/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile b/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile
index 14073950e1..c875eebb7f 100644
--- a/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
ap.srcs += $(SRC_SUBSYSTEMS)/gps.c
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
diff --git a/conf/boards/lisa_l_1.0.makefile b/conf/boards/lisa_l_1.0.makefile
index 0459e71ac0..88a04653be 100644
--- a/conf/boards/lisa_l_1.0.makefile
+++ b/conf/boards/lisa_l_1.0.makefile
@@ -1,3 +1,4 @@
+# Hey Emacs, this is a -*- makefile -*-
#
# lisa_l_1.0.makefile
#
diff --git a/conf/boards/lisa_l_1.1.makefile b/conf/boards/lisa_l_1.1.makefile
index 0c0cc40249..6f15ce905f 100644
--- a/conf/boards/lisa_l_1.1.makefile
+++ b/conf/boards/lisa_l_1.1.makefile
@@ -1,3 +1,5 @@
+# Hey Emacs, this is a -*- makefile -*-
+
include $(PAPARAZZI_SRC)/conf/boards/lisa_l_1.0.makefile
#
@@ -6,4 +8,4 @@ include $(PAPARAZZI_SRC)/conf/boards/lisa_l_1.0.makefile
# v1.1
#
MAX_1168_DRDY_PORT = _GPIOB
-MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOB
\ No newline at end of file
+MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOB
diff --git a/sw/airborne/subsystems/ahrs.h b/sw/airborne/subsystems/ahrs.h
index 7d358b9288..1db3f55b4e 100644
--- a/sw/airborne/subsystems/ahrs.h
+++ b/sw/airborne/subsystems/ahrs.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2008-2010 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -27,8 +25,6 @@
#include "std.h"
#include "math/pprz_algebra_int.h"
#include "math/pprz_algebra_float.h"
-// FIXME : this should no be needed here
-//#include "subsystems/ahrs/ahrs_aligner.h"
#define AHRS_UNINIT 0
#define AHRS_RUNNING 1
diff --git a/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c b/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c
index 71fa6a5af7..5979a38246 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c
+++ b/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2010 The Paparazzi Team
*
* This file is part of paparazzi.
diff --git a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.c b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.c
index bcf3c695d2..ffd50c40aa 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.c
+++ b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2008-2011 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -83,13 +81,16 @@ void ahrs_init(void) {
ahrs.status = AHRS_UNINIT;
- // FIXME: make ltp_to_imu and ltp_to_body coherent
+ /* set ltp_to_body to zero */
INT_EULERS_ZERO(ahrs.ltp_to_body_euler);
- INT_EULERS_ZERO(ahrs.ltp_to_imu_euler);
INT32_QUAT_ZERO(ahrs.ltp_to_body_quat);
- INT32_QUAT_ZERO(ahrs.ltp_to_imu_quat);
INT32_RMAT_ZERO(ahrs.ltp_to_body_rmat);
INT_RATES_ZERO(ahrs.body_rate);
+
+ /* set ltp_to_imu so that body is zero */
+ QUAT_COPY(ahrs.ltp_to_imu_quat, imu.body_to_imu_quat);
+ RMAT_COPY(ahrs.ltp_to_imu_rmat, imu.body_to_imu_rmat);
+ INT32_EULERS_OF_RMAT(ahrs.ltp_to_imu_euler, ahrs.ltp_to_imu_rmat);
INT_RATES_ZERO(ahrs.imu_rate);
INT_RATES_ZERO(ahrs_impl.gyro_bias);
@@ -100,7 +101,6 @@ void ahrs_init(void) {
void ahrs_align(void) {
-
/* Compute an initial orientation using euler angles */
ahrs_int_get_euler_from_accel_mag(&ahrs.ltp_to_imu_euler, &ahrs_aligner.lp_accel, &ahrs_aligner.lp_mag);
/* Convert initial orientation in quaternion and rotation matrice representations. */
@@ -345,7 +345,7 @@ void ahrs_update_fw_estimator(void)
estimator_psi = att.psi;
struct FloatRates rates;
- RATES_FLOAT_OF_BFP(rates, ahrs_float.body_rate);
+ RATES_FLOAT_OF_BFP(rates, ahrs.body_rate);
estimator_p = rates.p;
estimator_q = rates.q;
diff --git a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.h b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.h
index 4671621d26..faabe79bb6 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.h
+++ b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2011 The Paparazzi Team
*
* This file is part of paparazzi.
diff --git a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c
index 222673709e..7b95101f01 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c
+++ b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2008-2010 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -30,6 +28,11 @@
#include "generated/airframe.h"
+#ifndef FACE_REINJ_1
+#define FACE_REINJ_1 1024
+#endif
+
+
struct AhrsIntCmplEuler ahrs_impl;
static inline void get_phi_theta_measurement_fom_accel(int32_t* phi_meas, int32_t* theta_meas, struct Int32Vect3 accel);
@@ -48,12 +51,19 @@ static inline void compute_body_orientation(void);
void ahrs_init(void) {
ahrs.status = AHRS_UNINIT;
+
+ /* set ltp_to_body to zero */
INT_EULERS_ZERO(ahrs.ltp_to_body_euler);
- INT_EULERS_ZERO(ahrs.ltp_to_imu_euler);
INT32_QUAT_ZERO(ahrs.ltp_to_body_quat);
- INT32_QUAT_ZERO(ahrs.ltp_to_imu_quat);
+ INT32_RMAT_ZERO(ahrs.ltp_to_body_rmat);
INT_RATES_ZERO(ahrs.body_rate);
+
+ /* set ltp_to_imu so that body is zero */
+ QUAT_COPY(ahrs.ltp_to_imu_quat, imu.body_to_imu_quat);
+ RMAT_COPY(ahrs.ltp_to_imu_rmat, imu.body_to_imu_rmat);
+ INT32_EULERS_OF_RMAT(ahrs.ltp_to_imu_euler, ahrs.ltp_to_imu_rmat);
INT_RATES_ZERO(ahrs.imu_rate);
+
INT_RATES_ZERO(ahrs_impl.gyro_bias);
ahrs_impl.reinj_1 = FACE_REINJ_1;
@@ -217,3 +227,34 @@ __attribute__ ((always_inline)) static inline void compute_body_orientation(void
INT32_RMAT_TRANSP_RATEMULT(ahrs.body_rate, imu.body_to_imu_rmat, ahrs.imu_rate);
}
+
+
+#ifdef AHRS_UPDATE_FW_ESTIMATOR
+// TODO use ahrs result directly
+#include "estimator.h"
+// remotely settable
+#ifndef INS_ROLL_NEUTRAL_DEFAULT
+#define INS_ROLL_NEUTRAL_DEFAULT 0
+#endif
+#ifndef INS_PITCH_NEUTRAL_DEFAULT
+#define INS_PITCH_NEUTRAL_DEFAULT 0
+#endif
+float ins_roll_neutral = INS_ROLL_NEUTRAL_DEFAULT;
+float ins_pitch_neutral = INS_PITCH_NEUTRAL_DEFAULT;
+void ahrs_update_fw_estimator(void)
+{
+ struct FloatEulers att;
+ // export results to estimator
+ EULERS_FLOAT_OF_BFP(att, ahrs.ltp_to_body_euler);
+
+ estimator_phi = att.phi - ins_roll_neutral;
+ estimator_theta = att.theta - ins_pitch_neutral;
+ estimator_psi = att.psi;
+
+ struct FloatRates rates;
+ RATES_FLOAT_OF_BFP(rates, ahrs.body_rate);
+ estimator_p = rates.p;
+ estimator_q = rates.q;
+
+}
+#endif //AHRS_UPDATE_FW_ESTIMATOR
diff --git a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.h b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.h
index f2a5e74b6b..b6ad467aa4 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.h
+++ b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2008-2010 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -39,4 +37,12 @@ struct AhrsIntCmplEuler {
extern struct AhrsIntCmplEuler ahrs_impl;
+
+#ifdef AHRS_UPDATE_FW_ESTIMATOR
+// TODO copy ahrs to state instead of estimator
+void ahrs_update_fw_estimator(void);
+extern float ins_roll_neutral;
+extern float ins_pitch_neutral;
+#endif
+
#endif /* AHRS_INT_CMPL_EULER_H */