Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
airspeed_consistency.c File Reference
#include <stdio.h>
#include "modules/checks/airspeed_consistency.h"
#include "navigation.h"
#include "state.h"
#include "filters/low_pass_filter.h"
#include "generated/modules.h"
#include "modules/core/abi.h"
#include "modules/datalink/telemetry.h"
#include "modules/nav/nav_rotorcraft_base.h"
+ Include dependency graph for airspeed_consistency.c:

Go to the source code of this file.

Macros

#define AIRSPEED_CONSISTENCY_MIN_SAMPLES   20
 
#define AIRSPEED_CONSISTENCY_INTERVAL   10
 

Functions

static void save_speeds (void)
 
static void reset_speeds (void)
 
static enum CircFitStatus_t get_circle_from_speeds (struct circle_t *c, float *N, float *E)
 
void airspeed_consistency_init (void)
 
void airspeed_consistency_periodic (void)
 
void airspeed_consistency_reset (bool reset)
 

Variables

bool asc_reset = false
 
static struct asc_t asc = {0}
 
static Butterworth2LowPass tas_filt
 

Detailed Description

Author
Noah Wechtler noahw.nosp@m.echt.nosp@m.ler@t.nosp@m.udel.nosp@m.ft.nl Simple consistency check for airspeed measurements while flying circles

Definition in file airspeed_consistency.c.

Macro Definition Documentation

◆ AIRSPEED_CONSISTENCY_INTERVAL

#define AIRSPEED_CONSISTENCY_INTERVAL   10

Definition at line 42 of file airspeed_consistency.c.

◆ AIRSPEED_CONSISTENCY_MIN_SAMPLES

#define AIRSPEED_CONSISTENCY_MIN_SAMPLES   20

Definition at line 38 of file airspeed_consistency.c.

Function Documentation

◆ airspeed_consistency_init()

void airspeed_consistency_init ( void  )

Definition at line 62 of file airspeed_consistency.c.

References foo, init_butterworth_2_low_pass(), NAVIGATION_FREQUENCY, reset_speeds(), and tas_filt.

+ Here is the call graph for this function:

◆ airspeed_consistency_periodic()

◆ airspeed_consistency_reset()

void airspeed_consistency_reset ( bool  reset)

Definition at line 139 of file airspeed_consistency.c.

References reset_speeds().

+ Here is the call graph for this function:

◆ get_circle_from_speeds()

static enum CircFitStatus_t get_circle_from_speeds ( struct circle_t c,
float N,
float E 
)
static

Definition at line 133 of file airspeed_consistency.c.

References AIRSPEED_CONSISTENCY_BUFFER_SIZE, asc, asc_t::filled, foo, asc_t::i, N, pprz_circfit_wei_float(), and status.

+ Here is the call graph for this function:

◆ reset_speeds()

◆ save_speeds()

Variable Documentation

◆ asc

struct asc_t asc = {0}
static

◆ asc_reset

bool asc_reset = false

Definition at line 53 of file airspeed_consistency.c.

◆ tas_filt

Butterworth2LowPass tas_filt
static

Definition at line 60 of file airspeed_consistency.c.

Referenced by airspeed_consistency_init(), and save_speeds().