Paparazzi UAS  v7.0_unstable
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
void collective_tracking_control(void)
Definition: ctc.c:145
int16_t tableNei[][6]
Definition: ctc.c:81
float v_centroid_x
Definition: ctc.h:40
float ref_px
Definition: ctc.h:50
float target_py
Definition: ctc.h:43
void ctc_init(void)
Definition: ctc.c:97
bool collective_tracking_vehicle(void)
Definition: ctc.c:109
bool collective_tracking_waypoint(uint8_t wp)
Definition: ctc.c:121
float p_centroid_x
Definition: ctc.h:38
float v_centroid_y
Definition: ctc.h:41
float target_vx
Definition: ctc.h:44
void parse_ctc_NeiInfoTable(uint8_t *buf)
ctc_con ctc_control
Definition: ctc.c:77
void parse_ctc_TargetInfo(uint8_t *buf)
float k1
Definition: ctc.h:34
float vx
Definition: ctc.h:46
float k2
Definition: ctc.h:35
float omega
Definition: ctc.h:52
float alpha
Definition: ctc.h:36
void ctc_send_info_to_nei(void)
uint16_t timeout
Definition: ctc.h:37
void parse_ctc_RegTable(uint8_t *buf)
float ref_py
Definition: ctc.h:51
uint16_t time_broad
Definition: ctc.h:53
float p_centroid_y
Definition: ctc.h:39
float target_vy
Definition: ctc.h:45
float py
Definition: ctc.h:49
float px
Definition: ctc.h:48
float target_px
Definition: ctc.h:42
float ctc_error_to_target
void parse_ctc_CleanTable(uint8_t *buf)
bool collective_tracking_point(float x, float y)
Definition: ctc.c:133
float vy
Definition: ctc.h:47
Definition: ctc.h:33
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
short int16_t
Typedef defining 16 bit short type.
Definition: vl53l1_types.h:93
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98