Files
gps/soc/software/gps_system/header/fusion/fusion_measurement.h
T

49 lines
1.2 KiB
C

#ifndef FUSION_MEASUREMENT_H
#define FUSION_MEASUREMENT_H
#include <stdbool.h>
#include <stdint.h>
#include "imu/imu_sample.h"
/*
* Hardware- and solver-neutral messages shared at the GPS/ESKF boundary.
* timestamp_ticks always belongs to the common local monotonic timebase; GPS
* week/TOW is metadata and must not drive filter dt.
*/
typedef struct {
uint64_t timestamp_ticks;
double latitude_deg;
double longitude_deg;
double height_m;
double covariance_enu_m2[3][3];
double hacc_m;
double vacc_m;
double residual_rms_m;
double chi_square_ratio;
unsigned int used_satellites;
bool solution_valid;
} fusion_gps_measurement_t;
/* Timestamped IMU plus the independently supervised platform state consumed
* by fusion. Drivers publish imu_sample_t and do not decide `vehicle_at_rest`. */
typedef struct {
uint64_t timestamp_ticks;
double accel_mps2[3];
double gyro_rps[3];
double temperature_c;
uint32_t sequence;
bool vehicle_at_rest;
} fusion_imu_measurement_t;
/* Generic local-navigation measurement consumed by the ESKF coordinator. */
typedef struct {
uint64_t timestamp_ticks;
double position_enu_m[3];
double covariance_enu_m2[9];
double source_quality;
bool source_valid;
} fusion_position_measurement_t;
#endif