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
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
unsigned short uint16_t
Definition: types.h:16
uint32_t last_theta[DCF_MAX_NEIGHBORS]
Definition: dcf.h:50
int16_t error_sigma[DCF_MAX_NEIGHBORS]
Definition: dcf.h:49
void parseRegTable(uint8_t *buf)
Definition: dcf.c:140
Definition: dcf.h:47
bool distributed_circular(uint8_t wp)
Definition: dcf.c:75
void send_theta_to_nei(void)
Definition: dcf.c:125
int16_t tableNei[DCF_MAX_NEIGHBORS][4]
Definition: dcf.h:48
float radius
Definition: dcf.h:39
#define DCF_MAX_NEIGHBORS
Definition: dcf.h:34
struct dcf_con dcf_control
Definition: dcf.c:58
Definition: dcf.h:37
unsigned long uint32_t
Definition: types.h:18
signed short int16_t
Definition: types.h:17
struct dcf_tab dcf_tables
Definition: dcf.c:59
uint16_t timeout
Definition: dcf.h:40
unsigned char uint8_t
Definition: types.h:14
float k
Definition: dcf.h:38
void dcf_init(void)
Definition: dcf.c:63
uint16_t broadtime
Definition: dcf.h:42
float theta
Definition: dcf.h:41
void parseThetaTable(uint8_t *buf)
Definition: dcf.c:169