40 #ifndef RELATIVE_LOCALIZATION_N_UAVS
41 #define RELATIVE_LOCALIZATION_N_UAVS 4
48 #ifndef RELATIVE_LOCALIZATION_NO_NORTH
49 #define RELATIVE_LOCALIZATION_NO_NORTH 1
52 #if RELATIVE_LOCALIZATION_NO_NORTH
68 float range,
float trackedVx,
float trackedVy,
float trackedh,
69 float trackedAx,
float trackedAy,
float trackedYawr)
77 #if RELATIVE_LOCALIZATION_NO_NORTH
83 }
else if (
idx != -1) {
90 #if RELATIVE_LOCALIZATION_NO_NORTH
94 float U[
EKF_L] = {ownAx, ownAy, trackedAx, trackedAy, ownYawr, trackedYawr};
95 float Z[
EKF_M] = {range, ownh, trackedh, ownVx, ownVy, trackedVx, trackedVy};
100 float Z[
EKF_M] = {range, ownVx, ownVy, trackedVx, trackedVy, trackedh - ownh};
119 pprz_msg_send_RLFILTER(trans,
dev, AC_ID,
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
#define RELATIVE_LOCALIZATION_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void discrete_ekf_update(struct discrete_ekf *filter, float *Z)
void discrete_ekf_predict(struct discrete_ekf *filter)
void discrete_ekf_new(struct discrete_ekf *filter)
void discrete_ekf_no_north_predict(struct discrete_ekf_no_north *filter, float *U)
void discrete_ekf_no_north_new(struct discrete_ekf_no_north *filter)
void discrete_ekf_no_north_update(struct discrete_ekf_no_north *filter, float *Z)
static void int32_vect_set_value(int32_t *a, const int32_t v, const int n)
a = v * ones(n,1)
static bool int32_vect_find(const int32_t *a, const int32_t s, int *loc, const int n)
Find value s in array a.
static struct NedCoor_f * stateGetAccelNed_f(void)
Get acceleration in NED coordinates (float).
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct FloatRates * stateGetBodyRates_f(void)
Get vehicle body angular rate (float).
static struct NedCoor_f * stateGetSpeedNed_f(void)
Get ground speed in local NED coordinates (float).
Paparazzi generic algebra macros.
Paparazzi fixed point algebra.
static abi_event range_communication_event
static void send_relative_localization_data(struct transport_tx *trans, struct link_device *dev)
int32_t id_array[RELATIVE_LOCALIZATION_N_UAVS]
#define RELATIVE_LOCALIZATION_N_UAVS
struct discrete_ekf_no_north ekf_rl[RELATIVE_LOCALIZATION_N_UAVS]
void relative_localization_filter_periodic(void)
void relative_localization_filter_init(void)
float range_array[RELATIVE_LOCALIZATION_N_UAVS]
static void range_msg_callback(uint8_t sender_id, uint8_t ac_id, float range, float trackedVx, float trackedVy, float trackedh, float trackedAx, float trackedAy, float trackedYawr)
uint32_t latest_update_time[RELATIVE_LOCALIZATION_N_UAVS]
API to get/set the generic vehicle states.
static const struct usb_device_descriptor dev
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.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.