29 #if USE_GROUND_DETECT_INDI_THRUST
33 #if USE_GROUND_DETECT_AGL_DIST
35 #define GROUND_DETECT_SENSOR_AGL_MIN_VALUE 0.1
38 #include "pprzlink/messages.h"
44 #ifndef GROUND_DETECT_SENSOR_COUNTER_TRIGGER
45 #define GROUND_DETECT_SENSOR_COUNTER_TRIGGER 10
48 #ifndef GROUND_DETECT_SENSOR_SPECIFIC_THRUST_THRESHOLD
49 #define GROUND_DETECT_SENSOR_SPECIFIC_THRUST_THRESHOLD -5.0
64 bool ground_detect_method =
false;
65 #if USE_GROUND_DETECT_INDI_THRUST
66 ground_detect_method =
true;
67 static int32_t counter_thrust = 0;
70 float specific_thrust = 0.0;
72 for (i = 0; i < INDI_NUM_ACT; i++) {
86 #ifdef DEBUG_GROUND_DETECT
89 payload[0] = specific_thrust;
96 #if USE_GROUND_DETECT_AGL_DIST
97 ground_detect_method =
true;
98 static int32_t counter_agl_dist = 0;
100 counter_agl_dist += 1;
102 counter_agl_dist = 0;
110 if (!ground_detect_method) {
float agl_dist_value_filtered
Bind to agl ABI message and provide a filtered value to be used in flight plans.
Common code for AP and FBW telemetry.
#define GROUND_DETECT_SENSOR_COUNTER_TRIGGER
void ground_detect_sensor_init(void)
void ground_detect_sensor_periodic(void)
#define GROUND_DETECT_SENSOR_SPECIFIC_THRUST_THRESHOLD
static struct NedCoor_f * stateGetAccelNed_f(void)
Get acceleration in NED coordinates (float).
bool act_is_servo[INDI_NUM_ACT]
float g1g2[INDI_OUTPUTS][INDI_NUM_ACT]
float actuator_state_filt_vect[INDI_NUM_ACT]
API to get/set the generic vehicle states.
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.