Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
Go to the source code of this file.
Data Structures | |
struct | chirp_t |
Initialize with chirp_init. More... | |
Functions | |
void | chirp_init (struct chirp_t *chirp, float f0_hz, float f1_hz, float length_s, float current_time_s, bool exponential_chirp, bool fade_in) |
Allocate and initialize a new chirp struct. More... | |
void | chirp_reset (struct chirp_t *chirp, float current_time_s) |
Reset the time of the chirp. More... | |
bool | chirp_is_running (struct chirp_t *chirp, float current_time_s) |
Return if the current_time is within the chirp manoeuvre. More... | |
float | chirp_update (struct chirp_t *chirp, float current_time_s) |
Calculate the value at current_time_s and update the struct with current frequency and value. More... | |
struct chirp_t |
Initialize with chirp_init.
Definition at line 59 of file pprz_chirp.h.
void chirp_init | ( | struct chirp_t * | chirp, |
float | f0_hz, | ||
float | f1_hz, | ||
float | length_s, | ||
float | current_time_s, | ||
bool | exponential_chirp, | ||
bool | fade_in | ||
) |
Allocate and initialize a new chirp struct.
set start_time to the current time
f0_hz | Minimum frequency of the chirp in Hz |
f1_hz | Maximum frequency of the chirp in Hz |
length_s | Time interval in s (starting from start_time_s) in which the chirp should be carried out, excluding fade-in time |
current_time_s | Current time in s, starting point of the chirp |
exponential_chirp | If true, use exponential-time chirp, otherwise use linear-time chirp (see wikipedia) |
fade_in | If true, begin the chirp with 2 wavelengths of the lowest frequency, with increasing amplitude |
Definition at line 34 of file pprz_chirp.c.
References chirp, chirp_t::current_frequency_hz, chirp_t::current_value, chirp_t::exponential_chirp, chirp_t::f0_hz, chirp_t::f1_hz, chirp_t::fade_in, chirp_t::length_s, chirp_t::percentage_done, chirp_t::start_time_s, and chirp_t::total_length_s.
Referenced by sys_id_chirp_activate_handler(), and sys_id_chirp_init().
bool chirp_is_running | ( | struct chirp_t * | chirp, |
float | current_time_s | ||
) |
Return if the current_time is within the chirp manoeuvre.
Definition at line 65 of file pprz_chirp.c.
References chirp, chirp_t::start_time_s, and chirp_t::total_length_s.
Referenced by chirp_update(), and sys_id_chirp_run().
void chirp_reset | ( | struct chirp_t * | chirp, |
float | current_time_s | ||
) |
Reset the time of the chirp.
chirp | The chirp struct pointer to reset |
current_time_s | The time to set the chirp start at |
Definition at line 56 of file pprz_chirp.c.
References chirp, chirp_t::current_frequency_hz, chirp_t::current_time_s, chirp_t::current_value, chirp_t::percentage_done, and chirp_t::start_time_s.
Referenced by start_chirp(), and stop_chirp().
float chirp_update | ( | struct chirp_t * | chirp, |
float | current_time_s | ||
) |
Calculate the value at current_time_s and update the struct with current frequency and value.
Definition at line 71 of file pprz_chirp.c.
References chirp, CHIRP_C1, CHIRP_C2, chirp_is_running(), chirp_t::current_frequency_hz, chirp_t::current_time_s, chirp_t::current_value, chirp_t::exponential_chirp, chirp_t::f0_hz, chirp_t::f1_hz, chirp_t::fade_in, K, chirp_t::length_s, Min, chirp_t::percentage_done, chirp_t::start_time_s, and chirp_t::total_length_s.
Referenced by sys_id_chirp_run().