29 #include "generated/modules.h"
56 #ifndef GUIDANCE_INDI_PITCH_EFF_SCALING
57 #define GUIDANCE_INDI_PITCH_EFF_SCALING 1.0
62 Bound(pitch_lift,-M_PI_2,0);
63 float lift = sinf(pitch_lift)*9.81;
64 float T = cosf(pitch_lift)*-9.81;
69 Gmat[0][0] = cphi*ctheta*spsi*
T + cphi*spsi*lift;
70 Gmat[1][0] = -cphi*ctheta*cpsi*
T - cphi*cpsi*lift;
71 Gmat[2][0] = -sphi*ctheta*
T -sphi*lift;
75 Gmat[0][2] = stheta*cpsi + sphi*ctheta*spsi;
76 Gmat[1][2] = stheta*spsi - sphi*ctheta*cpsi;
77 Gmat[2][2] = cphi*ctheta;
85 #if GUIDANCE_INDI_HYBRID_USE_WLS
102 wls_guid_p.u_pref[0] = -roll_angle;
103 wls_guid_p.u_pref[1] = -pitch_angle;
104 wls_guid_p.u_pref[2] = wls_guid_p.u_max[2];
void float_eulers_of_quat_zxy(struct FloatEulers *e, struct FloatQuat *q)
euler rotation 'ZXY' This rotation order is useful if you need 90 deg pitch
static struct FloatQuat * stateGetNedToBodyQuat_f(void)
Get vehicle body attitude quaternion (float).
static float stateGetAirspeed_f(void)
Get airspeed (float).
float guidance_indi_max_bank
float guidance_indi_min_pitch
float WEAK guidance_indi_get_liftd(float airspeed, float theta)
Get the derivative of lift w.r.t.
struct FloatEulers eulers_zxy
state eulers in zxy order
A guidance mode based on Incremental Nonlinear Dynamic Inversion Come to ICRA2016 to learn more!
void WEAK guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle)
#define GUIDANCE_INDI_MAX_PITCH
void guidance_indi_calcg_wing(float Gmat[GUIDANCE_INDI_HYBRID_V][GUIDANCE_INDI_HYBRID_U], struct FloatVect3 a_diff, float v_gih[GUIDANCE_INDI_HYBRID_V])
Calculate the matrix of partial derivatives of the roll, pitch and thrust w.r.t.
#define GUIDANCE_INDI_PITCH_EFF_SCALING
float g1g2[INDI_OUTPUTS][INDI_NUM_ACT]
float actuator_state_filt_vect[INDI_NUM_ACT]
API to get/set the generic vehicle states.