Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
trilateration.c File Reference
+ Include dependency graph for trilateration.c:

Go to the source code of this file.

Functions

int trilateration_init (struct Anchor *anchors)
 Init internal trilateration structures. More...
 
int trilateration_compute (struct Anchor *anchors, struct EnuCoor_f *pos)
 Compute trilateration based on the latest measurments. More...
 

Variables

static float P [3][3]
 
static float Ex [3]
 
static float Ey [3]
 
static float Ez [3]
 
static float D
 
static float I
 
static float J
 
bool init_failed
 

Detailed Description

Author
Gautier Hattenberger Trilateration algorithm https://en.wikipedia.org/wiki/Trilateration

Definition in file trilateration.c.

Function Documentation

◆ trilateration_compute()

int trilateration_compute ( struct Anchor anchors,
struct EnuCoor_f pos 
)

Compute trilateration based on the latest measurments.

Parameters
[in]anchorsarray of anchors with updated distance measurements
[out]poscomputed position
Returns
error status (0 for valid position)

Definition at line 87 of file trilateration.c.

References D, d2, Anchor::distance, Ex, Ey, Ez, I, init_failed, J, P, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

Referenced by check_and_compute_data().

+ Here is the caller graph for this function:

◆ trilateration_init()

int trilateration_init ( struct Anchor anchors)

Init internal trilateration structures.

Parameters
[in]anchorsarray of anchors with their location

Definition at line 39 of file trilateration.c.

References D, Ex, Ey, Ez, float_vect_add(), float_vect_diff(), float_vect_dot_product(), float_vect_norm(), float_vect_sdiv(), float_vect_smul(), init_failed, J, P, Anchor::pos, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

Referenced by dw1000_arduino_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ D

◆ Ex

float Ex[3]
static

Definition at line 33 of file trilateration.c.

Referenced by error_output(), trilateration_compute(), and trilateration_init().

◆ Ey

float Ey[3]
static

Definition at line 33 of file trilateration.c.

Referenced by trilateration_compute(), and trilateration_init().

◆ Ez

float Ez[3]
static

Definition at line 33 of file trilateration.c.

Referenced by trilateration_compute(), and trilateration_init().

◆ I

float I
static

Definition at line 35 of file trilateration.c.

Referenced by gvf_parametric_control_2D(), and trilateration_compute().

◆ init_failed

bool init_failed

Definition at line 37 of file trilateration.c.

Referenced by trilateration_compute(), and trilateration_init().

◆ J

float J
static

◆ P