31#include "generated/modules.h"
33#ifndef COMMAND_THRUST_X
34#error "Quadplanes require a forward thrust actuator"
37#ifndef GUIDANCE_INDI_PUSHER_INDEX
38#error "You need to define GUIDANCE_INDI_PUSHER_INDEX"
41#ifndef GUIDANCE_INDI_THRUST_Z_EFF
42#error "You need to define GUIDANCE_INDI_THRUST_Z_EFF"
47#ifndef GUIDANCE_INDI_BODYZ_FILTER_CUTOFF
48#ifdef GUIDANCE_INDI_FILTER_CUTOFF
49#define GUIDANCE_INDI_BODYZ_FILTER_CUTOFF GUIDANCE_INDI_FILTER_CUTOFF
51#define GUIDANCE_INDI_BODYZ_FILTER_CUTOFF 3.0
95#ifndef GUIDANCE_INDI_PITCH_EFF_SCALING
96#define GUIDANCE_INDI_PITCH_EFF_SCALING 1.0
113 Gmat[0][2] = cphi*stheta;
115 Gmat[2][2] = cphi*ctheta;
119 Gmat[2][3] = -stheta;
Core autopilot interface common to all firmwares.
#define ACCEL_FLOAT_OF_BFP(_ai)
static struct Int32Vect3 * stateGetAccelBody_i(void)
Get acceleration in Body coordinates (int).
Butterworth2LowPass roll_filt
float guidance_indi_max_bank
Butterworth2LowPass pitch_filt
float guidance_indi_pitch_pref_deg
float WEAK guidance_indi_get_liftd(float airspeed, float theta)
Get the derivative of lift w.r.t.
Butterworth2LowPass yaw_filt
A guidance mode based on Incremental Nonlinear Dynamic Inversion Come to ICRA2016 to learn more!
float guidance_indi_thrust_z_eff
void guidance_indi_quadplane_propagate_filters(void)
Low pass the accelerometer measurements to remove noise from vibrations.
#define GUIDANCE_INDI_BODYZ_FILTER_CUTOFF
void guidance_indi_quadplane_init(void)
Call upon entering indi guidance.
bool autopilot_in_flight_end_detection(bool motors_on UNUSED)
Quadplanes can still be in-flight with COMMAND_THRUST==0 and can even soar not descending in updrafts...
#define GUIDANCE_INDI_PITCH_EFF_SCALING
void guidance_indi_calcg_wing(float Gmat[GUIDANCE_INDI_HYBRID_V][GUIDANCE_INDI_HYBRID_U], struct FloatVect3 a_diff, float body_v[GUIDANCE_INDI_HYBRID_V])
Perform WLS.
void WEAK guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle)
Butterworth2LowPass accel_bodyz_filt
#define GUIDANCE_INDI_MAX_PITCH
#define GUIDANCE_INDI_MIN_PITCH
Simple first order low pass filter with bilinear transform.
static void init_butterworth_2_low_pass(Butterworth2LowPass *filter, float tau, float sample_time, float value)
Init a second order Butterworth filter.
static float update_butterworth_2_low_pass(Butterworth2LowPass *filter, float value)
Update second order Butterworth low pass filter state with a new value.
Second order low pass filter structure.
struct Stabilization stabilization
int32_t cmd[COMMANDS_NB]
output command vector, range from [-MAX_PPRZ:MAX_PPRZ] (store for messages)
float g1g2[INDI_OUTPUTS][INDI_NUM_ACT]
API to get/set the generic vehicle states.