36#include "generated/modules.h"
40#ifndef GUIDANCE_INDI_MAX_H_THRUST
41#define GUIDANCE_INDI_MAX_H_THRUST 2.f
44#ifndef GUIDANCE_INDI_MAX_V_THRUST
45#define GUIDANCE_INDI_MAX_V_THRUST 15.f
76 Gmat[0][0] =
Tx * (stheta * cphi * spsi) +
Ty * (stheta * cphi * cpsi) +
Tz * (-stheta * sphi);
77 Gmat[1][0] =
Tx * (-sphi * spsi) +
Ty * (-sphi * cpsi) +
Tz * (-cphi);
78 Gmat[2][0] =
Tx * (ctheta * cphi * spsi) +
Ty * (ctheta * cphi * cpsi) +
Tz * (-ctheta * sphi);
81 Gmat[0][1] =
Tx * (-stheta * cpsi + ctheta * sphi * spsi) +
Ty * (stheta * spsi + ctheta * sphi * cpsi) +
Tz * (ctheta * cphi);
83 Gmat[2][1] =
Tx * (-ctheta * cpsi - stheta * sphi * spsi) +
Ty * (ctheta * spsi - stheta * sphi * cpsi) +
Tz * (-stheta * cphi);
91 Gmat[0][3] = ctheta * cpsi - stheta * sphi * spsi;
92 Gmat[1][3] = ctheta * spsi;
93 Gmat[2][3] = -stheta * cpsi + ctheta * sphi * spsi;
96 Gmat[0][4] = -ctheta * spsi + stheta * sphi * cpsi;
97 Gmat[1][4] = cphi * cpsi;
98 Gmat[2][4] = stheta * spsi + ctheta * sphi * cpsi;
101 Gmat[0][5] = stheta * cphi;
103 Gmat[2][5] = ctheta * cphi;
109#if GUIDANCE_INDI_RC_SWITCH_EULER
void float_eulers_of_quat_yxz(struct FloatEulers *e, const struct FloatQuat *q)
euler rotation 'YXZ' This function calculates from a quaternion the Euler angles with the order YXZ,...
float guidance_indi_max_bank
static float Gmat[GUIDANCE_INDI_NV][GUIDANCE_INDI_NU]
A guidance mode based on Incremental Nonlinear Dynamic Inversion.
#define GUIDANCE_INDI_MAX_H_THRUST
void guidance_indi_calcG(float Gmat[3][6], const struct FloatQuat *att)
#define GUIDANCE_INDI_MAX_V_THRUST
struct ThrustSetpoint guidance_set_rc_h_thrust(struct ThrustSetpoint *v_sp)
Set horizontal thrust from RC Horizontal is passed as an argument.
struct StabilizationSetpoint guidance_set_rc_h_att(struct StabilizationSetpoint *a_sp)
Set flat attitude setpoint from RC Heading setpoint is kept.
float guidance_indi_max_v_thrust
void guidance_indi_set_wls_settings(struct WLS_t *wls, const struct FloatQuat *att, const float heading_sp)
float guidance_indi_max_h_thrust
static pprz_t radio_control_get(uint8_t idx)
Get a radio control channel value.
#define RADIO_ROLL
Redefining RADIO_* Do not use with radio.h (ppm rc)
struct FloatEulers stab_sp_to_eulers_f(struct StabilizationSetpoint *sp)
struct ThrustSetpoint th_sp_from_thrust_vect_f(float thrust[3])
struct StabilizationSetpoint stab_sp_from_eulers_f(struct FloatEulers *eulers)
float th_sp_to_thrust_f(struct ThrustSetpoint *th, int32_t thrust, uint8_t axis)
struct FloatVect3 stab_thrust_filt
API to get/set the generic vehicle states.
Thrust setpoint // TODO to a setpoint header Structure to store the desired thrust vector with differ...