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;
123 #if APOGEE_BARO_SDLOG
125 if (!log_apogee_baro_started) {
126 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");
127 log_apogee_baro_started =
true;
129 sdLogWriteLog(
pprzLogFile,
"apogee_baro: %9.4f %9.4f %d %d %d %d %d %d %d %d %d\n",
Main include for ABI (AirBorneInterface).
#define BARO_BOARD_SENDER_ID
default onboard baro
#define MPL_PRESCALER
Baro periodic prescaler.
struct Mpl3115 apogee_baro
#define BARO_STARTUP_COUNTER
Counter to init ads1114 at startup.
void apogee_baro_event(void)
Common barometric sensor implementation.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
struct GpsState gps
global GPS state
Device independent GPS code (interface)
uint32_t tow
GPS time of week in ms.
int32_t hmsl
height above mean sea level (MSL) in mm
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
struct NedCoor_i ned_vel
speed NED in cm/s
uint16_t gspeed
norm of 2d ground speed in cm/s
int32_t lat
in degrees*1e7
int32_t lon
in degrees*1e7
struct ImuApogee imu_apogee
Driver for the IMU on the Apogee board.
arch independent LED (Light Emitting Diodes) API
void mpl3115_periodic(struct Mpl3115 *mpl)
void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr)
void mpl3115_event(struct Mpl3115 *mpl)
Driver for the baro MPL3115A2 from Freescale (i2c)
uint32_t pressure
pressure in 1/4 Pascal
int16_t temperature
temperature in 1/16 degrees Celcius
volatile bool data_available
data ready flag
bool initialized
config done flag
struct Mpu60x0Config config
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.