mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[conf] cleanup ahrs makefiles
This commit is contained in:
@@ -1 +0,0 @@
|
||||
$(error The ahrs_dcm subsystem has been renamed, please replace <subsystem name="ahrs" type="dcm"/> with <subsystem name="ahrs" type="float_dcm"/> in your airframe file.)
|
||||
@@ -5,38 +5,20 @@
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
# for fixedwings disable mag by default
|
||||
USE_MAGNETOMETER ?= 0
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_CFLAGS = -DUSE_AHRS
|
||||
AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_CFLAGS += -DUSE_MAGNETOMETER
|
||||
else
|
||||
AHRS_CFLAGS += -DAHRS_USE_GPS_HEADING
|
||||
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
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
AHRS_CFLAGS += -DAHRS_PROPAGATE_QUAT
|
||||
AHRS_SRCS += subsystems/ahrs.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_float_cmpl.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_float_cmpl_wrapper.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
ap.CFLAGS += $(AHRS_CFLAGS)
|
||||
ap.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# NPS uses the real algorithm
|
||||
#
|
||||
nps.CFLAGS += $(AHRS_CFLAGS)
|
||||
nps.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
|
||||
@@ -5,38 +5,20 @@
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
# for fixedwings disable mag by default
|
||||
USE_MAGNETOMETER ?= 0
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_CFLAGS = -DUSE_AHRS
|
||||
AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_CFLAGS += -DUSE_MAGNETOMETER
|
||||
else
|
||||
AHRS_CFLAGS += -DAHRS_USE_GPS_HEADING
|
||||
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
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_wrapper.h\"
|
||||
AHRS_CFLAGS += -DAHRS_PROPAGATE_RMAT
|
||||
AHRS_SRCS += subsystems/ahrs.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_float_cmpl.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_float_cmpl_wrapper.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
ap.CFLAGS += $(AHRS_CFLAGS)
|
||||
ap.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# NPS uses the real algorithm
|
||||
#
|
||||
nps.CFLAGS += $(AHRS_CFLAGS)
|
||||
nps.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
@@ -48,4 +30,3 @@ ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
# attitude estimation for fixedwings via dcm algorithm
|
||||
|
||||
USE_MAGNETOMETER ?= 0
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm_wrapper.h\"
|
||||
AHRS_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
AHRS_CFLAGS += -DUSE_AHRS
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_CFLAGS += -DUSE_MAGNETOMETER
|
||||
endif
|
||||
|
||||
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs.c
|
||||
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
|
||||
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
|
||||
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm_wrapper.c
|
||||
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
|
||||
ap.CFLAGS += $(AHRS_CFLAGS)
|
||||
ap.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# NPS uses the real algorithm
|
||||
#
|
||||
nps.CFLAGS += $(AHRS_CFLAGS)
|
||||
nps.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# 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,20 +0,0 @@
|
||||
# Fixedwing AHRS module 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)
|
||||
@@ -5,37 +5,20 @@
|
||||
# AHRS_H_Z
|
||||
#
|
||||
|
||||
# for fixedwings disable mag by default
|
||||
USE_MAGNETOMETER ?= 0
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
|
||||
AHRS_CFLAGS = -DUSE_AHRS
|
||||
AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
AHRS_CFLAGS += -DUSE_MAGNETOMETER
|
||||
else
|
||||
AHRS_CFLAGS += -DAHRS_USE_GPS_HEADING
|
||||
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
|
||||
|
||||
ifneq ($(AHRS_ALIGNER_LED),none)
|
||||
AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
|
||||
endif
|
||||
|
||||
AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.h\"
|
||||
AHRS_SRCS += subsystems/ahrs.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl_quat.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_int_cmpl_quat_wrapper.c
|
||||
AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
|
||||
|
||||
ap.CFLAGS += $(AHRS_CFLAGS)
|
||||
ap.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# NPS uses the real algorithm
|
||||
#
|
||||
nps.CFLAGS += $(AHRS_CFLAGS)
|
||||
nps.srcs += $(AHRS_SRCS)
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
#
|
||||
|
||||
@@ -40,11 +40,8 @@ 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
|
||||
|
||||
ap.CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
ap.srcs += $(AHRS_FC_SRCS)
|
||||
|
||||
nps.CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
nps.srcs += $(AHRS_FC_SRCS)
|
||||
|
||||
test_ahrs.CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
test_ahrs.srcs += $(AHRS_FC_SRCS)
|
||||
# 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
|
||||
|
||||
@@ -39,11 +39,9 @@ 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
|
||||
|
||||
ap.CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
ap.srcs += $(AHRS_FC_SRCS)
|
||||
|
||||
nps.CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
nps.srcs += $(AHRS_FC_SRCS)
|
||||
|
||||
test_ahrs.CFLAGS += $(AHRS_FC_CFLAGS)
|
||||
test_ahrs.srcs += $(AHRS_FC_SRCS)
|
||||
# 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
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
# 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)
|
||||
|
||||
@@ -38,11 +38,8 @@ 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
|
||||
|
||||
ap.CFLAGS += $(AHRS_MLKF_CFLAGS)
|
||||
ap.srcs += $(AHRS_MLKF_SRCS)
|
||||
|
||||
nps.CFLAGS += $(AHRS_MLKF_CFLAGS)
|
||||
nps.srcs += $(AHRS_MLKF_SRCS)
|
||||
|
||||
test_ahrs.CFLAGS += $(AHRS_MLKF_CFLAGS)
|
||||
test_ahrs.srcs += $(AHRS_MLKF_SRCS)
|
||||
# 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
|
||||
|
||||
@@ -37,11 +37,12 @@ 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
|
||||
|
||||
ap.CFLAGS += $(AHRS_ICE_CFLAGS)
|
||||
ap.srcs += $(AHRS_ICE_SRCS)
|
||||
# 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
|
||||
|
||||
nps.CFLAGS += $(AHRS_ICE_CFLAGS)
|
||||
nps.srcs += $(AHRS_ICE_SRCS)
|
||||
|
||||
#
|
||||
# Simple simulation of the AHRS result
|
||||
@@ -54,6 +55,3 @@ ahrssim_srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
|
||||
|
||||
sim.CFLAGS += $(ahrssim_CFLAGS)
|
||||
sim.srcs += $(ahrssim_srcs)
|
||||
|
||||
test_ahrs.CFLAGS += $(AHRS_ICE_CFLAGS)
|
||||
test_ahrs.srcs += $(AHRS_ICE_SRCS)
|
||||
|
||||
@@ -39,11 +39,8 @@ 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
|
||||
|
||||
ap.CFLAGS += $(AHRS_ICQ_CFLAGS)
|
||||
ap.srcs += $(AHRS_ICQ_SRCS)
|
||||
|
||||
nps.CFLAGS += $(AHRS_ICQ_CFLAGS)
|
||||
nps.srcs += $(AHRS_ICQ_SRCS)
|
||||
|
||||
test_ahrs.CFLAGS += $(AHRS_ICQ_CFLAGS)
|
||||
test_ahrs.srcs += $(AHRS_ICQ_SRCS)
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user