|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
40 #ifndef RELATIVE_LOCALIZATION_N_UAVS
41 #define RELATIVE_LOCALIZATION_N_UAVS 4 // Maximum expected number of other UAVs
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,
void discrete_ekf_predict(struct discrete_ekf *filter)
#define RELATIVE_LOCALIZATION_ID
static struct NedCoor_f * stateGetAccelNed_f(void)
Get acceleration in NED coordinates (float).
int32_t id_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)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
Event structure to store callbacks in a linked list.
static void send_relative_localization_data(struct transport_tx *trans, struct link_device *dev)
static struct FloatRates * stateGetBodyRates_f(void)
Get vehicle body angular rate (float).
static abi_event range_communication_event
Paparazzi fixed point algebra.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static struct NedCoor_f * stateGetSpeedNed_f(void)
Get ground speed in local NED coordinates (float).
void discrete_ekf_update(struct discrete_ekf *filter, float *Z)
void relative_localization_filter_init(void)
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.
static bool int32_vect_find(const int32_t *a, const int32_t s, int *loc, const int n)
Find value s in array a.
float range_array[RELATIVE_LOCALIZATION_N_UAVS]
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
struct discrete_ekf_no_north ekf_rl[RELATIVE_LOCALIZATION_N_UAVS]
#define RELATIVE_LOCALIZATION_N_UAVS
Paparazzi generic algebra macros.
void relative_localization_filter_periodic(void)
void discrete_ekf_no_north_predict(struct discrete_ekf_no_north *filter, float *U)
static void int32_vect_set_value(int32_t *a, const int32_t v, const int n)
a = v * ones(n,1)
void discrete_ekf_no_north_update(struct discrete_ekf_no_north *filter, float *Z)
uint32_t latest_update_time[RELATIVE_LOCALIZATION_N_UAVS]
#define DefaultPeriodic
Set default periodic telemetry.
void discrete_ekf_new(struct discrete_ekf *filter)
void discrete_ekf_no_north_new(struct discrete_ekf_no_north *filter)