Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
sys_id_chirp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Joost Meulenbeld
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  */
38 #ifndef SYS_ID_CHIRP_H
39 #define SYS_ID_CHIRP_H
40 
41 #include "paparazzi.h"
42 
43 
44 extern uint8_t chirp_active;
45 extern pprz_t chirp_amplitude;
46 extern float chirp_noise_stdv_onaxis_ratio; // On-axis noise is amplitude times this value
47 extern float chirp_noise_stdv_offaxis; // Off-axis noise (the axes that the chirp is not applied to)
48 
49 extern float chirp_fstart_hz;
50 extern float chirp_fstop_hz;
51 extern float chirp_length_s;
52 
53 // Index of chirp axis in ACTIVE_CHIRP_AXES
54 extern uint8_t chirp_axis;
55 
56 extern uint8_t chirp_fade_in;
58 
59 
60 extern void sys_id_chirp_init(void);
61 
62 // If chirp is running, update its values
63 extern void sys_id_chirp_run(void);
64 
65 // Handlers for changing gcs variables
66 extern void sys_id_chirp_activate_handler(uint8_t activate); // Activate the chirp
67 extern void sys_id_chirp_axis_handler(uint8_t axis); // Check if new axis is valid
68 extern void sys_id_chirp_fstart_handler(float fstart); // Check if fstart is lower than current fend
69 extern void sys_id_chirp_fstop_handler(float fstop); // Check if fend is higher than current fstart
70 extern void sys_id_chirp_fade_in_activate_handler(uint8_t fade_in); // Fade in feature switch
71 extern void sys_id_chirp_exponential_activate_handler(uint8_t exponential); // Exponential chirp feature switch
72 extern uint8_t sys_id_chirp_running(void); // Check if the chirp is running or not
73 
74 // Add the current chirp values to the in_cmd values if motors_on is true
75 extern void sys_id_chirp_add_values(bool motors_on, bool override_on, pprz_t in_cmd[]);
76 
77 #endif // SYS_ID_CHIRP_H
int16_t pprz_t
Definition: paparazzi.h:6
void sys_id_chirp_fstart_handler(float fstart)
Definition: sys_id_chirp.c:168
float chirp_noise_stdv_onaxis_ratio
Definition: sys_id_chirp.c:68
float chirp_length_s
Definition: sys_id_chirp.c:72
void sys_id_chirp_activate_handler(uint8_t activate)
Definition: sys_id_chirp.c:137
void sys_id_chirp_exponential_activate_handler(uint8_t exponential)
Definition: sys_id_chirp.c:187
uint8_t chirp_active
Definition: sys_id_chirp.c:65
void sys_id_chirp_run(void)
Definition: sys_id_chirp.c:213
float chirp_noise_stdv_offaxis
Definition: sys_id_chirp.c:69
float chirp_fstop_hz
Definition: sys_id_chirp.c:71
pprz_t chirp_amplitude
Definition: sys_id_chirp.c:67
float chirp_fstart_hz
Definition: sys_id_chirp.c:70
uint8_t chirp_axis
Definition: oneloop_andi.c:428
void sys_id_chirp_axis_handler(uint8_t axis)
Definition: sys_id_chirp.c:161
uint8_t chirp_exponential
Definition: sys_id_chirp.c:75
uint8_t chirp_fade_in
Definition: sys_id_chirp.c:74
uint8_t sys_id_chirp_running(void)
Definition: sys_id_chirp.c:156
void sys_id_chirp_add_values(bool motors_on, bool override_on, pprz_t in_cmd[])
void sys_id_chirp_fstop_handler(float fstop)
Definition: sys_id_chirp.c:175
void sys_id_chirp_init(void)
Definition: sys_id_chirp.c:192
void sys_id_chirp_fade_in_activate_handler(uint8_t fade_in)
Definition: sys_id_chirp.c:182
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98