Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 
Aoa_Pwm::offset
float offset
Angle of attack offset in radians.
Definition: aoa_pwm.h:42
aoa_send_type
enum Aoa_Type aoa_send_type
Definition: aoa_pwm.c:123
Aoa_Pwm
Definition: aoa_pwm.h:39
uint32_t
unsigned long uint32_t
Definition: types.h:18
Aoa_Pwm::angle
float angle
Angle of attack in radians.
Definition: aoa_pwm.h:41
Aoa_Type
Aoa_Type
Selection of sensor type to be send over telemetry.
Definition: aoa_pwm.h:57
std.h
Aoa_Pwm::filter
float filter
Filtering value [0-1] 0: no filtering 1: output is a constant value.
Definition: aoa_pwm.h:49
ssa_pwm
struct Aoa_Pwm ssa_pwm
Definition: aoa_pwm.c:119
Aoa_Pwm::raw
uint32_t raw
raw PWM value
Definition: aoa_pwm.h:40
Aoa_Pwm::sens
float sens
sensitiviy, i.e. scale to conver raw to angle
Definition: aoa_pwm.h:43
aoa_pwm_update
void aoa_pwm_update(void)
Definition: aoa_pwm.c:167
aoa_pwm_init
void aoa_pwm_init(void)
Definition: aoa_pwm.c:145
SEND_TYPE_SIDESLIP
@ SEND_TYPE_SIDESLIP
Definition: aoa_pwm.h:59
aoa_pwm
struct Aoa_Pwm aoa_pwm
Definition: aoa_pwm.c:92
SEND_TYPE_AOA
@ SEND_TYPE_AOA
Definition: aoa_pwm.h:58