26 #ifndef ONELOOP_ANDI_H
27 #define ONELOOP_ANDI_H
32 #include "generated/airframe.h"
37 #define ANDI_NUM_ACT COMMANDS_NB_REAL
40 #ifndef ANDI_NUM_VIRTUAL_ACT
41 #define ANDI_NUM_VIRTUAL_ACT COMMANDS_NB_VIRTUAL
45 #if ANDI_NUM_VIRTUAL_ACT < 2
46 #error "You must specify the number of virtual actuators to be at least 2"
47 #define ANDI_NUM_VIRTUAL_ACT 2
50 #define ANDI_NUM_ACT_TOT (ANDI_NUM_ACT + ANDI_NUM_VIRTUAL_ACT)
53 #error "You must specify the number of controlled axis (outputs)"
54 #define ANDI_OUTPUTS 6
56 #define ANDI_G_SCALING 1000.0f
221 extern void oneloop_andi_RM(
bool half_loop,
struct FloatVect3 PSA_des,
int rm_order_h,
int rm_order_v,
bool in_flight_oneloop);
Simple first order low pass filter with bilinear transform.
Fourth order Butterworth low pass filter.
Second order low pass filter structure.
void oneloop_andi_read_rc(bool in_flight, bool in_carefree, bool coordinated_turn)
struct PolePlacement p_pos_e
struct OneloopGuidanceState gui_state
struct OneloopStabilizationState sta_state
struct PolePlacement p_head_rm
void oneloop_andi_RM(bool half_loop, struct FloatVect3 PSA_des, int rm_order_h, int rm_order_v, bool in_flight_oneloop)
Function to generate the reference signals for the oneloop controller.
void oneloop_andi_enter(bool half_loop_sp, int ctrl_type)
Function that resets important values upon engaging Oneloop ANDI.
Butterworth2LowPass feedback_filt
struct Gains3rdOrder k_att_rm
struct guidance_indi_hybrid_params gih_params
struct FloatEulers eulers_zxy_des
struct PolePlacement p_att_rm
float g1g2_1l[ANDI_OUTPUTS][ANDI_NUM_ACT_TOT]
struct Gains3rdOrder k_att_e
struct Gains3rdOrder k_pos_e
struct Gains2ndOrder k_head_rm
Butterworth4LowPass feedback_filt
Butterworth4LowPass model_filt
void oneloop_from_nav(bool in_flight)
Function that maps navigation inputs to the oneloop controller for the generated autopilot.
struct PolePlacement p_alt_rm
struct OneloopGuidanceRef gui_ref
struct Gains2ndOrder k_head_e
void oneloop_andi_set_failsafe_setpoint(void)
struct OneloopStabilizationRef sta_ref
void guidance_set_min_max_airspeed(float min_airspeed, float max_airspeed)
float andi_u[ANDI_NUM_ACT_TOT]
void oneloop_andi_run(bool in_flight, bool half_loop, struct FloatVect3 PSA_des, int rm_order_h, int rm_order_v)
Main function that runs the controller and performs control allocation.
struct PolePlacement p_att_e
struct PolePlacement p_alt_e
struct PolePlacement p_head_e
struct notch_axis_t pitch
float andi_du[ANDI_NUM_ACT_TOT]
struct OneloopGeneral oneloop_andi
struct Gains3rdOrder k_pos_rm
void oneloop_andi_init(void)
Init function of Oneloop ANDI controller
float gi_unbounded_airspeed_sp
struct SecondOrderNotchFilter filter
struct PolePlacement p_pos_rm
float act_state_filt_vect_1l[ANDI_NUM_ACT]
float actuator_state_1l[ANDI_NUM_ACT]
Butterworth2LowPass model_filt
General stabilization interface for rotorcrafts.
Common data structures shared by euler and quaternion int implementations.
Rotorcraft attitude reference generation.
short int16_t
Typedef defining 16 bit short type.
signed char int8_t
Typedef defining 8 bit char type.