Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aoa_pwm.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2015 Jean-François Erdelyi, Gautier Hattenberger
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 
34 #ifndef AOA_PWM_H
35 #define AOA_PWM_H
36 
37 #include "std.h"
38 
39 struct Aoa_Pwm {
41  float angle;
42  float offset;
43  float sens;
44 
49  float filter;
50 };
51 
52 extern struct Aoa_Pwm aoa_pwm; // angle of attack sensor
53 extern struct Aoa_Pwm ssa_pwm; // sideslip angle sensor
54 
57 enum Aoa_Type {
60 };
61 extern enum Aoa_Type aoa_send_type;
62 
63 extern void aoa_pwm_init(void);
64 extern void aoa_pwm_update(void);
65 
66 #endif /* AOA_PWM_H */
67 
void aoa_pwm_update(void)
Definition: aoa_pwm.c:166
Aoa_Type
Selection of sensor type to be send over telemetry.
Definition: aoa_pwm.h:57
enum Aoa_Type aoa_send_type
Definition: aoa_pwm.c:122
float angle
Angle of attack in radians.
Definition: aoa_pwm.h:41
unsigned long uint32_t
Definition: types.h:18
uint32_t raw
raw PWM value
Definition: aoa_pwm.h:40
float sens
sensitiviy, i.e. scale to conver raw to angle
Definition: aoa_pwm.h:43
void aoa_pwm_init(void)
Definition: aoa_pwm.c:144
struct Aoa_Pwm aoa_pwm
Definition: aoa_pwm.c:91
float filter
Filtering value [0-1] 0: no filtering 1: output is a constant value.
Definition: aoa_pwm.h:49
struct Aoa_Pwm ssa_pwm
Definition: aoa_pwm.c:118
float offset
Angle of attack offset in radians.
Definition: aoa_pwm.h:42