From b0ab385067ed673378788a93a7414f5318662dae Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Sun, 15 Aug 2010 22:53:07 +0000 Subject: [PATCH] more subsystem makefiles and some examples --- conf/airframes/AirborneCodeReorg/TinyFw.xml | 11 +- conf/airframes/easystar_ets_example.xml | 192 +++++++++++++++ conf/airframes/easystar_example.xml | 189 +++++++++++++++ conf/airframes/funjet_example.xml | 210 +++++++++++++++++ conf/airframes/microjet_example.xml | 203 ++++++++++++++++ conf/airframes/twinjet_example.xml | 201 ++++++++++++++++ conf/airframes/twinstar_example.xml | 223 ++++++++++++++++++ conf/autopilot/sitl.makefile | 2 +- .../fixedwing_ets_airspeed.makefile | 6 + .../fixedwing_hum_baro_payload.makefile | 7 + .../subsystems/fixedwing_joystick.makefile | 7 + .../fixedwing_telemetry_xbee_api.makefile | 2 +- conf/autopilot/twog_v1.h | 4 + 13 files changed, 1250 insertions(+), 7 deletions(-) create mode 100644 conf/airframes/easystar_ets_example.xml create mode 100644 conf/airframes/easystar_example.xml create mode 100644 conf/airframes/funjet_example.xml create mode 100644 conf/airframes/microjet_example.xml create mode 100644 conf/airframes/twinjet_example.xml create mode 100644 conf/airframes/twinstar_example.xml create mode 100644 conf/autopilot/subsystems/fixedwing_ets_airspeed.makefile create mode 100644 conf/autopilot/subsystems/fixedwing_hum_baro_payload.makefile create mode 100644 conf/autopilot/subsystems/fixedwing_joystick.makefile create mode 100644 conf/autopilot/twog_v1.h diff --git a/conf/airframes/AirborneCodeReorg/TinyFw.xml b/conf/airframes/AirborneCodeReorg/TinyFw.xml index 6eae43bd94..d9027fa7b1 100644 --- a/conf/airframes/AirborneCodeReorg/TinyFw.xml +++ b/conf/airframes/AirborneCodeReorg/TinyFw.xml @@ -1,7 +1,7 @@ @@ -191,14 +191,15 @@ include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_transparent.makefile # Special options -ap.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN - +ap.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO +ap.CFLAGS += -DTRAFFIC_INFO +ap.srcs += traffic_info.c ###################################### # Config for SITL simulation include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile -sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DTRAFFIC_INFO -sim.srcs += nav_survey_rectangle.c traffic_info.c nav_line.c +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO -DTRAFFIC_INFO +sim.srcs += traffic_info.c diff --git a/conf/airframes/easystar_ets_example.xml b/conf/airframes/easystar_ets_example.xml new file mode 100644 index 0000000000..d6780eb312 --- /dev/null +++ b/conf/airframes/easystar_ets_example.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ + +BOARD_CFG = \"twog_v1.h\" + +FLASH_MODE=IAP + +# Board Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile + +# Fixed Wing Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/fixedwing_common.makefile +include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile + +# IO Options +include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4017.makefile + +# Sensors +include $(CFG_FIXEDWING)/subsystems/fixedwing_attitude_infrared.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_ets_airspeed.makefile + +### (UART 0, 38400baud) are the default GPS parameters, change and uncomment if needed +#GPS_UART_NR = 0 +#GPS_BAUD = 38400 +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea5h.makefile + +### (UART 1, 57600baud) are default modem parameters, change and uncomment if needed +#MODEM_UART_NR = 1 +#MODEM_BAUD = 57600 +include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_transparent.makefile + + +# Special options +ap.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO + + +###################################### +# Config for SITL simulation +include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN + + +
diff --git a/conf/airframes/easystar_example.xml b/conf/airframes/easystar_example.xml new file mode 100644 index 0000000000..d7b299299f --- /dev/null +++ b/conf/airframes/easystar_example.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + +
+ +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ +
+ + +
+ + +BOARD_CFG = \"twog_v1.h\" + +FLASH_MODE=IAP + +# Board Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile + +# Fixed Wing Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/fixedwing_common.makefile +include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile + +# IO Options +include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4017.makefile + +# Sensors +include $(CFG_FIXEDWING)/subsystems/fixedwing_attitude_infrared.makefile + +### (UART 0, 38400baud) are the default GPS parameters, change and uncomment if needed +#GPS_UART_NR = 0 +#GPS_BAUD = 38400 +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea5h.makefile + +### (UART 1, 57600baud) are default modem parameters, change and uncomment if needed +#MODEM_UART_NR = 1 +#MODEM_BAUD = 57600 +include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_transparent.makefile + + +# Special options +ap.CFLAGS += -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO + + +###################################### +# Config for SITL simulation +include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DLOITER_TRIM -DALT_KALMAN + + +
diff --git a/conf/airframes/funjet_example.xml b/conf/airframes/funjet_example.xml new file mode 100644 index 0000000000..927bed94a3 --- /dev/null +++ b/conf/airframes/funjet_example.xml @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ + +BOARD_CFG = \"tiny_2_1_1.h\" +FLASH_MODE=IAP + +# Board Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile + +# Fixed Wing Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/fixedwing_common.makefile +include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile + +# IO Options +include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4017.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_joystick.makefile + +# Sensors +include $(CFG_FIXEDWING)/subsystems/fixedwing_attitude_infrared.makefile + +### (UART 0, 38400baud) are the default GPS parameters, change and uncomment if needed +#GPS_UART_NR = 0 +#GPS_BAUD = 38400 +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea5h.makefile + +### (UART 1, 57600baud) are default modem parameters, change and uncomment if needed +#MODEM_UART_NR = 1 +#MODEM_BAUD = 57600 +include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_transparent.makefile + + +# Special options +ap.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO + +ap.CFLAGS += -DTRAFFIC_INFO +ap.srcs += traffic_info.c + + +###################################### +# Config for SITL simulation +include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" + +sim.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN + +sim.CFLAGS +=-DTRAFFIC_INFO +sim.srcs += traffic_info.c + + +
diff --git a/conf/airframes/microjet_example.xml b/conf/airframes/microjet_example.xml new file mode 100644 index 0000000000..0744357615 --- /dev/null +++ b/conf/airframes/microjet_example.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ + + + +
+ +
+ + +
+ + +BOARD_CFG = \"tiny_1_1.h\" + +FLASH_MODE=IAP + +# Board Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile + +# Fixed Wing Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/fixedwing_common.makefile +include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile + +# IO Options +include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4015.makefile + +# Sensors +include $(CFG_FIXEDWING)/subsystems/fixedwing_attitude_infrared.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_gyro.makefile + +### (UART 0, 38400baud) are the default GPS parameters, change and uncomment if needed +#GPS_UART_NR = 0 +#GPS_BAUD = 38400 +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea5h.makefile + +### (UART 1, 57600baud) are default modem parameters, change and uncomment if needed +#MODEM_UART_NR = 1 +#MODEM_BAUD = 57600 +include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_xbee_api.makefile + + +# Special options +ap.CFLAGS += -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO -DAGR_CLIMB + + +###################################### +# Config for SITL simulation +include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DLOITER_TRIM -DALT_KALMAN -DAGR_CLIMB + + +
diff --git a/conf/airframes/twinjet_example.xml b/conf/airframes/twinjet_example.xml new file mode 100644 index 0000000000..ad95ffb81a --- /dev/null +++ b/conf/airframes/twinjet_example.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+ + + + +
+ +
+ + + +
+ +
+ + + + + +
+ + +
+ + + + + + + + +
+ + +BOARD_CFG = \"twog_v1.h\" + +# FLASH_MODE=ISP +FLASH_MODE=IAP + +# Board Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile + +# Fixed Wing Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/fixedwing_common.makefile +include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile + +# IO Options +include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4017.makefile + +# Sensors +include $(CFG_FIXEDWING)/subsystems/fixedwing_attitude_infrared.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_gyro.makefile + +### (UART 0, 38400baud) are the default GPS parameters, change and uncomment if needed +#GPS_UART_NR = 0 +#GPS_BAUD = 38400 +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea5h.makefile + +### (UART 1, 57600baud) are default modem parameters, change and uncomment if needed +#MODEM_UART_NR = 1 +#MODEM_BAUD = 57600 +include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_transparent.makefile + + +# Special options +ap.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO + + +###################################### +# Config for SITL simulation +include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" + +sim.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN + + + +
diff --git a/conf/airframes/twinstar_example.xml b/conf/airframes/twinstar_example.xml new file mode 100644 index 0000000000..06119107a5 --- /dev/null +++ b/conf/airframes/twinstar_example.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ + +BOARD_CFG = \"twog_v1.h\" +FLASH_MODE=IAP + +# Board Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile + +# Fixed Wing Specifics +include $(PAPARAZZI_SRC)/conf/autopilot/fixedwing_common.makefile +include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile + +# IO Options +include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4017.makefile + +# Sensors +include $(CFG_FIXEDWING)/subsystems/fixedwing_attitude_infrared.makefile + +### (UART 0, 38400baud) are the default GPS parameters, change and uncomment if needed +#GPS_UART_NR = 0 +#GPS_BAUD = 38400 +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea4p.makefile + +### (UART 1, 57600baud) are default modem parameters, change and uncomment if needed +#MODEM_UART_NR = 1 +#MODEM_BAUD = 57600 +include $(CFG_FIXEDWING)/subsystems/fixedwing_telemetry_transparent.makefile + + +# Special options +ap.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO + + +###################################### +# Config for SITL simulation +include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile +sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" + +sim.CFLAGS += -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN + + +
diff --git a/conf/autopilot/sitl.makefile b/conf/autopilot/sitl.makefile index 8b85968251..4f1d05dca6 100644 --- a/conf/autopilot/sitl.makefile +++ b/conf/autopilot/sitl.makefile @@ -3,4 +3,4 @@ sim.ARCH = sitl sim.TARGET = autopilot sim.TARGETDIR = autopilot sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DINFRARED -DNAV -DLED -DWIND_INFO -sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c +sim.srcs += latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c diff --git a/conf/autopilot/subsystems/fixedwing_ets_airspeed.makefile b/conf/autopilot/subsystems/fixedwing_ets_airspeed.makefile new file mode 100644 index 0000000000..f1f46a867e --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_ets_airspeed.makefile @@ -0,0 +1,6 @@ +# EagleTree sensors (altimeter and airspeed) +ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_BARO_ETS -DUSE_I2C0 +ap.srcs += airspeed.c airspeed_ets.c baro_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c + +sim.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_BARO_ETS -DUSE_I2C0 +sim.srcs += airspeed.c airspeed_ets.c baro_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c diff --git a/conf/autopilot/subsystems/fixedwing_hum_baro_payload.makefile b/conf/autopilot/subsystems/fixedwing_hum_baro_payload.makefile new file mode 100644 index 0000000000..0513988cbb --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_hum_baro_payload.makefile @@ -0,0 +1,7 @@ +# Payload: Sensirion humidity/temp, VTI pressure/temp + +ap.srcs += humid_sht.c +ap.CFLAGS += -DUSE_HUMID_SHT -DDAT_PIN=3 -DSCK_PIN=2 + +ap.srcs += baro_scp.c +ap.CFLAGS += -DUSE_BARO_SCP diff --git a/conf/autopilot/subsystems/fixedwing_joystick.makefile b/conf/autopilot/subsystems/fixedwing_joystick.makefile new file mode 100644 index 0000000000..9061b64223 --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_joystick.makefile @@ -0,0 +1,7 @@ +# joystick for fixedwings + +ap.srcs += joystick.c +ap.CFLAGS += -DUSE_JOYSTICK + +sim.srcs += joystick.c +sim.CFLAGS += -DUSE_JOYSTICK diff --git a/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile b/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile index 1db2b728ed..6efdc34733 100644 --- a/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile +++ b/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile @@ -5,6 +5,6 @@ ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=B$(MODEM_BAUD) MODEM_UART = Uart$(MODEM_UART_NR) -ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DPPRZ_UART=$(MODEM_UART) +ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DXBEE_UART=$(MODEM_UART) ap.CFLAGS += -DDOWNLINK_TRANSPORT=XBeeTransport -DDATALINK=XBEE ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/xbee.c diff --git a/conf/autopilot/twog_v1.h b/conf/autopilot/twog_v1.h new file mode 100644 index 0000000000..d684edc97f --- /dev/null +++ b/conf/autopilot/twog_v1.h @@ -0,0 +1,4 @@ +#include "tiny_2_1.h" + +#undef DefaultVoltageOfAdc +#define DefaultVoltageOfAdc(adc) (0.0247311828*adc)