32 #include "stabilization/stabilization_attitude.h"
33 #include "generated/airframe.h"
34 #include "generated/flight_plan.h"
42 #if defined SITL && USE_NPS
48 #ifndef USE_INS_NAV_INIT
49 #define USE_INS_NAV_INIT TRUE
53 #ifndef INS_EKF2_MAX_REL_LENGTH_ERROR
54 #define INS_EKF2_MAX_REL_LENGTH_ERROR 0.2
58 #if INS_EKF2_OPTITRACK
59 #ifndef INS_EKF2_FUSION_MODE
60 #define INS_EKF2_FUSION_MODE (MASK_USE_EVPOS | MASK_USE_EVVEL | MASK_USE_EVYAW)
62 #ifndef INS_EKF2_VDIST_SENSOR_TYPE
63 #define INS_EKF2_VDIST_SENSOR_TYPE VDIST_SENSOR_EV
68 #ifndef INS_EKF2_FUSION_MODE
69 #define INS_EKF2_FUSION_MODE (MASK_USE_GPS)
74 #ifndef INS_EKF2_VDIST_SENSOR_TYPE
75 #define INS_EKF2_VDIST_SENSOR_TYPE VDIST_SENSOR_BARO
80 #ifndef INS_EKF2_GPS_CHECK_MASK
81 #define INS_EKF2_GPS_CHECK_MASK 21
86 #ifndef INS_EKF2_SONAR_MIN_RANGE
87 #define INS_EKF2_SONAR_MIN_RANGE 0.001
92 #ifndef INS_EKF2_SONAR_MAX_RANGE
93 #define INS_EKF2_SONAR_MAX_RANGE 4
98 #ifndef INS_EKF2_RANGE_MAIN_AGL
99 #define INS_EKF2_RANGE_MAIN_AGL 1
104 #ifndef INS_EKF2_BARO_ID
106 #define INS_EKF2_BARO_ID BARO_BOARD_SENDER_ID
108 #define INS_EKF2_BARO_ID ABI_BROADCAST
114 #ifndef INS_EKF2_TEMPERATURE_ID
115 #define INS_EKF2_TEMPERATURE_ID ABI_BROADCAST
120 #ifndef INS_EKF2_AGL_ID
121 #define INS_EKF2_AGL_ID ABI_BROADCAST
126 #ifndef INS_EKF2_GYRO_ID
127 #define INS_EKF2_GYRO_ID ABI_BROADCAST
132 #ifndef INS_EKF2_ACCEL_ID
133 #define INS_EKF2_ACCEL_ID ABI_BROADCAST
138 #ifndef INS_EKF2_MAG_ID
139 #define INS_EKF2_MAG_ID ABI_BROADCAST
144 #ifndef INS_EKF2_GPS_ID
145 #define INS_EKF2_GPS_ID GPS_MULTI_ID
150 #ifndef INS_EKF2_OF_ID
151 #define INS_EKF2_OF_ID ABI_BROADCAST
156 #ifndef INS_EKF2_IMU_POS_X
157 #define INS_EKF2_IMU_POS_X 0
162 #ifndef INS_EKF2_IMU_POS_Y
163 #define INS_EKF2_IMU_POS_Y 0
168 #ifndef INS_EKF2_IMU_POS_Z
169 #define INS_EKF2_IMU_POS_Z 0
174 #ifndef INS_EKF2_GPS_POS_X
175 #define INS_EKF2_GPS_POS_X 0
180 #ifndef INS_EKF2_GPS_POS_Y
181 #define INS_EKF2_GPS_POS_Y 0
186 #ifndef INS_EKF2_GPS_POS_Z
187 #define INS_EKF2_GPS_POS_Z 0
192 #ifndef INS_EKF2_FLOW_SENSOR_DELAY
193 #define INS_EKF2_FLOW_SENSOR_DELAY 15
195 PRINT_CONFIG_VAR(INS_FLOW_SENSOR_DELAY)
198 #ifndef INS_EKF2_MIN_FLOW_QUALITY
199 #define INS_EKF2_MIN_FLOW_QUALITY 100
204 #ifndef INS_EKF2_MAX_FLOW_RATE
205 #define INS_EKF2_MAX_FLOW_RATE 200
210 #ifndef INS_EKF2_FLOW_POS_X
211 #define INS_EKF2_FLOW_POS_X 0
216 #ifndef INS_EKF2_FLOW_POS_Y
217 #define INS_EKF2_FLOW_POS_Y 0
222 #ifndef INS_EKF2_FLOW_POS_Z
223 #define INS_EKF2_FLOW_POS_Z 0
228 #ifndef INS_EKF2_FLOW_NOISE
229 #define INS_EKF2_FLOW_NOISE 0.03
234 #ifndef INS_EKF2_FLOW_NOISE_QMIN
235 #define INS_EKF2_FLOW_NOISE_QMIN 0.05
240 #ifndef INS_EKF2_FLOW_INNOV_GATE
241 #define INS_EKF2_FLOW_INNOV_GATE 4
246 #ifndef INS_EKF2_EVP_NOISE
247 #define INS_EKF2_EVP_NOISE 0.02f
252 #ifndef INS_EKF2_EVV_NOISE
253 #define INS_EKF2_EVV_NOISE 0.1f
258 #ifndef INS_EKF2_EVA_NOISE
259 #define INS_EKF2_EVA_NOISE 0.05f
264 #ifndef INS_EKF2_GPS_V_NOISE
265 #define INS_EKF2_GPS_V_NOISE 0.3f
270 #ifndef INS_EKF2_GPS_P_NOISE
271 #define INS_EKF2_GPS_P_NOISE 0.5f
276 #ifndef INS_EKF2_BARO_NOISE
277 #define INS_EKF2_BARO_NOISE 3.5f
281 #ifdef INS_EXT_VISION_ROTATION
313 #if PERIODIC_TELEMETRY
316 static void send_ins(
struct transport_tx *trans,
struct link_device *
dev)
321 const Vector3f pos_f{
ekf.getPosition()};
322 const Vector3f speed_f{
ekf.getVelocity()};
323 const Vector3f accel_f{
ekf.getVelocityDerivative()};
337 pprz_msg_send_INS(trans,
dev, AC_ID,
338 &pos.
x, &pos.
y, &pos.
z,
339 &speed.
x, &speed.
y, &speed.
z,
340 &accel.
x, &accel.
y, &accel.
z);
349 const Vector3f pos_f{
ekf.getPosition()};
350 const Vector3f speed_f{
ekf.getVelocity()};
351 const Vector3f accel_f{
ekf.getVelocityDerivative()};
359 pprz_msg_send_INS_Z(trans,
dev, AC_ID,
360 &baro_z, &
pos_z, &speed_z, &accel_z);
365 float qfe = 101325.0;
367 pprz_msg_send_INS_REF(trans,
dev, AC_ID,
375 uint16_t gps_check_status, soln_status;
376 uint16_t filter_fault_status =
ekf.fault_status().value;
377 uint32_t control_mode =
ekf.control_status().value;
378 ekf.get_gps_check_status(&gps_check_status);
379 ekf.get_ekf_soln_status(&soln_status);
382 float mag, vel, pos, hgt, tas, hagl, flow, beta, mag_decl;
383 uint8_t terrain_valid, dead_reckoning;
384 ekf.get_innovation_test_status(innov_test_status, mag, vel, pos, hgt, tas, hagl, beta);
386 ekf.get_mag_decl_deg(&mag_decl);
388 if (
ekf.isTerrainEstimateValid()) {
394 if (
ekf.inertial_dead_reckoning()) {
400 pprz_msg_send_INS_EKF2(trans,
dev, AC_ID,
401 &control_mode, &filter_fault_status, &gps_check_status, &soln_status,
402 &innov_test_status, &mag, &vel, &pos, &hgt, &tas, &hagl, &flow, &beta,
403 &mag_decl, &terrain_valid, &dead_reckoning);
409 Vector3f vibe =
ekf.getImuVibrationMetrics();
412 ekf.get_gps_drift_metrics(gps_drift, &gps_blocked);
413 gps_blocked_b = gps_blocked;
415 pprz_msg_send_INS_EKF2_EXT(trans,
dev, AC_ID,
416 &gps_drift[0], &gps_drift[1], &gps_drift[2], &gps_blocked_b,
417 &vibe(0), &vibe(1), &vibe(2));
423 filter_control_status_u control_mode =
ekf.control_status();
424 uint32_t filter_fault_status =
ekf.fault_status().value;
425 uint16_t filter_fault_status_16 = filter_fault_status;
429 if (control_mode.flags.tilt_align && control_mode.flags.yaw_align && (control_mode.flags.gps || control_mode.flags.ev_pos)) {
431 }
else if (control_mode.flags.tilt_align && control_mode.flags.yaw_align) {
438 if (filter_fault_status) {
442 pprz_msg_send_STATE_FILTER_STATUS(trans,
dev, AC_ID, &ahrs_ekf2_id, &mde, &filter_fault_status_16);
448 Vector2f wind =
ekf.getWindVelocity();
452 ekf.get_true_airspeed(&tas);
454 pprz_msg_send_WIND_INFO_RET(trans,
dev, AC_ID, &flags, &wind(1), &wind(0), &f_zero, &tas);
459 Vector3f accel_bias =
ekf.getAccelBias();
460 Vector3f gyro_bias =
ekf.getGyroBias();
461 Vector3f mag_bias =
ekf.getMagBias();
463 pprz_msg_send_AHRS_BIAS(trans,
dev, AC_ID, &accel_bias(0), &accel_bias(1), &accel_bias(2),
464 &gyro_bias(0), &gyro_bias(1), &gyro_bias(2), &mag_bias(0), &mag_bias(1), &mag_bias(2));
470 const Quatf att_q{
ekf.calculate_quaternion()};
478 pprz_msg_send_AHRS_QUAT_INT(trans,
dev, AC_ID,
480 <p_to_body_quat.
qi,
481 <p_to_body_quat.
qx,
482 <p_to_body_quat.
qy,
483 <p_to_body_quat.
qz,
497 float sample_temp_ev[11];
498 sample_temp_ev[0] = (float)
sample_ev.time_us;
509 pprz_msg_send_EXTERNAL_POSE_DOWN(trans,
dev, AC_ID,
520 &sample_temp_ev[10] );
592 if(
ekf.setEkfGlobalOrigin(NAV_LAT0*1e-7, NAV_LON0*1e-7, (NAV_ALT0)*1e-3))
595 llh_nav0.
lat = NAV_LAT0;
596 llh_nav0.
lon = NAV_LON0;
598 llh_nav0.
alt = NAV_ALT0 + NAV_MSL0;
611 #if PERIODIC_TELEMETRY
642 if (
ekf.setEkfGlobalOrigin(lla_pos.
lat*1e-7, lla_pos.
lon*1e-7,
gps.
hmsl*1e-3)) {
680 filter_control_status_u control_status =
ekf.control_status();
683 if (control_status.flags.tilt_align) {
685 const Vector3f pos_f{
ekf.getPosition()};
695 const Vector3f vel_f{
ekf.getVelocity()};
705 const Vector3f vel_deriv_f{
ekf.getVelocityDerivative()};
707 accel.
x = vel_deriv_f(0);
708 accel.
y = vel_deriv_f(1);
709 accel.
z = vel_deriv_f(2);
716 double ekf_origin_lat, ekf_origin_lon;
722 bool ekf_origin_valid =
ekf.getEkfGlobalOrigin(origin_time, ekf_origin_lat, ekf_origin_lon, ref_alt);
724 lla_ref.
lat = ekf_origin_lat * 1e7;
725 lla_ref.
lon = ekf_origin_lon * 1e7;
739 #if defined SITL && USE_NPS
763 if (DL_EXTERNAL_POSE_ac_id(buf) != AC_ID) {
return; }
766 sample_ev.pos(0) = DL_EXTERNAL_POSE_enu_y(buf);
767 sample_ev.pos(1) = DL_EXTERNAL_POSE_enu_x(buf);
768 sample_ev.pos(2) = -DL_EXTERNAL_POSE_enu_z(buf);
769 sample_ev.vel(0) = DL_EXTERNAL_POSE_enu_yd(buf);
770 sample_ev.vel(1) = DL_EXTERNAL_POSE_enu_xd(buf);
771 sample_ev.vel(2) = -DL_EXTERNAL_POSE_enu_zd(buf);
772 sample_ev.quat(0) = DL_EXTERNAL_POSE_body_qi(buf);
773 sample_ev.quat(1) = DL_EXTERNAL_POSE_body_qy(buf);
774 sample_ev.quat(2) = DL_EXTERNAL_POSE_body_qx(buf);
775 sample_ev.quat(3) = -DL_EXTERNAL_POSE_body_qz(buf);
777 #ifdef INS_EXT_VISION_ROTATION
791 sample_ev.vel_frame = velocity_frame_t::LOCAL_FRAME_FRD;
805 imuSample imu_sample = {};
806 imu_sample.time_us = stamp;
811 ekf.setIMUData(imu_sample);
813 if (
ekf.attitude_valid()) {
816 const Quatf att_q{
ekf.calculate_quaternion()};
817 ltp_to_body_quat.
qi = att_q(0);
818 ltp_to_body_quat.
qx = att_q(1);
819 ltp_to_body_quat.
qy = att_q(2);
820 ltp_to_body_quat.
qz = att_q(3);
826 float delta_q_reset[4];
828 ekf.get_quat_reset(delta_q_reset, &quat_reset_counter);
830 #ifndef NO_RESET_UPDATE_SETPOINT_HEADING
833 float psi = matrix::Eulerf(matrix::Quatf(delta_q_reset)).psi();
845 Vector3f gyro_bias{
ekf.getGyroBias()};
855 Vector3f accel_bias{
ekf.getAccelBias()};
873 sample.time_us = stamp;
877 ekf.set_air_density(rho);
881 ekf.setBaroData(sample);
894 sample.time_us = stamp;
895 sample.rng = distance;
898 ekf.setRangeData(sample);
938 sample.time_us = stamp;
947 sample.mag(0) = mag_gauss.
x;
948 sample.mag(1) = mag_gauss.
y;
949 sample.mag(2) = mag_gauss.
z;
951 ekf.setMagData(sample);
960 gps_message gps_msg = {};
961 gps_msg.time_usec = stamp;
963 gps_msg.lat = lla_pos.
lat;
964 gps_msg.lon = lla_pos.
lon;
965 gps_msg.alt = gps_s->
hmsl;
966 #if INS_EKF2_GPS_COURSE_YAW
967 gps_msg.yaw = wrap_pi((
float)gps_s->
course / 1e7);
968 gps_msg.yaw_offset = 0;
969 #elif defined(INS_EKF2_GPS_YAW_OFFSET) && defined(INS_EKF2_ANTENNA_DISTANCE)
978 gps_msg.yaw_offset = RadOfDeg(INS_EKF2_GPS_YAW_OFFSET);
981 gps_msg.yaw_offset = NAN;
983 gps_msg.fix_type = gps_s->
fix;
984 gps_msg.eph = gps_s->
hacc / 100.0;
985 gps_msg.epv = gps_s->
vacc / 100.0;
986 gps_msg.sacc = gps_s->
sacc / 100.0;
987 gps_msg.vel_m_s = gps_s->
gspeed / 100.0;
989 gps_msg.vel_ned(0) = ned_vel.
x;
990 gps_msg.vel_ned(1) = ned_vel.
y;
991 gps_msg.vel_ned(2) = ned_vel.
z;
993 gps_msg.nsats = gps_s->
num_sv;
994 gps_msg.pdop = gps_s->
pdop;
996 ekf.setGpsData(gps_msg);
1004 int32_t flow_der_x __attribute__((unused)),
1005 int32_t flow_der_y __attribute__((unused)),
1007 float size_divergence __attribute__((unused)))
1010 sample.time_us = stamp;
1026 flowdata(0) = RadOfDeg(flow_y) * (1e-6 *
1028 flowdata(1) = - RadOfDeg(flow_x) * (1e-6 *
1031 sample.quality = quality;
1032 sample.flow_xy_rad =
1034 sample.gyro_xyz = Vector3f{NAN, NAN, NAN};
1037 ekf.setOpticalFlowData(sample);
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
#define AHRS_COMP_ID_EKF2
bool autopilot_in_flight(void)
get in_flight flag
Core autopilot interface common to all firmwares.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static const float pos_z[]
struct NedCoor_f ned_vel_float_from_gps(struct GpsState *gps_s)
Get GPS ned velocity (float) Converted on the fly if not available.
struct GpsState gps
global GPS state
struct LlaCoor_i lla_int_from_gps(struct GpsState *gps_s)
Get GPS lla (integer) Converted on the fly if not available.
struct GpsRelposNED gps_relposned
int32_t hmsl
height above mean sea level (MSL) in mm
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_NED_BIT
uint32_t hacc
horizontal accuracy in cm
uint16_t pdop
position dilution of precision scaled by 100
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
uint8_t num_sv
number of sat in fix
data structure for GPS information
void float_quat_comp(struct FloatQuat *a2c, struct FloatQuat *a2b, struct FloatQuat *b2c)
Composition (multiplication) of two quaternions.
#define MAGS_FLOAT_OF_BFP(_ef, _ei)
#define RATES_COPY(_a, _b)
#define VECT3_COPY(_a, _b)
#define QUAT1_BFP_OF_REAL(_qf)
#define ACCEL_BFP_OF_REAL(_af)
#define POS_BFP_OF_REAL(_af)
#define SPEED_BFP_OF_REAL(_af)
int32_t lat
in degrees*1e7
int32_t hmsl
Height above mean sea level in mm.
int32_t alt
in millimeters above WGS84 reference ellipsoid
struct LlaCoor_i lla
Reference point in lla.
struct EcefCoor_i ecef
Reference point in ecef.
int32_t lon
in degrees*1e7
void ltp_def_from_lla_i(struct LtpDef_i *def, struct LlaCoor_i *lla)
vector in Latitude, Longitude and Altitude
vector in North East Down coordinates
static int32_t wgs84_ellipsoid_to_geoid_i(int32_t lat, int32_t lon)
Get WGS84 ellipsoid/geoid separation.
static float pprz_isa_density_of_pressure(float pressure, float temp)
Get the air density (rho) from a given pressure and temperature.
static float pprz_isa_height_of_pressure_full(float pressure, float ref_p)
Get relative altitude from pressure (using full equation).
static void stateSetAccelNed_f(struct NedCoor_f *ned_accel)
Set acceleration in NED coordinates (float).
static void stateSetNedToBodyQuat_f(struct FloatQuat *ned_to_body_quat)
Set vehicle body attitude from quaternion (float).
static struct Int32Quat * stateGetNedToBodyQuat_i(void)
Get vehicle body attitude quaternion (int).
struct LtpDef_i ned_origin_i
Definition of the local (flat earth) coordinate system.
static void stateSetPositionNed_f(struct NedCoor_f *ned_pos)
Set position from local NED coordinates (float).
static void stateSetLocalOrigin_i(struct LtpDef_i *ltp_def)
Set the local (flat earth) coordinate frame origin (int).
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
static void stateSetAccelBody_i(struct Int32Vect3 *body_accel)
Set acceleration in Body coordinates (int).
static void stateSetSpeedNed_f(struct NedCoor_f *ned_speed)
Set ground speed in local NED coordinates (float).
static abi_event optical_flow_ev
void ins_reset_local_origin(void)
INS local origin reset.
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
#define INS_EKF2_EVV_NOISE
void ins_ekf2_update(void)
#define INS_EKF2_IMU_POS_Z
static void send_ins(struct transport_tx *trans, struct link_device *dev)
#define INS_EKF2_GPS_POS_Y
#define INS_EKF2_MAX_REL_LENGTH_ERROR
Maximum allowed error in distance between dual GPS antennae.
static void send_ins_ekf2(struct transport_tx *trans, struct link_device *dev)
void ins_ekf2_remove_gps(int32_t mode)
static void send_ins_ekf2_ext(struct transport_tx *trans, struct link_device *dev)
static abi_event temperature_ev
static void optical_flow_cb(uint8_t sender_id, uint32_t stamp, int32_t flow_x, int32_t flow_y, int32_t flow_der_x, int32_t flow_der_y, float quality, float size_divergence)
#define INS_EKF2_TEMPERATURE_ID
default temperature sensor to use in INS
#define INS_EKF2_VDIST_SENSOR_TYPE
The EKF2 primary vertical distance sensor type.
static void mag_cb(uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *mag)
static void accel_int_cb(uint8_t sender_id, uint32_t stamp, struct FloatVect3 *delta_accel, uint16_t dt)
#define INS_EKF2_FUSION_MODE
Special configuration for Optitrack.
#define INS_EKF2_GPS_CHECK_MASK
The EKF2 GPS checks before initialization.
#define INS_EKF2_RANGE_MAIN_AGL
If enabled uses radar sensor as primary AGL source, if possible.
#define INS_EKF2_MAX_FLOW_RATE
#define INS_EKF2_GPS_POS_Z
static abi_event gyro_int_ev
#define INS_EKF2_EVA_NOISE
#define INS_EKF2_BARO_NOISE
#define INS_EKF2_ACCEL_ID
static void send_ins_ref(struct transport_tx *trans, struct link_device *dev)
static void temperature_cb(uint8_t sender_id, float temp)
#define INS_EKF2_FLOW_POS_Y
static void agl_cb(uint8_t sender_id, uint32_t stamp, float distance)
static void send_ins_z(struct transport_tx *trans, struct link_device *dev)
static parameters * ekf_params
The EKF parameters.
static void send_filter_status(struct transport_tx *trans, struct link_device *dev)
#define INS_EKF2_FLOW_INNOV_GATE
#define INS_EKF2_FLOW_NOISE
#define INS_EKF2_EVP_NOISE
static void baro_cb(uint8_t sender_id, uint32_t stamp, float pressure)
void ins_ekf2_change_param(int32_t unk)
static void send_wind_info_ret(struct transport_tx *trans, struct link_device *dev)
#define INS_EKF2_MIN_FLOW_QUALITY
void ins_reset_altitude_ref(void)
INS altitude reference reset.
#define INS_EKF2_GPS_V_NOISE
static Ekf ekf
EKF class itself.
struct ekf2_t ekf2
Local EKF2 status structure.
#define INS_EKF2_FLOW_SENSOR_DELAY
void ins_ekf2_parse_EXTERNAL_POSE(uint8_t *buf)
void ins_ekf2_parse_EXTERNAL_POSE_SMALL(uint8_t *buf)
#define INS_EKF2_IMU_POS_X
#define INS_EKF2_GPS_P_NOISE
static void send_ahrs_quat(struct transport_tx *trans, struct link_device *dev)
#define INS_EKF2_AGL_ID
default AGL sensor to use in INS
static void ins_ekf2_publish_attitude(uint32_t stamp)
Publish the attitude and get the new state Directly called after a succeslfull gyro+accel reading.
static void gyro_int_cb(uint8_t sender_id, uint32_t stamp, struct FloatRates *delta_gyro, uint16_t dt)
#define INS_EKF2_SONAR_MIN_RANGE
Default AGL sensor minimum range.
#define INS_EKF2_FLOW_NOISE_QMIN
#define INS_EKF2_IMU_POS_Y
static abi_event accel_int_ev
#define INS_EKF2_FLOW_POS_Z
static struct extVisionSample sample_ev
External vision sample.
#define INS_EKF2_BARO_ID
default barometer to use in INS
static void send_external_pose_down(struct transport_tx *trans, struct link_device *dev)
#define INS_EKF2_SONAR_MAX_RANGE
Default AGL sensor maximum range.
#define INS_EKF2_GPS_POS_X
#define INS_EKF2_FLOW_POS_X
static void send_ahrs_bias(struct transport_tx *trans, struct link_device *dev)
INS based in the EKF2 of PX4.
bool accel_valid
If we received a acceleration measurement.
bool got_imu_data
If we received valid IMU data (any sensor)
bool gyro_valid
If we received a gyroscope measurement.
uint32_t accel_dt
Accelerometer delta timestamp between abi messages (us)
uint32_t gyro_dt
Gyroscope delta timestamp between abi messages (us)
struct LtpDef_i ltp_def
Latest LTP definition from the quat_reset_counter EKF2.
uint32_t flow_stamp
Optic flow last abi message timestamp.
float temp
Latest temperature measurement in degrees celcius.
struct FloatVect3 delta_accel
Last accelerometer measurements.
uint64_t ltp_stamp
Last LTP change timestamp from the EKF2.
float qnh
QNH value in hPa.
uint8_t quat_reset_counter
Amount of quaternion resets from the EKF2.
struct FloatRates delta_gyro
Last gyroscope measurements.
void waypoints_localize_all(void)
update local ENU coordinates of global waypoints
void sim_overwrite_ins(void)
vector in North East Down coordinates Units: meters
Paparazzi atmospheric pressure conversion utilities.
struct HorizontalGuidance guidance_h
struct HorizontalGuidanceRCInput rc_sp
remote control setpoint
struct HorizontalGuidanceSetpoint sp
setpoints
struct RotorcraftNavigation nav
float heading
heading setpoint (in radians)
void stabilization_attitude_enter(void)
Attitude control enter function.
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
static const struct usb_device_descriptor dev
Architecture independent timing functions.
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned long long uint64_t
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.