mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 08:22:43 +08:00
[ahrs] convert ahrs subsystems to modules
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
# for fixedwings disable mag by default
|
||||
USE_MAGNETOMETER ?= 0
|
||||
|
||||
|
||||
include $(CFG_SHARED)/ahrs_float_cmpl_quat.makefile
|
||||
|
||||
# add some fixedwing specific flags
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN
|
||||
ifneq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
$(TARGET).CFLAGS += -DAHRS_USE_GPS_HEADING
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
ahrssim_CFLAGS = -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
|
||||
ahrssim_CFLAGS += -DUSE_AHRS
|
||||
|
||||
ahrssim_srcs = $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
@@ -1,32 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
# for fixedwings disable mag by default
|
||||
USE_MAGNETOMETER ?= 0
|
||||
|
||||
|
||||
include $(CFG_SHARED)/ahrs_float_cmpl_rmat.makefile
|
||||
|
||||
# add some fixedwing specific flags
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN
|
||||
ifneq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
$(TARGET).CFLAGS += -DAHRS_USE_GPS_HEADING
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
ahrssim_CFLAGS = -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
|
||||
ahrssim_CFLAGS += -DUSE_AHRS
|
||||
|
||||
ahrssim_srcs = $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
@@ -1 +0,0 @@
|
||||
$(error The ahrs_infrared subsystem has converted to a module, please remove it and add <load name="ahrs_infrared.xml"/> to your module section.)
|
||||
@@ -1,33 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
# for fixedwings disable mag by default
|
||||
USE_MAGNETOMETER ?= 0
|
||||
|
||||
|
||||
include $(CFG_SHARED)/ahrs_int_cmpl_quat.makefile
|
||||
|
||||
# add some fixedwing specific flags
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN
|
||||
ifneq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
$(TARGET).CFLAGS += -DAHRS_USE_GPS_HEADING
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
ahrssim_CFLAGS = -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
|
||||
ahrssim_CFLAGS += -DUSE_AHRS
|
||||
|
||||
ahrssim_srcs = $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
USE_MAGNETOMETER ?= 1
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_FINV_CFLAGS = -DUSE_AHRS
|
||||
AHRS_FINV_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_FINV_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_FINV_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), fcq float_cmpl_quat))
|
||||
# this is the secondary AHRS
|
||||
AHRS_FINV_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_invariant_wrapper.h\"
|
||||
AHRS_FINV_CFLAGS += -DSECONDARY_AHRS=ahrs_float_invariant
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_FINV_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_invariant_wrapper.h\"
|
||||
AHRS_FINV_CFLAGS += -DPRIMARY_AHRS=ahrs_float_invariant
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_FINV_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_invariant_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_FINV_SRCS += subsystems/ahrs.c
|
||||
AHRS_FINV_SRCS += subsystems/ahrs/ahrs_float_invariant.c
|
||||
AHRS_FINV_SRCS += subsystems/ahrs/ahrs_float_invariant_wrapper.c
|
||||
AHRS_FINV_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_FINV_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_FINV_SRCS)
|
||||
endif
|
||||
@@ -1,47 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
USE_MAGNETOMETER ?= 1
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_FC_CFLAGS = -DUSE_AHRS
|
||||
AHRS_FC_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_FC_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_FC_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), fcq float_cmpl_quat))
|
||||
# this is the secondary AHRS
|
||||
AHRS_FC_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
AHRS_FC_CFLAGS += -DSECONDARY_AHRS=ahrs_fc
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_FC_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
AHRS_FC_CFLAGS += -DPRIMARY_AHRS=ahrs_fc
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_FC_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_FC_CFLAGS += -DAHRS_PROPAGATE_QUAT
|
||||
AHRS_FC_SRCS += subsystems/ahrs.c
|
||||
AHRS_FC_SRCS += subsystems/ahrs/ahrs_float_cmpl.c
|
||||
AHRS_FC_SRCS += subsystems/ahrs/ahrs_float_cmpl_wrapper.c
|
||||
AHRS_FC_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_FC_SRCS)
|
||||
endif
|
||||
@@ -1,47 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
USE_MAGNETOMETER ?= 1
|
||||
|
||||
AHRS_FC_CFLAGS = -DUSE_AHRS
|
||||
AHRS_FC_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_FC_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_FC_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), fcr float_cmpl_rmat))
|
||||
# this is the secondary AHRS
|
||||
AHRS_FC_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
AHRS_FC_CFLAGS += -DSECONDARY_AHRS=ahrs_fc
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_FC_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
AHRS_FC_CFLAGS += -DPRIMARY_AHRS=ahrs_fc
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_FC_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_FC_CFLAGS += -DAHRS_PROPAGATE_RMAT
|
||||
AHRS_FC_SRCS += subsystems/ahrs.c
|
||||
AHRS_FC_SRCS += subsystems/ahrs/ahrs_float_cmpl.c
|
||||
AHRS_FC_SRCS += subsystems/ahrs/ahrs_float_cmpl_wrapper.c
|
||||
AHRS_FC_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_FC_SRCS)
|
||||
endif
|
||||
@@ -1,57 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
# attitude estimation for fixedwings via dcm algorithm
|
||||
|
||||
USE_MAGNETOMETER ?= 0
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_DCM_CFLAGS = -DUSE_AHRS
|
||||
AHRS_DCM_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_DCM_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_DCM_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), dcm float_dcm))
|
||||
# this is the secondary AHRS
|
||||
AHRS_DCM_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
AHRS_DCM_CFLAGS += -DSECONDARY_AHRS=ahrs_dcm
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_DCM_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
AHRS_DCM_CFLAGS += -DPRIMARY_AHRS=ahrs_dcm
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_DCM_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_DCM_SRCS += $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
AHRS_DCM_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
|
||||
AHRS_DCM_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
|
||||
AHRS_DCM_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm_wrapper.c
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_DCM_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_DCM_SRCS)
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
ahrssim_CFLAGS = -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
|
||||
ahrssim_CFLAGS += -DUSE_AHRS
|
||||
|
||||
ahrssim_srcs = $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
#
|
||||
|
||||
USE_MAGNETOMETER ?= 1
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_MLKF_CFLAGS = -DUSE_AHRS
|
||||
AHRS_MLKF_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_MLKF_CFLAGS += -DUSE_MAGNETOMETER
|
||||
else
|
||||
$(error ahrs_float_mlkf needs a magnetometer)
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_MLKF_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), mlkf))
|
||||
# this is the secondary AHRS
|
||||
AHRS_MLKF_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf_wrapper.h\"
|
||||
AHRS_MLKF_CFLAGS += -DSECONDARY_AHRS=ahrs_mlkf
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_MLKF_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf_wrapper.h\"
|
||||
AHRS_MLKF_CFLAGS += -DPRIMARY_AHRS=ahrs_mlkf
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_MLKF_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_MLKF_SRCS += subsystems/ahrs.c
|
||||
AHRS_MLKF_SRCS += subsystems/ahrs/ahrs_float_mlkf.c
|
||||
AHRS_MLKF_SRCS += subsystems/ahrs/ahrs_float_mlkf_wrapper.c
|
||||
AHRS_MLKF_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_MLKF_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_MLKF_SRCS)
|
||||
endif
|
||||
@@ -1,20 +0,0 @@
|
||||
# AHRS subsystem for GX3
|
||||
# 2013, Utah State University, http://aggieair.usu.edu/
|
||||
|
||||
GX3_PORT ?= UART3
|
||||
GX3_BAUD ?= B921600
|
||||
|
||||
AHRS_CFLAGS = -DUSE_AHRS
|
||||
AHRS_CFLAGS += -DUSE_IMU
|
||||
|
||||
AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_gx3.h\"
|
||||
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
AHRS_SRCS += $(SRC_SUBSYSTEMS)/imu.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_gx3.c
|
||||
|
||||
GX3_PORT_LOWER=$(shell echo $(GX3_PORT) | tr A-Z a-z)
|
||||
AHRS_CFLAGS += -DUSE_$(GX3_PORT) -D$(GX3_PORT)_BAUD=$(GX3_BAUD)
|
||||
AHRS_CFLAGS += -DGX3_PORT=$(GX3_PORT_LOWER)
|
||||
|
||||
ap.CFLAGS += $(AHRS_CFLAGS)
|
||||
ap.srcs += $(AHRS_SRCS)
|
||||
@@ -1,57 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# Fixed point complementary filter using euler angles for attitude estimation
|
||||
#
|
||||
|
||||
USE_MAGNETOMETER ?= 1
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_ICE_CFLAGS = -DUSE_AHRS
|
||||
AHRS_ICE_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_ICE_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_ICE_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), ice int_cmpl_euler))
|
||||
# this is the secondary AHRS
|
||||
AHRS_ICE_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.h\"
|
||||
AHRS_ICE_CFLAGS += -DSECONDARY_AHRS=ahrs_ice
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_ICE_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.h\"
|
||||
AHRS_ICE_CFLAGS += -DPRIMARY_AHRS=ahrs_ice
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_ICE_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_ICE_SRCS += subsystems/ahrs.c
|
||||
AHRS_ICE_SRCS += subsystems/ahrs/ahrs_int_cmpl_euler.c
|
||||
AHRS_ICE_SRCS += subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.c
|
||||
AHRS_ICE_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_ICE_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_ICE_SRCS)
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
ahrssim_CFLAGS = -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
|
||||
ahrssim_CFLAGS += -DUSE_AHRS
|
||||
|
||||
ahrssim_srcs = $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
@@ -1,46 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# AHRS_H_X
|
||||
# AHRS_H_Y
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
USE_MAGNETOMETER ?= 1
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_ICQ_CFLAGS = -DUSE_AHRS
|
||||
AHRS_ICQ_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_ICQ_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_ICQ_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS),ahrs_icq int_cmpl_quat))
|
||||
# this is the secondary AHRS
|
||||
AHRS_ICQ_CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
AHRS_ICQ_CFLAGS += -DSECONDARY_AHRS=ahrs_icq
|
||||
else
|
||||
# this is the primary AHRS
|
||||
AHRS_ICQ_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
AHRS_ICQ_CFLAGS += -DPRIMARY_AHRS=ahrs_icq
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
AHRS_ICQ_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
endif
|
||||
|
||||
AHRS_ICQ_SRCS += subsystems/ahrs.c
|
||||
AHRS_ICQ_SRCS += subsystems/ahrs/ahrs_int_cmpl_quat.c
|
||||
AHRS_ICQ_SRCS += subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.c
|
||||
AHRS_ICQ_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
# add it for all targets except sim and fbw
|
||||
ifeq (,$(findstring $(TARGET),sim fbw))
|
||||
$(TARGET).CFLAGS += $(AHRS_ICQ_CFLAGS)
|
||||
$(TARGET).srcs += $(AHRS_ICQ_SRCS)
|
||||
endif
|
||||
@@ -5,6 +5,7 @@
|
||||
<description>CHimu (SPI)</description>
|
||||
<define name="CHIMU_BIG_ENDIAN" value="TRUE" description="For older CHIMU v1.0 you should define CHIMU_BIG_ENDIAN"/>
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ins_module.h"/>
|
||||
</header>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_float_cmpl_quat" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using complementary filter in floating point.
|
||||
Propagation is done in quaternion representation.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="TRUE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
<makefile target="!sim|fbw" firmware="fixedwing">
|
||||
<configure name="USE_MAGNETOMETER" default="0"/>
|
||||
</makefile>
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="1"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<define name="AHRS_PROPAGATE_QUAT"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_cmpl.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_cmpl_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), fcq float_cmpl_quat))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_fc
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_fc
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_flat_cmpl_rmat" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using complementary filter in floating point.
|
||||
Propagation is done in rotation matrix representation.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="TRUE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
<makefile target="!sim|fbw" firmware="fixedwing">
|
||||
<configure name="USE_MAGNETOMETER" default="0"/>
|
||||
</makefile>
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="1"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<define name="AHRS_PROPAGATE_RMAT"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_cmpl.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_cmpl_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), fcr float_cmpl_rmat))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_fc
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_fc
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_float_dcm" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using DCM filter.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="FALSE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="0"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_dcm.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_dcm_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), dcm float_dcm))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_dcm
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_dcm
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_float_dcm" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using invariant filter.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="TRUE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="1"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_invariant.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_invariant_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), invariant float_invariant))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_invariant_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_float_invariant
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_invariant_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_float_invariant
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_invariant_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_float_mlkf" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using MLKF filter.
|
||||
Multiplicative Linearized Kalman Filter.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="TRUE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="1"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_mlkf.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_float_mlkf_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), mlkf float_mlkf))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_mlkf
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_mlkf
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_gx3" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS driver for GX3.
|
||||
</description>
|
||||
<configure name="GX3_PORT" value="UART3" description="uart for GX3"/>
|
||||
<configure name="GX3_BAUD" value="B921600" description="GX3 uart baud rate"/>
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="ap">
|
||||
<configure name="GX3_PORT" default="UART3" case="upper|lower"/>
|
||||
<configure name="GX3_BAUD" default="B921600"/>
|
||||
<define name="USE_$(GX3_PORT_UPPER)"/>
|
||||
<define name="$(GX3_PORT_UPPER)_BAUD" value="$(GX3_BAUD)"/>
|
||||
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_IMU"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="imu.c" dir="subsystems"/>
|
||||
<file name="ahrs_gx3.c" dir="subsystems/ahrs"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_int_cmpl_euler" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using complementary filter in fixed point.
|
||||
Propagation is done in euler angles representation.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="TRUE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="1"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_int_cmpl_euler.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_int_cmpl_euler_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), ice int_cmpl_euler))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_ice
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_ice
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_int_cmpl_quat" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
AHRS using complementary filter in fixed point.
|
||||
Propagation is done in quaternion representation.
|
||||
</description>
|
||||
<configure name="USE_MAGNETOMETER" value="TRUE" description="set to FALSE to disable magnetometer"/>
|
||||
<configure name="AHRS_ALIGNER_LED" value="1" description="LED number to indicate AHRS alignment, none to disable (default is board dependent)"/>
|
||||
|
||||
</doc>
|
||||
<autoload name="ahrs_sim"/>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="!sim|fbw" firmware="fixedwing">
|
||||
<configure name="USE_MAGNETOMETER" default="0"/>
|
||||
</makefile>
|
||||
<makefile target="!sim|fbw">
|
||||
<configure name="USE_MAGNETOMETER" default="1"/>
|
||||
<configure name="AHRS_ALIGNER_LED" default="none"/>
|
||||
|
||||
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
|
||||
<define name="AHRS_ALINGER_LED" value="$(AHRS_ALIGNER_LED)" cond="ifneq ($(AHRS_ALIGNER_LED),none)"/>
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="USE_AHRS_ALIGNER"/>
|
||||
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_aligner.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_int_cmpl_quat.c" dir="subsystems/ahrs"/>
|
||||
<file name="ahrs_int_cmpl_quat_wrapper.c" dir="subsystems/ahrs"/>
|
||||
<raw>
|
||||
ifdef SECONDARY_AHRS
|
||||
ifneq (,$(findstring $(SECONDARY_AHRS), icq int_cmpl_quat))
|
||||
# this is the secondary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DSECONDARY_AHRS=ahrs_icq
|
||||
else
|
||||
# this is the primary AHRS
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_icq
|
||||
endif
|
||||
else
|
||||
# plain old single AHRS usage
|
||||
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="ahrs_sim" dir="ahrs">
|
||||
<doc>
|
||||
<description>
|
||||
Simple simulation of the AHRS result.
|
||||
Only for the simple fixedwing sim.
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="ahrs.h" dir="subsystems"/>
|
||||
</header>
|
||||
|
||||
<makefile target="sim">
|
||||
<define name="USE_AHRS"/>
|
||||
<define name="AHRS_TYPE_H" value="subsystems/ahrs/ahrs_sim.h" type="string"/>
|
||||
<file name="ahrs.c" dir="subsystems"/>
|
||||
<file name="ahrs_sim.c" dir="subsystems/ahrs"/>
|
||||
</makefile>
|
||||
</module>
|
||||
Reference in New Issue
Block a user