33 #define EKF_RANGE_DIM 6
62 extern void ekf_range_init(
struct EKFRange *ekf_range,
float P0_pos,
float P0_speed,
float Q_sigma2,
float R_dist,
float R_speed,
float dt);
void ekf_range_update_dist(struct EKFRange *ekf_range, float dist, struct EnuCoor_f anchor)
Update step based on each new distance data.
void ekf_range_update_noise(struct EKFRange *ekf_range, float Q_sigma2, float R_dist, float R_speed)
Update process and measurement noises.
float R_dist
measurement noise on distances (assumed the same for all anchors)
vector in East North Up coordinates Units: meters
Paparazzi floating point math for geodetic calculations.
float Q[EKF_RANGE_DIM][EKF_RANGE_DIM]
process noise matrix
void ekf_range_predict(struct EKFRange *ekf_range)
Prediction step.
void ekf_range_set_state(struct EKFRange *ekf_range, struct EnuCoor_f pos, struct EnuCoor_f speed)
Set initial state vector.
Paparazzi floating point algebra.
void ekf_range_init(struct EKFRange *ekf_range, float P0_pos, float P0_speed, float Q_sigma2, float R_dist, float R_speed, float dt)
Init EKF_range internal struct.
struct EnuCoor_f ekf_range_get_speed(struct EKFRange *ekf_range)
Get current speed.
void ekf_range_get_state(struct EKFRange *ekf_range, struct EnuCoor_f *pos, struct EnuCoor_f *speed)
Get current state.
float P[EKF_RANGE_DIM][EKF_RANGE_DIM]
covariance matrix
float dt
prediction step (in seconds)
float R_speed
measurement noise on speed (assumed the same for all axis)
struct EnuCoor_f ekf_range_get_pos(struct EKFRange *ekf_range)
Get current pos.
float state[EKF_RANGE_DIM]
state vector
void ekf_range_update_speed(struct EKFRange *ekf_range, float speed, uint8_t type)
Update step based on speed measure.