Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ctc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Hector Garcia de Marina
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, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
28 #ifndef CTC_H
29 #define CTC_H
30 
31 #include "std.h"
32 
33 typedef struct {
34  float k1;
35  float k2;
36  float alpha;
38  float p_centroid_x;
39  float p_centroid_y;
40  float v_centroid_x;
41  float v_centroid_y;
42  float target_px;
43  float target_py;
44  float target_vx;
45  float target_vy;
46  float vx;
47  float vy;
48  float px;
49  float py;
50  float ref_px;
51  float ref_py;
52  float omega;
54 } ctc_con;
55 
56 extern ctc_con ctc_control;
57 extern int16_t tableNei[][6];
58 extern float ctc_error_to_target;
59 
60 extern void ctc_init(void);
61 extern bool collective_tracking_vehicle(void);
63 extern bool collective_tracking_point(float x, float y);
64 extern void collective_tracking_control(void);
65 extern void ctc_send_info_to_nei(void);
66 
67 extern void parse_ctc_RegTable(uint8_t *buf);
68 extern void parse_ctc_CleanTable(uint8_t *buf);
69 extern void parse_ctc_NeiInfoTable(uint8_t *buf);
70 extern void parse_ctc_TargetInfo(uint8_t *buf);
71 
72 #endif // CTC_H
tableNei
int16_t tableNei[][6]
Definition: ctc.c:81
collective_tracking_waypoint
bool collective_tracking_waypoint(uint8_t wp)
Definition: ctc.c:121
ctc_control
ctc_con ctc_control
Definition: ctc.c:77
ctc_con
Definition: ctc.h:33
uint16_t
unsigned short uint16_t
Definition: types.h:16
ctc_con::target_px
float target_px
Definition: ctc.h:42
ctc_con::k1
float k1
Definition: ctc.h:34
ctc_con::px
float px
Definition: ctc.h:48
ctc_con::k2
float k2
Definition: ctc.h:35
ctc_con::target_vx
float target_vx
Definition: ctc.h:44
ctc_con::timeout
uint16_t timeout
Definition: ctc.h:37
ctc_init
void ctc_init(void)
Definition: ctc.c:97
ctc_con::p_centroid_y
float p_centroid_y
Definition: ctc.h:39
collective_tracking_vehicle
bool collective_tracking_vehicle(void)
Definition: ctc.c:109
parse_ctc_CleanTable
void parse_ctc_CleanTable(uint8_t *buf)
std.h
collective_tracking_point
bool collective_tracking_point(float x, float y)
Definition: ctc.c:133
ctc_con::omega
float omega
Definition: ctc.h:52
collective_tracking_control
void collective_tracking_control(void)
Definition: ctc.c:145
ctc_send_info_to_nei
void ctc_send_info_to_nei(void)
ctc_con::py
float py
Definition: ctc.h:49
int16_t
signed short int16_t
Definition: types.h:17
uint8_t
unsigned char uint8_t
Definition: types.h:14
ctc_error_to_target
float ctc_error_to_target
ctc_con::ref_px
float ref_px
Definition: ctc.h:50
ctc_con::vy
float vy
Definition: ctc.h:47
ctc_con::time_broad
uint16_t time_broad
Definition: ctc.h:53
parse_ctc_RegTable
void parse_ctc_RegTable(uint8_t *buf)
ctc_con::v_centroid_y
float v_centroid_y
Definition: ctc.h:41
ctc_con::target_py
float target_py
Definition: ctc.h:43
parse_ctc_NeiInfoTable
void parse_ctc_NeiInfoTable(uint8_t *buf)
ctc_con::p_centroid_x
float p_centroid_x
Definition: ctc.h:38
ctc_con::v_centroid_x
float v_centroid_x
Definition: ctc.h:40
ctc_con::vx
float vx
Definition: ctc.h:46
ctc_con::alpha
float alpha
Definition: ctc.h:36
parse_ctc_TargetInfo
void parse_ctc_TargetInfo(uint8_t *buf)
ctc_con::ref_py
float ref_py
Definition: ctc.h:51
ctc_con::target_vy
float target_vy
Definition: ctc.h:45