Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
tag_tracking.h File Reference
#include "std.h"
#include "math/pprz_algebra_float.h"
#include "math/pprz_geodetic_float.h"
+ Include dependency graph for tag_tracking.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tag_tracking_public
 

Macros

#define TAG_TRACKING_NB_MAX   5
 
#define TAG_TRACKING_ANY   -2
 
#define TAG_TRACKING_SEARCHING   0
 
#define TAG_TRACKING_RUNNING   1
 
#define TAG_TRACKING_LOST   2
 
#define TAG_TRACKING_DISABLE   3
 
#define TAG_TRACKING_FIXED_POS   0
 
#define TAG_TRACKING_MOVING   1
 

Functions

void tag_tracking_set_setting_id (float id)
 
void tag_tracking_set_motion_type (float motion_type)
 
void tag_tracking_set_predict_time (float predict_time)
 
void tag_tracking_set_kp (float kp)
 
void tag_tracking_set_kpz (float kpz)
 
struct tag_tracking_publictag_tracking_get (int16_t tag_id)
 
uint8_t tag_tracking_get_status (int16_t tag_id)
 
uint8_t tag_tracking_get_motion_type (int16_t tag_id)
 
void tag_tracking_init (void)
 
void tag_tracking_propagate (void)
 
void tag_tracking_propagate_start (void)
 
void tag_tracking_report (void)
 
void tag_tracking_parse_target_pos (uint8_t *buf)
 
void tag_tracking_compute_speed (void)
 Control function. More...
 
bool tag_tracking_set_tracker_id (int16_t tag_id, uint8_t wp_id)
 
float tag_tracking_get_heading (int16_t tag_id)
 

Variables

int tag_tracking_setting_id
 
float tag_tracking_motion_type
 
float tag_tracking_predict_time
 
float tag_tracking_kp
 
float tag_tracking_kpz
 

Data Structure Documentation

◆ tag_tracking_public

struct tag_tracking_public

Definition at line 54 of file tag_tracking.h.

+ Collaboration diagram for tag_tracking_public:
Data Fields
struct FloatQuat body_to_tag_quat estimated attitude in body frame
float kp horizontal tracking command gain
float kpz vertical tracking command gain
uint8_t motion_type type of tag motion
struct FloatQuat ned_to_tag_quat estimated attitude in NED frame
struct FloatVect3 pos estimated position
float predict_time prediction time for WP tag
struct FloatVect3 speed estimated speed
struct NedCoor_f speed_cmd speed command to track the tag position
uint8_t status tracking status flag

Macro Definition Documentation

◆ TAG_TRACKING_ANY

#define TAG_TRACKING_ANY   -2

Definition at line 41 of file tag_tracking.h.

◆ TAG_TRACKING_DISABLE

#define TAG_TRACKING_DISABLE   3

Definition at line 47 of file tag_tracking.h.

◆ TAG_TRACKING_FIXED_POS

#define TAG_TRACKING_FIXED_POS   0

Definition at line 51 of file tag_tracking.h.

◆ TAG_TRACKING_LOST

#define TAG_TRACKING_LOST   2

Definition at line 46 of file tag_tracking.h.

◆ TAG_TRACKING_MOVING

#define TAG_TRACKING_MOVING   1

Definition at line 52 of file tag_tracking.h.

◆ TAG_TRACKING_NB_MAX

#define TAG_TRACKING_NB_MAX   5

Definition at line 37 of file tag_tracking.h.

◆ TAG_TRACKING_RUNNING

#define TAG_TRACKING_RUNNING   1

Definition at line 45 of file tag_tracking.h.

◆ TAG_TRACKING_SEARCHING

#define TAG_TRACKING_SEARCHING   0

Definition at line 44 of file tag_tracking.h.

Function Documentation

◆ tag_tracking_compute_speed()

void tag_tracking_compute_speed ( void  )

Control function.

calling this function only updates the command vector it can be applied to the guidance control using the guided mode or from the flight plan with 'guided' instruction

Definition at line 509 of file tag_tracking.c.

References FLOAT_VECT3_ZERO, tag_tracking_public::kp, tag_tracking_public::kpz, tag_tracking_public::pos, tag_tracking_public::speed, tag_tracking_public::speed_cmd, stateGetPositionNed_f(), tag_infos, tag_info::tag_tracking, TAG_TRACKING_MAX_SPEED, TAG_TRACKING_MAX_VZ, TAG_TRACKING_NB_MAX, TAG_TRACKING_RUNNING, VECT2_STRIM, FloatVect3::x, NedCoor_f::x, FloatVect3::y, NedCoor_f::y, FloatVect3::z, and NedCoor_f::z.

+ Here is the call graph for this function:

◆ tag_tracking_get()

struct tag_tracking_public* tag_tracking_get ( int16_t  tag_id)

◆ tag_tracking_get_heading()

float tag_tracking_get_heading ( int16_t  tag_id)

Definition at line 242 of file tag_tracking.c.

References float_eulers_of_quat(), tag_tracking_public::ned_to_tag_quat, FloatEulers::psi, and tag_tracking_get().

+ Here is the call graph for this function:

◆ tag_tracking_get_motion_type()

uint8_t tag_tracking_get_motion_type ( int16_t  tag_id)

Definition at line 237 of file tag_tracking.c.

References tag_tracking_public::motion_type, and tag_tracking_get().

+ Here is the call graph for this function:

◆ tag_tracking_get_status()

uint8_t tag_tracking_get_status ( int16_t  tag_id)

Definition at line 232 of file tag_tracking.c.

References tag_tracking_public::status, and tag_tracking_get().

+ Here is the call graph for this function:

◆ tag_tracking_init()

◆ tag_tracking_parse_target_pos()

void tag_tracking_parse_target_pos ( uint8_t buf)

◆ tag_tracking_propagate()

◆ tag_tracking_propagate_start()

void tag_tracking_propagate_start ( void  )

Definition at line 461 of file tag_tracking.c.

References tag_infos, TAG_TRACKING_NB_MAX, and tag_tracking_propagate_start_tag().

+ Here is the call graph for this function:

◆ tag_tracking_report()

◆ tag_tracking_set_kp()

void tag_tracking_set_kp ( float  kp)

◆ tag_tracking_set_kpz()

void tag_tracking_set_kpz ( float  kpz)

◆ tag_tracking_set_motion_type()

void tag_tracking_set_motion_type ( float  motion_type)

◆ tag_tracking_set_predict_time()

void tag_tracking_set_predict_time ( float  predict_time)

◆ tag_tracking_set_setting_id()

void tag_tracking_set_setting_id ( float  id)

Definition at line 675 of file tag_tracking.c.

◆ tag_tracking_set_tracker_id()

bool tag_tracking_set_tracker_id ( int16_t  tag_id,
uint8_t  wp_id 
)

Variable Documentation

◆ tag_tracking_kp

float tag_tracking_kp
extern

Definition at line 631 of file tag_tracking.c.

Referenced by tag_tracking_set_kp().

◆ tag_tracking_kpz

float tag_tracking_kpz
extern

Definition at line 632 of file tag_tracking.c.

Referenced by tag_tracking_set_kpz().

◆ tag_tracking_motion_type

float tag_tracking_motion_type
extern

Definition at line 629 of file tag_tracking.c.

Referenced by tag_tracking_set_motion_type().

◆ tag_tracking_predict_time

float tag_tracking_predict_time
extern

Definition at line 630 of file tag_tracking.c.

Referenced by tag_tracking_set_predict_time().

◆ tag_tracking_setting_id

int tag_tracking_setting_id
extern