Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
float py
Definition: ctc.h:49
unsigned short uint16_t
Definition: types.h:16
float k2
Definition: ctc.h:35
float k1
Definition: ctc.h:34
float omega
Definition: ctc.h:52
float vy
Definition: ctc.h:47
float v_centroid_y
Definition: ctc.h:41
uint16_t timeout
Definition: ctc.h:37
float target_px
Definition: ctc.h:42
bool collective_tracking_waypoint(uint8_t wp)
Definition: ctc.c:121
void parse_ctc_RegTable(uint8_t *buf)
void ctc_send_info_to_nei(void)
float ref_py
Definition: ctc.h:51
Definition: ctc.h:33
float p_centroid_y
Definition: ctc.h:39
float target_vy
Definition: ctc.h:45
float p_centroid_x
Definition: ctc.h:38
float ctc_error_to_target
bool collective_tracking_point(float x, float y)
Definition: ctc.c:133
bool collective_tracking_vehicle(void)
Definition: ctc.c:109
signed short int16_t
Definition: types.h:17
void collective_tracking_control(void)
Definition: ctc.c:145
int16_t tableNei[][6]
Definition: ctc.c:81
float target_py
Definition: ctc.h:43
float target_vx
Definition: ctc.h:44
unsigned char uint8_t
Definition: types.h:14
float vx
Definition: ctc.h:46
ctc_con ctc_control
Definition: ctc.c:77
uint16_t time_broad
Definition: ctc.h:53
void parse_ctc_CleanTable(uint8_t *buf)
float v_centroid_x
Definition: ctc.h:40
float px
Definition: ctc.h:48
float alpha
Definition: ctc.h:36
void parse_ctc_NeiInfoTable(uint8_t *buf)
float ref_px
Definition: ctc.h:50
void ctc_init(void)
Definition: ctc.c:97
void parse_ctc_TargetInfo(uint8_t *buf)