Skip to content

Commit

Permalink
[fixedwing] ahrs and ins subsystems for nps target
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Jul 15, 2013
1 parent eddc778 commit 62cf74f
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 22 deletions.
Expand Up @@ -36,6 +36,11 @@ ap.srcs += $(AHRS_SRCS)
#ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
#endif

#
# NPS uses the real algorithm
#
nps.CFLAGS += $(AHRS_CFLAGS)
nps.srcs += $(AHRS_SRCS)

#
# Simple simulation of the AHRS result
Expand Down
Expand Up @@ -27,6 +27,8 @@ AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
ap.CFLAGS += $(AHRS_CFLAGS)
ap.srcs += $(AHRS_SRCS)

nps.CFLAGS += $(AHRS_CFLAGS)
nps.srcs += $(AHRS_SRCS)

#
# Simple simulation of the AHRS result
Expand Down
25 changes: 14 additions & 11 deletions conf/firmwares/subsystems/fixedwing/ahrs_float_dcm.makefile
Expand Up @@ -4,26 +4,29 @@

USE_MAGNETOMETER ?= 0

ifeq ($(TARGET), ap)

ap.CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm.h\"
ap.CFLAGS += -DUSE_AHRS_ALIGNER
ap.CFLAGS += -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR
AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm.h\"
AHRS_CFLAGS += -DUSE_AHRS_ALIGNER
AHRS_CFLAGS += -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR

ifneq ($(USE_MAGNETOMETER),0)
ap.CFLAGS += -DUSE_MAGNETOMETER
AHRS_CFLAGS += -DUSE_MAGNETOMETER
endif

ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs.c
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c


ifneq ($(AHRS_ALIGNER_LED),none)
ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
endif

endif

ap.CFLAGS += $(AHRS_CFLAGS)
ap.srcs += $(AHRS_SRCS)

nps.CFLAGS += $(AHRS_CFLAGS)
nps.srcs += $(AHRS_SRCS)


#
Expand Down
Expand Up @@ -22,6 +22,8 @@ AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c
ap.CFLAGS += $(AHRS_CFLAGS)
ap.srcs += $(AHRS_SRCS)

nps.CFLAGS += $(AHRS_CFLAGS)
nps.srcs += $(AHRS_SRCS)

#
# Simple simulation of the AHRS result
Expand Down
4 changes: 4 additions & 0 deletions conf/firmwares/subsystems/fixedwing/ins_alt_float.makefile
Expand Up @@ -3,3 +3,7 @@
ap_CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_alt_float.h\"
ap_srcs += $(SRC_FIXEDWING)/subsystems/ins.c
ap_srcs += $(SRC_FIXEDWING)/subsystems/ins/ins_alt_float.c

nps.CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_alt_float.h\"
nps.srcs += $(SRC_FIXEDWING)/subsystems/ins.c
nps.srcs += $(SRC_FIXEDWING)/subsystems/ins/ins_alt_float.c
Expand Up @@ -2,3 +2,5 @@
ap.srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough.c

sim.srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough.c

nps.srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough.c
23 changes: 12 additions & 11 deletions conf/firmwares/subsystems/fixedwing/ins_xsens.makefile
Expand Up @@ -46,21 +46,22 @@ ap.srcs += $(SRC_SUBSYSTEMS)/gps.c

#########################################
## Simulator
SIM_TARGETS = sim jsbsim nps

sim.CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
sim.CFLAGS += -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR
ifneq (,$(findstring $(TARGET),$(SIM_TARGETS))

sim.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c

sim.srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough.c

sim.CFLAGS += -DUSE_GPS -DGPS_USE_LATLONG
sim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
sim.srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim.c
sim.srcs += $(SRC_SUBSYSTEMS)/gps.c
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
$(TARGET).CFLAGS += -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR

$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ahrs.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c

$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough.c

$(TARGET).CFLAGS += -DUSE_GPS -DGPS_USE_LATLONG
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps.c

endif

0 comments on commit 62cf74f

Please sign in to comment.