Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
transport_delay_types.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 Justin Dubois <j.p.g.dubois@student.tudelft.nl>
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 */
24#ifndef TRANSPORT_DELAY_TYPES_H
25#define TRANSPORT_DELAY_TYPES_H
26
27#include "std.h"
28#include "paparazzi.h"
30
39 const uint8_t delay_samples[restrict n], float initial_value[restrict n])
40{
41 for (uint8_t i = 0; i < n; i++) {
42 init_transport_delay(&td_array[i], delay_samples[i], initial_value[i]);
43 }
44}
45
53 const float input_array[restrict n])
54{
55 for (uint8_t i = 0; i < n; i++) {
57 }
58}
59
67 const float initial_value[restrict n])
68{
69 for (uint8_t i = 0; i < n; i++) {
71 }
72}
73
80static inline void get_transport_delay_array(const uint8_t n, const struct TransportDelay td_array[restrict n],
81 float output_array[restrict n])
82{
83 for (uint8_t i = 0; i < n; i++) {
85 }
86}
87
88#endif // TRANSPORT_DELAY_TYPES_H
uint16_t foo
Definition main_demo5.c:58
Transport delay filter implementation.
static float get_transport_delay(const struct TransportDelay *td)
Get the current output value from the transport delay buffer without updating it.
static void init_transport_delay(struct TransportDelay *td, uint8_t delay_samples, const float initial_value)
Initialize a transport delay buffer.
static void reset_transport_delay(struct TransportDelay *td, const float initial_value)
Reset the transport delay buffer to a specific initial value.
static float update_transport_delay(struct TransportDelay *td, const float input)
Propagate a new input value through the transport delay buffer.
static void reset_transport_delay_array(const uint8_t n, struct TransportDelay td_array[restrict n], const float initial_value[restrict n])
Reset an array of TransportDelay structures to specific initial values.
static void update_transport_delay_array(uint8_t n, struct TransportDelay td_array[restrict n], const float input_array[restrict n])
Update an array of TransportDelay structures with input values.
static void get_transport_delay_array(const uint8_t n, const struct TransportDelay td_array[restrict n], float output_array[restrict n])
Get output values from an array of TransportDelay structures.
static void init_transport_delay_array(uint8_t n, struct TransportDelay td_array[restrict n], const uint8_t delay_samples[restrict n], float initial_value[restrict n])
Initialize an array of TransportDelay structures.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.