43 bool log_apogee_baro_started;
51 #ifndef BARO_BOARD_APOGEE_FREQ
52 #define BARO_BOARD_APOGEE_FREQ 5
59 #ifdef BARO_PERIODIC_FREQUENCY
60 #define MPL_PRESCALER ((BARO_PERIODIC_FREQUENCY)/BARO_BOARD_APOGEE_FREQ)
62 #ifdef PERIODIC_FREQUENCY
63 #define MPL_PRESCALER ((PERIODIC_FREQUENCY)/BARO_BOARD_APOGEE_FREQ)
66 #define MPL_PRESCALER 12
71 #define BARO_STARTUP_COUNTER (200/(MPL_PRESCALER))
85 log_apogee_baro_started =
false;
122 #if APOGEE_BARO_SDLOG
124 if (!log_apogee_baro_started) {
125 sdLogWriteLog(
pprzLogFile,
"APOGEE_BARO: Pres(Pa) Temp(degC) GPS_fix TOW(ms) Week Lat(1e7deg) Lon(1e7deg) HMSL(mm) gpseed(cm/s) course(1e7deg) climb(cm/s)\n");
126 log_apogee_baro_started =
true;
128 sdLogWriteLog(
pprzLogFile,
"apogee_baro: %9.4f %9.4f %d %d %d %d %d %d %d %d %d\n",
volatile bool data_available
data ready flag
Driver for the IMU on the Apogee board.
Common barometric sensor implementation.
struct Mpl3115 apogee_baro
bool initialized
config done flag
struct Mpu60x0Config config
void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr)
#define MPL_PRESCALER
Baro periodic prescaler.
Main include for ABI (AirBorneInterface).
void mpl3115_event(struct Mpl3115 *mpl)
#define BARO_STARTUP_COUNTER
Counter to init ads1114 at startup.
void mpl3115_periodic(struct Mpl3115 *mpl)
int32_t hmsl
height above mean sea level (MSL) in mm
uint32_t pressure
pressure in 1/4 Pascal
uint32_t tow
GPS time of week in ms.
Device independent GPS code (interface)
int32_t lon
in degrees*1e7
#define BARO_BOARD_SENDER_ID
default onboard baro
Driver for the baro MPL3115A2 from Freescale (i2c)
void apogee_baro_event(void)
int16_t temperature
temperature in 1/16 degrees Celcius
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
arch independent LED (Light Emitting Diodes) API
uint16_t gspeed
norm of 2d ground speed in cm/s
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
int32_t lat
in degrees*1e7
struct NedCoor_i ned_vel
speed NED in cm/s
struct GpsState gps
global GPS state
struct ImuApogee imu_apogee