Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
pprz_wave.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Alessandro Collicelli
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  */
27 #ifndef SYS_ID_WAVE_H
28 #define SYS_ID_WAVE_H
29 
30 #include "std.h"
31 #include "math.h"
32 
33 
34 struct wave_t {
35  float start_time_s;
37  float lag_rad;
38  float frequency_hz;
40  bool is_running;
41 };
42 
43 
44 void wave_init(struct wave_t *wave, float start_time_s, float current_time_s, float frequency_hz, float lag_rad);
45 void wave_reset(struct wave_t *wave, float current_time_s);
46 bool wave_is_running(struct wave_t *wave);
47 float wave_update(struct wave_t *wave, float current_time_s);
48 
49 
50 #endif //THESIS_PPRZ_WAVE_H
void wave_reset(struct wave_t *wave, float current_time_s)
Definition: pprz_wave.c:45
float current_time_s
Definition: pprz_wave.h:36
float current_value
Definition: pprz_wave.h:39
float wave_update(struct wave_t *wave, float current_time_s)
Definition: pprz_wave.c:57
float frequency_hz
Definition: pprz_wave.h:38
float lag_rad
Definition: pprz_wave.h:37
float start_time_s
Definition: pprz_wave.h:35
bool is_running
Definition: pprz_wave.h:40
bool wave_is_running(struct wave_t *wave)
Definition: pprz_wave.c:52
void wave_init(struct wave_t *wave, float start_time_s, float current_time_s, float frequency_hz, float lag_rad)
Definition: pprz_wave.c:33