Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tag_tracking.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3 *
4 * This file is part of paparazzi
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
29#ifndef TAG_TRACKING_H
30#define TAG_TRACKING_H
31
32#include "std.h"
35
36#ifndef TAG_TRACKING_NB_MAX
37#define TAG_TRACKING_NB_MAX 5
38#endif
39
40
41#define TAG_TRACKING_ANY -2
42
43// Searching status
44#define TAG_TRACKING_SEARCHING 0
45#define TAG_TRACKING_RUNNING 1
46#define TAG_TRACKING_LOST 2
47#define TAG_TRACKING_DISABLE 3 // don't run kalman filter, update pos from measures
48
49// Type of tag motion
50// If fixed, the speed correction is forced to zero
51#define TAG_TRACKING_FIXED_POS 0
52#define TAG_TRACKING_MOVING 1
53
66
67
68// settings
70extern float tag_tracking_motion_type;
71extern float tag_tracking_predict_time;
72extern float tag_tracking_kp;
73extern float tag_tracking_kpz;
74void tag_tracking_set_setting_id(float id);
75void tag_tracking_set_motion_type(float motion_type);
76void tag_tracking_set_predict_time(float predict_time);
77void tag_tracking_set_kp(float kp);
78void tag_tracking_set_kpz(float kpz);
79
80extern struct tag_tracking_public* tag_tracking_get(int16_t tag_id);
83extern void tag_tracking_init(void);
84extern void tag_tracking_propagate(void);
85extern void tag_tracking_propagate_start(void);
86extern void tag_tracking_report(void);
88extern void tag_tracking_compute_speed(void);
89extern bool tag_tracking_set_tracker_id(int16_t tag_id, uint8_t wp_id);
90extern float tag_tracking_get_heading(int16_t tag_id);
91
92#endif // TAG_TRACKING_H
93
Roation quaternion.
Paparazzi floating point algebra.
Paparazzi floating point math for geodetic calculations.
vector in North East Down coordinates Units: meters
void tag_tracking_set_kpz(float kpz)
struct FloatQuat ned_to_tag_quat
estimated attitude in NED frame
int tag_tracking_setting_id
struct tag_tracking_public * tag_tracking_get(int16_t tag_id)
bool tag_tracking_set_tracker_id(int16_t tag_id, uint8_t wp_id)
float kpz
vertical tracking command gain
void tag_tracking_set_kp(float kp)
float tag_tracking_predict_time
uint8_t tag_tracking_get_motion_type(int16_t tag_id)
struct FloatVect3 pos
estimated position
float tag_tracking_motion_type
void tag_tracking_set_setting_id(float id)
uint8_t status
tracking status flag
void tag_tracking_propagate_start(void)
void tag_tracking_parse_target_pos(uint8_t *buf)
float predict_time
prediction time for WP tag
void tag_tracking_set_predict_time(float predict_time)
float tag_tracking_kpz
struct NedCoor_f speed_cmd
speed command to track the tag position
float tag_tracking_kp
void tag_tracking_propagate(void)
uint8_t tag_tracking_get_status(int16_t tag_id)
struct FloatQuat body_to_tag_quat
estimated attitude in body frame
void tag_tracking_set_motion_type(float motion_type)
void tag_tracking_init(void)
uint8_t motion_type
type of tag motion
void tag_tracking_compute_speed(void)
Control function.
float tag_tracking_get_heading(int16_t tag_id)
struct FloatVect3 speed
estimated speed
void tag_tracking_report(void)
float kp
horizontal tracking command gain
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.