moving files around once again

This commit is contained in:
Antoine Drouin
2009-07-20 17:46:54 +00:00
parent dcbb4ac516
commit 8a31d8e1ee
44 changed files with 174 additions and 95 deletions
@@ -8,5 +8,5 @@ ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
# asctec controllers
sim.CFLAGS += -DACTUATORS=\"actuators_asctec_twi_blmc_hw.h\"
sim.srcs += $(SRC_BOOZ_ARCH)/actuators_asctec_twi_blmc_hw.c actuators.c
sim.srcs += $(SRC_BOOZ_SIM)/actuators_asctec_twi_blmc_hw.c actuators.c
+17 -4
View File
@@ -47,11 +47,11 @@
#
# imu Booz2 v1
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"impl/booz_imu_b2.h\"
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
ap.CFLAGS += -DSSP_VIC_SLOT=9
ap.srcs += $(SRC_BOOZ)/booz_imu.c \
$(SRC_BOOZ)/impl/booz_imu_b2.c \
$(SRC_BOOZ_ARCH)/impl/booz_imu_b2_arch.c
ap.srcs += $(SRC_BOOZ)/booz_imu.c \
$(SRC_BOOZ)/imu/booz_imu_b2.c \
$(SRC_BOOZ_ARCH)/imu/booz_imu_b2_arch.c
ap.CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
ap.srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
@@ -62,3 +62,16 @@ ap.srcs += $(SRC_BOOZ)/peripherals/booz_ami601.c
ap.CFLAGS += -DUSE_I2C1 -DI2C1_SCLL=150 -DI2C1_SCLH=150 -DI2C1_VIC_SLOT=11 -DI2C1_BUF_LEN=16
#
# Simulator
#
sim.CFLAGS += -DBOOZ_IMU_TYPE_H=\"impl/booz_imu_b2.h\"
sim.srcs += $(SRC_BOOZ)/booz_imu.c \
$(SRC_BOOZ)/imu/booz_imu_b2.c \
$(SRC_BOOZ_SIM)/imu/booz_imu_b2_arch.c
sim.srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
$(SRC_BOOZ_SIM)/peripherals/booz_max1168_arch.c
+4 -4
View File
@@ -47,17 +47,17 @@
#
# imu Booz2 v1.1
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"impl/booz_imu_b2.h\"
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
ap.srcs += $(SRC_BOOZ)/booz_imu.c
ap.CFLAGS += -DSSP_VIC_SLOT=9 -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
ap.srcs += $(SRC_BOOZ)/impl/booz_imu_b2.c \
$(SRC_BOOZ_ARCH)/impl/booz_imu_b2_arch.c
ap.srcs += $(SRC_BOOZ)/imu/booz_imu_b2.c \
$(SRC_BOOZ_ARCH)/imu/booz_imu_b2_arch.c
ap.CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
ap.srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
$(SRC_BOOZ_ARCH)/peripherals/booz_max1168_arch.c
ap.CFLAGS += -DUSE_MICROMAG -DMICROMAG_DRDY_VIC_SLOT=11
ap.CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
ap.srcs += $(SRC_BOOZ)/peripherals/booz_ms2001.c \
$(SRC_BOOZ_ARCH)/peripherals/booz_ms2001_arch.c
+5 -4
View File
@@ -48,13 +48,14 @@
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"impl/booz_imu_crista.h\"
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_crista.h\"
ap.srcs += $(SRC_BOOZ)/booz_imu.c \
$(SRC_BOOZ_IMPL)/booz_imu_crista.c \
$(SRC_BOOZ_ARCH_IMPL)/booz_imu_crista_arch.c
$(SRC_BOOZ)/imu/booz_imu_crista.c \
$(SRC_BOOZ_ARCH)/imu/booz_imu_crista_arch.c
ap.CFLAGS += -DUSE_I2C1 -DI2C1_SCLL=150 -DI2C1_SCLH=150 -DI2C1_VIC_SLOT=11 -DI2C1_BUF_LEN=16
ap.CFLAGS += -DUSE_AMI601
ap.srcs += $(SRC_BOOZ_PERIPH)/booz_ami601.c
ap.srcs += $(SRC_BOOZ)/peripherals/booz_ami601.c
@@ -1,7 +1,19 @@
#
# Autopilot
#
ap.CFLAGS += -DUSE_RADIO_CONTROL -DRADIO_CONTROL_LED=1
ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"impl/booz_radio_control_ppm.h\"
ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"radio_control/booz_radio_control_ppm.h\"
ap.CFLAGS += -DRADIO_CONTROL_TYPE_PPM
ap.srcs += $(SRC_BOOZ)/booz_radio_control.c \
$(SRC_BOOZ_IMPL)/booz_radio_control_ppm.c \
$(SRC_BOOZ_ARCH_IMPL)/booz_radio_control_ppm_arch.c
$(SRC_BOOZ)/radio_control/booz_radio_control_ppm.c \
$(SRC_BOOZ_ARCH)/radio_control/booz_radio_control_ppm_arch.c
#
# Simulator
#
sim.CFLAGS += -DUSE_RADIO_CONTROL -DRADIO_CONTROL_LED=1
sim.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"radio_control/booz_radio_control_ppm.h\"
sim.CFLAGS += -DRADIO_CONTROL_TYPE_PPM
sim.srcs += $(SRC_BOOZ)/booz_radio_control.c \
$(SRC_BOOZ)/radio_control/booz_radio_control_ppm.c \
$(SRC_BOOZ_SIM)/radio_contrl/booz_radio_control_ppm_arch.c
@@ -1,6 +1,6 @@
ap.CFLAGS += -DUSE_RADIO_CONTROL -DRADIO_CONTROL_LED=1
ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"impl/booz_radio_control_spektrum.h\"
ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"radio_control/booz_radio_control_spektrum.h\"
ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=\"impl/booz_radio_control_spektrum_dx7se.h\"
ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200
ap.CFLAGS += -DRADIO_CONTROL_LINK=Uart0
+8 -17
View File
@@ -9,7 +9,7 @@ JSBSIM_INC = $(JSBSIM_ROOT)/include/JSBSim
JSBSIM_LIB = $(JSBSIM_ROOT)/lib
SRC_BOOZ=booz
SRC_BOOZ_SIM = $(SRC_BOOZ)/sim
SRC_BOOZ_SIM = $(SRC_BOOZ)/arch/sim
sim.ARCHDIR = $(ARCHI)
@@ -42,9 +42,9 @@ sim.srcs = $(SIMDIR)/nps_main.c \
$(SIMDIR)/nps_flightgear.c \
sim.srcs += $(SRC_BOOZ)/booz_trig_int.c \
pprz_geodetic_float.c \
pprz_geodetic_double.c \
sim.srcs += math/pprz_trig_int.c \
math/pprz_geodetic_float.c \
math/pprz_geodetic_double.c \
@@ -66,15 +66,10 @@ sim.srcs += $(SRC_BOOZ)/booz2_telemetry.c \
sim.srcs += $(SRC_BOOZ)/booz2_commands.c
#sim.CFLAGS += -DRADIO_CONTROL -DRC_LED=1
#sim.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
sim.CFLAGS += -DUSE_RADIO_CONTROL -DRADIO_CONTROL_LED=1
sim.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"booz_radio_control_ppm.h\"
sim.CFLAGS += -DRADIO_CONTROL_TYPE_PPM
sim.srcs += $(SRC_BOOZ)/booz_radio_control.c \
$(SRC_BOOZ)/booz_radio_control_ppm.c \
$(SRC_BOOZ_SIM)/booz_radio_control_ppm_hw.c
#
#
#
sim.CFLAGS += -DBOOZ2_ANALOG_BARO_LED=2 -DBOOZ2_ANALOG_BARO_PERIOD='SYS_TICS_OF_SEC((1./100.))'
@@ -101,7 +96,7 @@ sim.srcs += $(SRC_BOOZ)/booz2_stabilization_attitude.c
sim.srcs += $(SRC_BOOZ)/booz2_guidance_h.c
sim.srcs += $(SRC_BOOZ)/booz2_guidance_v.c
sim.srcs += pprz_geodetic_int.c
sim.srcs += math/pprz_geodetic_int.c
sim.srcs += $(SRC_BOOZ)/booz2_ins.c
# vertical filter float version
sim.srcs += $(SRC_BOOZ)/booz2_vf_float.c
@@ -112,8 +107,4 @@ sim.srcs += $(SRC_BOOZ)/booz2_hf_float.c
sim.srcs += $(SRC_BOOZ)/booz2_navigation.c
sim.srcs += $(SRC_BOOZ)/booz2_fms.c
sim.CFLAGS += -DBOOZ2_FMS_TYPE=BOOZ2_FMS_TYPE_TEST_SIGNAL
sim.srcs += $(SRC_BOOZ)/booz2_fms_test_signal.c
+1 -1
View File
@@ -20,7 +20,7 @@ uint32_t sys_time_chrono; /* T0TC ticks */
#endif
#if defined USE_RADIO_CONTROL && defined RADIO_CONTROL_TYPE_PPM
#include RADIO_CONTROL_TYPE_H
#include "radio_control/booz_radio_control_ppm.h"
#else
#define RADIO_CONTROL_PPM_IT 0x00
#endif
@@ -14,13 +14,13 @@ static void EXTINT_ISR(void) __attribute__((naked));
void ms2001_arch_init( void ) {
Ms2001Unselect(); /* pin idles high */
/* configure SS pin */
Ms2001Unselect(); /* pin idles high */
SetBit(MS2001_SS_IODIR, MS2001_SS_PIN); /* pin is output */
/* configure RESET pin */
SetBit(MS2001_RESET_IODIR, MS2001_RESET_PIN); /* pin is output */
Ms2001Reset(); /* pin idles low */
SetBit(MS2001_RESET_IODIR, MS2001_RESET_PIN); /* pin is output */
/* configure DRDY pin */
/* connected pin to EXINT */
@@ -32,8 +32,8 @@ void ms2001_arch_init( void ) {
/* initialize interrupt vector */
VICIntSelect &= ~VIC_BIT( MS2001_DRDY_VIC_IT ); /* select EINT as IRQ source */
VICIntEnable = VIC_BIT( MS2001_DRDY_VIC_IT ); /* enable it */
_VIC_CNTL(MICROMAG_DRDY_VIC_SLOT) = VIC_ENABLE | MS2001_DRDY_VIC_IT;
_VIC_ADDR(MICROMAG_DRDY_VIC_SLOT) = (uint32_t)EXTINT_ISR; // address of the ISR
_VIC_CNTL(MS2001_DRDY_VIC_SLOT) = VIC_ENABLE | MS2001_DRDY_VIC_IT;
_VIC_ADDR(MS2001_DRDY_VIC_SLOT) = (uint32_t)EXTINT_ISR; // address of the ISR
}
@@ -21,9 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef BOOZ_RADIO_CONTROL_PPM_HW_H
#define BOOZ_RADIO_CONTROL_PPM_HW_H
#ifndef BOOZ_RADIO_CONTROL_PPM_ARCH_H
#define BOOZ_RADIO_CONTROL_PPM_ARCH_H
#include "LPC21xx.h"
@@ -32,7 +31,6 @@
extern uint8_t booz_radio_control_ppm_cur_pulse;
extern uint32_t booz_radio_control_ppm_last_pulse_time;
extern void booz_radio_control_ppm_arch_init ( void );
#define RADIO_CONTROL_PPM_IT PPM_CRI
#define RADIO_CONTROL_PPM_ISR() { \
@@ -62,4 +60,4 @@ extern void booz_radio_control_ppm_arch_init ( void );
}
#endif /* BOOZ_RADIO_CONTROL_PPM_HW_H */
#endif /* BOOZ_RADIO_CONTROL_PPM_ARCH_H */
@@ -21,8 +21,13 @@
* Boston, MA 02111-1307, USA.
*/
#include "booz2_max1168.h"
#include "booz_imu.h"
void booz2_max1168_hw_init( void ) {}
void booz_imu_b2_arch_init(void) {
}
void booz_imu_periodic(void) {
}
void booz2_max1168_read( void ) {}
@@ -23,15 +23,14 @@
/*
*
* simulator plug for the booz2 v1 imu hw funtions
* simulator plug for the booz2 v1 imu arch dependant functions
*
*/
#ifndef BOOZ2_IMU_B2_HW_H
#define BOOZ2_IMU_B2_HW_H
#ifndef BOOZ2_IMU_B2_ARCH_H
#define BOOZ2_IMU_B2_ARCH_H
extern void booz2_imu_b2_hw_init(void);
#define booz2_imu_feed_data() { \
#define booz_imu_feed_gyro_accel() { \
booz2_max1168_values[IMU_GYRO_P_CHAN] = bsm.gyro->ve[AXIS_P]; \
booz2_max1168_values[IMU_GYRO_Q_CHAN] = bsm.gyro->ve[AXIS_Q]; \
booz2_max1168_values[IMU_GYRO_R_CHAN] = bsm.gyro->ve[AXIS_R]; \
@@ -41,11 +40,5 @@ extern void booz2_imu_b2_hw_init(void);
booz2_max1168_status = STA_MAX1168_DATA_AVAILABLE; \
}
#ifdef USE_MICROMAG
#define Booz2ImuSpiEvent(_handler1,_handler2) {}
#else // NO MICROMAG
#define Booz2ImuSpiEvent(_handler) {}
#endif
#endif /* BOOZ2_IMU_B2_HW_H */
@@ -0,0 +1,28 @@
/*
* $Id$
*
* Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "peripherals/booz_max1168.h"
void booz_max1168_arch_init( void ) {}
void booz_max1168_read( void ) {}
@@ -30,6 +30,5 @@
#ifndef BOOZ2_MAX1168_HW_H
#define BOOZ2_MAX1168_HW_H
extern void booz2_max1168_hw_init( void );
#endif /* BOOZ2_MAX1168_HW_H */
@@ -21,8 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
#include "booz2_imu_b2.h"
#include "booz_radio_control.h"
void booz2_imu_b2_hw_init(void) {
void booz_radio_control_ppm_arch_init ( void ) {
}
@@ -0,0 +1,29 @@
/*
* $Id$
*
* Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef BOOZ_RADIO_CONTROL_PPM_ARCH_H
#define BOOZ_RADIO_CONTROL_PPM_ARCH_H
#endif /* BOOZ_RADIO_CONTROL_PPM_ARCH_H */
@@ -75,7 +75,7 @@
/* underlying architecture */
#include "impl/booz_imu_b2_arch.h"
#include "imu/booz_imu_b2_arch.h"
/* must be implemented by underlying architecture */
extern void booz_imu_b2_arch_init(void);
@@ -64,7 +64,7 @@ extern bool_t ADS8344_available;
#endif
/* underlying architecture */
#include "impl/booz_imu_crista_arch.h"
#include "imu/booz_imu_crista_arch.h"
/* must be defined by underlying architecture */
extern void booz_imu_crista_arch_init(void);
@@ -24,12 +24,21 @@
#ifndef BOOZ_RADIO_CONTROL_PPM_H
#define BOOZ_RADIO_CONTROL_PPM_H
#include "impl/booz_radio_control_ppm_arch.h"
#include "conf_radio_control_ppm.h" /* generated code */
/**
* Architecture dependant code
*/
#include "radio_control/booz_radio_control_ppm_arch.h"
/* must be implemented by arch dependant code */
extern void booz_radio_control_ppm_arch_init ( void );
/**
* Radio control type : futaba is falling edge clocked whereas JR is rising edge
* Generated code holding the description of a given
* transmitter
*/
#include "conf_radio_control_ppm.h"
/**
* ppm pulse type : futaba is falling edge clocked whereas JR is rising edge
*/
#define PPM_PULSE_TYPE_POSITIVE 0
#define PPM_PULSE_TYPE_NEGATIVE 1
+2 -2
View File
@@ -3,8 +3,8 @@
#include "std.h"
#include "pprz_geodetic_double.h"
#include "pprz_algebra_double.h"
#include "math/pprz_geodetic_double.h"
#include "math/pprz_algebra_double.h"
/*
Notations for fdm variables
+7 -6
View File
@@ -5,11 +5,11 @@
#include "nps_fdm.h"
#include "6dof.h"
#include "airframe.h"
#include "pprz_geodetic.h"
#include "pprz_geodetic_double.h"
#include "pprz_geodetic_float.h"
#include "pprz_algebra.h"
#include "pprz_algebra_float.h"
#include "math/pprz_geodetic.h"
#include "math/pprz_geodetic_double.h"
#include "math/pprz_geodetic_float.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_float.h"
#define MetersOfFeet(_f) ((_f)/3.2808399)
@@ -118,7 +118,8 @@ static void test123(LlaCoor_d* fdm_lla, FGPropagate* propagate) {
fdm_lla->lat = propagate->GetLatitude();
fdm_lla->lon = propagate->GetLongitude();
fdm_lla->alt = MetersOfFeet(propagate->Geth());
// FIXME
// fdm_lla->alt = MetersOfFeet(propagate->Geth());
}
+1 -1
View File
@@ -5,7 +5,7 @@
#include <Ivy/ivyglibloop.h>
#include "airframe.h"
#include "pprz_algebra_double.h"
#include "math/pprz_algebra_double.h"
#include "nps_autopilot.h"
#include "nps_fdm.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef NPS_RANDOM_H
#define NPS_RANDOM_H
#include "pprz_algebra_double.h"
#include "math/pprz_algebra_double.h"
extern double get_gaussian_noise(void);
extern void double_vect3_add_gaussian_noise(struct DoubleVect3* vect, struct DoubleVect3* std_dev);
+3 -3
View File
@@ -1,9 +1,9 @@
#ifndef NPS_SENSOR_ACCEL_H
#define NPS_SENSOR_ACCEL_H
#include "pprz_algebra.h"
#include "pprz_algebra_double.h"
#include "pprz_algebra_float.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_double.h"
#include "math/pprz_algebra_float.h"
#include "std.h"
struct NpsSensorAccel {
+3 -3
View File
@@ -1,9 +1,9 @@
#ifndef NPS_SENSOR_BARO_H
#define NPS_SENSOR_BARO_H
#include "pprz_algebra.h"
#include "pprz_algebra_double.h"
#include "pprz_algebra_float.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_double.h"
#include "math/pprz_algebra_float.h"
#include "std.h"
struct NpsSensorBaro {
+4 -4
View File
@@ -1,10 +1,10 @@
#ifndef NPS_SENSOR_GPS_H
#define NPS_SENSOR_GPS_H
#include "pprz_algebra.h"
#include "pprz_algebra_double.h"
#include "pprz_algebra_float.h"
#include "pprz_geodetic_double.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_double.h"
#include "math/pprz_algebra_float.h"
#include "math/pprz_geodetic_double.h"
#include "std.h"
+3 -3
View File
@@ -1,9 +1,9 @@
#ifndef NPS_SENSOR_GYRO_H
#define NPS_SENSOR_GYRO_H
#include "pprz_algebra.h"
#include "pprz_algebra_double.h"
#include "pprz_algebra_float.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_double.h"
#include "math/pprz_algebra_float.h"
#include "std.h"
struct NpsSensorGyro {
+3 -3
View File
@@ -1,9 +1,9 @@
#ifndef NPS_SENSOR_MAG_H
#define NPS_SENSOR_MAG_H
#include "pprz_algebra.h"
#include "pprz_algebra_double.h"
#include "pprz_algebra_float.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_double.h"
#include "math/pprz_algebra_float.h"
#include "std.h"
struct NpsSensorMag {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef NPS_SENSORS_H
#define NPS_SENSORS_H
#include "pprz_algebra.h"
#include "math/pprz_algebra.h"
#include "nps_sensor_gyro.h"
#include "nps_sensor_accel.h"
#include "nps_sensor_mag.h"