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

Go to the source code of this file.

Macros

#define RANGE_FORCEFIELD_RECIEVE_ID   ABI_BROADCAST
 
#define RANGE_FORCEFIELD_INNER_LIMIT   1.0f
 
#define RANGE_FORCEFIELD_OUTER_LIMIT   1.4f
 
#define RANGE_FORCEFIELD_MIN_VEL   0.0f
 
#define RANGE_FORCEFIELD_MAX_VEL   0.5f
 

Functions

static float compute_ff_vel (float range)
 
static void store_min_dist (float pos, float *nearest_pos, float range)
 
static void obstacle_cb (uint8_t sender_id, float range, float azimuth, float bearing)
 
void range_forcefield_init (void)
 
void range_forcefield_periodic (void)
 
void range_forcefield_update (float range, struct FloatEulers *body_to_sensor_eulers)
 

Variables

struct range_forcefield_param_t range_forcefield_param
 
static struct FloatVect3 ff_nearest_obs_pos
 
static struct FloatVect3 ff_nearest_obs_neg
 
static abi_event obstacle_ev
 

Macro Definition Documentation

◆ RANGE_FORCEFIELD_INNER_LIMIT

#define RANGE_FORCEFIELD_INNER_LIMIT   1.0f

Definition at line 37 of file range_forcefield.c.

◆ RANGE_FORCEFIELD_MAX_VEL

#define RANGE_FORCEFIELD_MAX_VEL   0.5f

Definition at line 52 of file range_forcefield.c.

◆ RANGE_FORCEFIELD_MIN_VEL

#define RANGE_FORCEFIELD_MIN_VEL   0.0f

Definition at line 47 of file range_forcefield.c.

◆ RANGE_FORCEFIELD_OUTER_LIMIT

#define RANGE_FORCEFIELD_OUTER_LIMIT   1.4f

Definition at line 42 of file range_forcefield.c.

◆ RANGE_FORCEFIELD_RECIEVE_ID

#define RANGE_FORCEFIELD_RECIEVE_ID   ABI_BROADCAST

Definition at line 33 of file range_forcefield.c.

Function Documentation

◆ compute_ff_vel()

static float compute_ff_vel ( float  range)
static

◆ obstacle_cb()

static void obstacle_cb ( uint8_t  sender_id,
float  range,
float  azimuth,
float  bearing 
)
static

Definition at line 64 of file range_forcefield.c.

References FloatEulers::phi, FloatEulers::psi, range_forcefield_update(), and FloatEulers::theta.

Referenced by range_forcefield_init().

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

◆ range_forcefield_init()

◆ range_forcefield_periodic()

void range_forcefield_periodic ( void  )

◆ range_forcefield_update()

void range_forcefield_update ( float  range,
struct FloatEulers body_to_sensor_eulers 
)

Definition at line 121 of file range_forcefield.c.

References ff_nearest_obs_neg, ff_nearest_obs_pos, float_rmat_of_eulers, float_rmat_transp_vmult(), store_min_dist(), FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by obstacle_cb().

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

◆ store_min_dist()

static void store_min_dist ( float  pos,
float *  nearest_pos,
float  range 
)
static

Definition at line 165 of file range_forcefield.c.

Referenced by range_forcefield_update().

+ Here is the caller graph for this function:

Variable Documentation

◆ ff_nearest_obs_neg

struct FloatVect3 ff_nearest_obs_neg
static

◆ ff_nearest_obs_pos

struct FloatVect3 ff_nearest_obs_pos
static

◆ obstacle_ev

abi_event obstacle_ev
static

Definition at line 63 of file range_forcefield.c.

Referenced by range_forcefield_init().

◆ range_forcefield_param

struct range_forcefield_param_t range_forcefield_param

Definition at line 1 of file range_forcefield.c.

Referenced by compute_ff_vel(), and range_forcefield_init().