Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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 // Searching status
37 #define TAG_TRACKING_SEARCHING 0
38 #define TAG_TRACKING_RUNNING 1
39 #define TAG_TRACKING_LOST 2
40 #define TAG_TRACKING_DISABLE 3 // don't run kalman filter, update pos from measures
41 
42 // Type of tag motion
43 // If fixed, the speed correction is forced to zero
44 #define TAG_TRACKING_FIXED_POS 0
45 #define TAG_TRACKING_MOVING 1
46 
48  struct FloatVect3 pos;
49  struct FloatVect3 speed;
52  float predict_time;
53  struct NedCoor_f speed_cmd;
54  float kp;
55  float kpz;
56 };
57 
58 extern struct tag_tracking_public tag_tracking;
59 
60 extern void tag_tracking_init(void);
61 extern void tag_tracking_propagate(void);
62 extern void tag_tracking_propagate_start(void);
63 extern void tag_tracking_report(void);
64 extern void tag_tracking_parse_target_pos(uint8_t *buf);
65 extern void tag_tracking_compute_speed(void);
66 
67 #endif // TAG_TRACKING_H
68 
Paparazzi floating point algebra.
Paparazzi floating point math for geodetic calculations.
vector in North East Down coordinates Units: meters
float kpz
vertical tracking command gain
Definition: tag_tracking.h:55
struct FloatVect3 pos
estimated position
Definition: tag_tracking.h:48
uint8_t status
tracking status flag
Definition: tag_tracking.h:50
void tag_tracking_propagate_start(void)
Definition: tag_tracking.c:349
void tag_tracking_parse_target_pos(uint8_t *buf)
Definition: tag_tracking.c:236
float predict_time
prediction time for WP tag
Definition: tag_tracking.h:52
struct NedCoor_f speed_cmd
speed command to track the tag position
Definition: tag_tracking.h:53
void tag_tracking_propagate(void)
Definition: tag_tracking.c:308
void tag_tracking_init(void)
Definition: tag_tracking.c:276
uint8_t motion_type
type of tag motion
Definition: tag_tracking.h:51
void tag_tracking_compute_speed(void)
Control function.
Definition: tag_tracking.c:393
struct FloatVect3 speed
estimated speed
Definition: tag_tracking.h:49
void tag_tracking_report(void)
Definition: tag_tracking.c:357
float kp
horizontal tracking command gain
Definition: tag_tracking.h:54
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98