Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
dcf.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, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
27 #ifndef DCF_H
28 #define DCF_H
29 
30 #include "std.h"
31 
33 #ifndef DCF_MAX_NEIGHBORS
34 #define DCF_MAX_NEIGHBORS 4
35 #endif
36 
37 struct dcf_con {
38  float k;
39  float radius;
41  float theta;
43 };
44 
45 extern struct dcf_con dcf_control;
46 
47 struct dcf_tab {
51 };
52 
53 extern struct dcf_tab dcf_tables;
54 
55 extern void dcf_init(void);
56 extern bool distributed_circular(uint8_t wp);
57 extern void send_theta_to_nei(void);
58 
59 extern void parseRegTable(uint8_t *buf);
60 extern void parseThetaTable(uint8_t *buf);
61 
62 #endif // DCF_H
uint32_t last_theta[DCF_MAX_NEIGHBORS]
Definition: dcf.h:50
void send_theta_to_nei(void)
Definition: dcf.c:125
float theta
Definition: dcf.h:41
int16_t error_sigma[DCF_MAX_NEIGHBORS]
Definition: dcf.h:49
#define DCF_MAX_NEIGHBORS
Definition: dcf.h:34
void dcf_init(void)
Definition: dcf.c:63
void parseThetaTable(uint8_t *buf)
Definition: dcf.c:169
float radius
Definition: dcf.h:39
uint16_t broadtime
Definition: dcf.h:42
struct dcf_tab dcf_tables
Definition: dcf.c:59
uint16_t timeout
Definition: dcf.h:40
int16_t tableNei[DCF_MAX_NEIGHBORS][4]
Definition: dcf.h:48
void parseRegTable(uint8_t *buf)
Definition: dcf.c:140
struct dcf_con dcf_control
Definition: dcf.c:58
float k
Definition: dcf.h:38
bool distributed_circular(uint8_t wp)
Definition: dcf.c:75
Definition: dcf.h:37
Definition: dcf.h:47
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
Definition: vl53l1_types.h:78
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