Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ground_detect.c File Reference

Ground detection module. More...

#include "ground_detect.h"
#include "filters/low_pass_filter.h"
#include "firmwares/rotorcraft/autopilot_firmware.h"
#include "state.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
+ Include dependency graph for ground_detect.c:

Go to the source code of this file.

Macros

#define GROUND_DETECT_COUNTER_TRIGGER   5
 
#define GROUND_DETECT_FILT_FREQ   5.0
 
#define DEBUG_GROUND_DETECT   TRUE
 

Functions

void ground_detect_init ()
 
bool ground_detect (void)
 
void ground_detect_periodic ()
 
void ground_detect_filter_accel (void)
 Filter the vertical acceleration with a low cutoff frequency. More...
 

Variables

Butterworth2LowPass accel_filter
 
bool disarm_on_not_in_flight = false
 
int32_t counter = 0
 
bool ground_detected = false
 

Detailed Description

Ground detection module.

Definition in file ground_detect.c.

Macro Definition Documentation

◆ DEBUG_GROUND_DETECT

#define DEBUG_GROUND_DETECT   TRUE

Definition at line 58 of file ground_detect.c.

◆ GROUND_DETECT_COUNTER_TRIGGER

#define GROUND_DETECT_COUNTER_TRIGGER   5

Definition at line 46 of file ground_detect.c.

◆ GROUND_DETECT_FILT_FREQ

#define GROUND_DETECT_FILT_FREQ   5.0

Definition at line 49 of file ground_detect.c.

Function Documentation

◆ ground_detect()

bool ground_detect ( void  )

Definition at line 67 of file ground_detect.c.

References ground_detected.

◆ ground_detect_filter_accel()

void ground_detect_filter_accel ( void  )

Filter the vertical acceleration with a low cutoff frequency.

Definition at line 150 of file ground_detect.c.

References accel_filter, stateGetAccelNed_f(), update_butterworth_2_low_pass(), and NedCoor_f::z.

+ Here is the call graph for this function:

◆ ground_detect_init()

void ground_detect_init ( void  )

Definition at line 60 of file ground_detect.c.

References accel_filter, GROUND_DETECT_FILT_FREQ, and init_butterworth_2_low_pass().

+ Here is the call graph for this function:

◆ ground_detect_periodic()

Variable Documentation

◆ accel_filter

◆ counter

int32_t counter = 0

Definition at line 55 of file ground_detect.c.

Referenced by ground_detect_periodic().

◆ disarm_on_not_in_flight

bool disarm_on_not_in_flight = false

Definition at line 53 of file ground_detect.c.

Referenced by ground_detect_periodic().

◆ ground_detected

bool ground_detected = false

Definition at line 56 of file ground_detect.c.

Referenced by ground_detect(), and ground_detect_periodic().