diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile index cc1374d385..9171256a81 100644 --- a/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile +++ b/conf/autopilot/subsystems/rotorcraft/ahrs_cmpl.makefile @@ -1,13 +1,13 @@ # -# Complementary filter for attitude estimation +# Fixed point complementary filter using euler angles for attitude estimation # ap.CFLAGS += -DUSE_AHRS_CMPL -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) -DAHRS_FIXED_POINT ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c -ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_cmpl_euler.c +ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c sim.CFLAGS += -DUSE_AHRS_CMPL -DAHRS_ALIGNER_LED=3 -DAHRS_FIXED_POINT sim.srcs += $(SRC_SUBSYSTEMS)/ahrs.c sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c -sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_cmpl_euler.c +sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c diff --git a/sw/airborne/firmwares/rotorcraft/telemetry.h b/sw/airborne/firmwares/rotorcraft/telemetry.h index 5b702b387f..90abfa9bca 100644 --- a/sw/airborne/firmwares/rotorcraft/telemetry.h +++ b/sw/airborne/firmwares/rotorcraft/telemetry.h @@ -325,24 +325,24 @@ extern uint8_t telemetry_mode_Main_DefaultChannel; #ifdef USE_AHRS_CMPL -#include "subsystems/ahrs/ahrs_cmpl_euler.h" -#define PERIODIC_SEND_FILTER(_chan) { \ - DOWNLINK_SEND_FILTER(_chan, \ - &ahrs.ltp_to_imu_euler.phi, \ - &ahrs.ltp_to_imu_euler.theta, \ - &ahrs.ltp_to_imu_euler.psi, \ - &face_measure.phi, \ - &face_measure.theta, \ - &face_measure.psi, \ - &face_corrected.phi, \ - &face_corrected.theta, \ - &face_corrected.psi, \ - &face_residual.phi, \ - &face_residual.theta, \ - &face_residual.psi, \ - &face_gyro_bias.p, \ - &face_gyro_bias.q, \ - &face_gyro_bias.r); \ +#include "subsystems/ahrs/ahrs_int_cmpl_euler.h" +#define PERIODIC_SEND_FILTER(_chan) { \ + DOWNLINK_SEND_FILTER(_chan, \ + &ahrs.ltp_to_imu_euler.phi, \ + &ahrs.ltp_to_imu_euler.theta, \ + &ahrs.ltp_to_imu_euler.psi, \ + &face_measure.phi, \ + &face_measure.theta, \ + &face_measure.psi, \ + &face_corrected.phi, \ + &face_corrected.theta, \ + &face_corrected.psi, \ + &face_residual.phi, \ + &face_residual.theta, \ + &face_residual.psi, \ + &face_gyro_bias.p, \ + &face_gyro_bias.q, \ + &face_gyro_bias.r); \ } #else #define PERIODIC_SEND_FILTER(_chan) {} diff --git a/sw/airborne/subsystems/ahrs/ahrs_cmpl_euler.c b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c similarity index 98% rename from sw/airborne/subsystems/ahrs/ahrs_cmpl_euler.c rename to sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c index 33273aa3a0..5dfacda61d 100644 --- a/sw/airborne/subsystems/ahrs/ahrs_cmpl_euler.c +++ b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c @@ -1,7 +1,7 @@ /* * $Id: $ * - * Copyright (C) 2008-2009 Antoine Drouin + * Copyright (C) 2008-2010 The Paparazzi Team * * This file is part of paparazzi. * @@ -21,7 +21,7 @@ * Boston, MA 02111-1307, USA. */ -#include "ahrs_cmpl_euler.h" +#include "ahrs_int_cmpl_euler.h" #include "subsystems/imu.h" #include "subsystems/ahrs/ahrs_aligner.h" diff --git a/sw/airborne/subsystems/ahrs/ahrs_cmpl_euler.h b/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.h similarity index 100% rename from sw/airborne/subsystems/ahrs/ahrs_cmpl_euler.h rename to sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.h