26#include "generated/airframe.h"
29#include "nps_sensors_params_common.h"
30#if USE_BATTERY_MONITOR
90#if USE_BATTERY_MONITOR
Main include for ABI (AirBorneInterface).
#define BARO_SIM_SENDER_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Handling of messages coming from ground and other A/Cs.
static void DlCheckAndParse(struct link_device *dev, struct transport_tx *trans, uint8_t *buf, bool *msg_available, bool update_dl)
Check for new message and parse.
struct Electrical electrical
Interface for electrical status: supply voltage, current, battery status, etc.
float vsupply
supply voltage in V
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)
uint32_t sacc
speed accuracy in cm/s
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
#define GPS_VALID_VEL_ECEF_BIT
#define GPS_VALID_VEL_NED_BIT
uint32_t hacc
horizontal accuracy in cm
#define GPS_VALID_POS_LLA_BIT
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
struct EcefCoor_i ecef_vel
speed ECEF in cm/s
uint16_t pdop
position dilution of precision scaled by 100
#define GPS_FIX_NONE
No GPS fix.
#define GPS_VALID_HMSL_BIT
struct NedCoor_i ned_vel
speed NED in cm/s
uint32_t last_msg_time
cpu time in sec at last received GPS message
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
uint32_t pacc
position accuracy in cm
uint16_t gspeed
norm of 2d ground speed in cm/s
uint8_t valid_fields
bitfield indicating valid fields (GPS_VALID_x_BIT)
uint32_t vacc
vertical accuracy in cm
#define GPS_FIX_3D
3D GPS fix
uint16_t speed_3d
norm of 3d speed in cm/s
#define GPS_VALID_COURSE_BIT
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
uint8_t num_sv
number of sat in fix
data structure for GPS information
#define RATES_ASSIGN(_ra, _p, _q, _r)
#define VECT3_ASSIGN(_a, _x, _y, _z)
int32_t lat
in degrees*1e7
int32_t alt
in millimeters above WGS84 reference ellipsoid
int32_t lon
in degrees*1e7
void ned_of_ecef_vect_i(struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
Rotate a vector from ECEF to NED.
#define VECT3_FLOAT_OF_CM(_o, _i)
void ltp_def_from_lla_i(struct LtpDef_i *def, struct LlaCoor_i *lla)
definition of the local (flat earth) coordinate system
vector in North East Down coordinates
void imu_set_defaults_mag(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct Int32Vect3 *scale)
Set the defaults for a mag sensor WARNING: Should be called before sensor is publishing messages to e...
void imu_set_defaults_accel(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct Int32Vect3 *scale)
Set the defaults for a accel sensor WARNING: Should be called before sensor is publishing messages to...
void imu_set_defaults_gyro(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Rates *neutral, const struct Int32Rates *scale)
Set the defaults for a gyro sensor WARNING: Should be called before sensor is publishing messages to ...
Inertial Measurement Unit interface.
static const struct Int32Vect3 accel_neutral
static const struct Int32Vect3 mag_scale[2]
Default mag scale.
static const struct Int32Rates gyro_scale[2]
Default gyro scale.
static const struct Int32Vect3 accel_scale[2]
Default accel scale/neutral.
vector in North East Down coordinates Units: meters
static bool sensors_hitl_msg_available
void sensors_hitl_event(void)
void sensors_hitl_periodic(void)
void imu_feed_gyro_accel(void)
void gps_feed_value(void)
static uint8_t sensors_hitl_dl_buffer[MSG_SIZE]
void sensors_hitl_parse_HITL_AIR_DATA(uint8_t *buf)
void sensors_hitl_parse_HITL_GPS(uint8_t *buf)
void sensors_hitl_parse_HITL_IMU(uint8_t *buf)
void sensors_hitl_init(void)
static struct pprz_transport sensors_hitl_tp
volatile uint32_t nb_sec
full seconds since startup
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
Periodic telemetry system header (includes downlink utility and generated code).
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.