|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Data Structures | |
| union | CycloneCoefficients |
| union | CeMatrix |
| struct | CycloneCoefficients.__unnamed0__ |
| struct | CeMatrix.__unnamed0__ |
Functions | |
| static void | cyclone_obm_forces (const float body_vel[3], const float u[4], const float coeff[22], float F_obm_forces[3]) |
| static void | cyclone_obm_moments (const float rates[3], const float body_vel[3], const float u[4], const float coeff[22], float F_obm_moments[3]) |
| static void | cyclone_f_stb_u (const float body_vel[3], const float u[4], const float coeff[22], float F_stb_u[16]) |
| static void | cyclone_f_stb_x (const float rates[3], const float ang_accel[3], const float vel_body[3], const float accel_body[3], const float u[4], const float coeff[22], float F_stb_x[4]) |
| struct FloatVect3 | evaluate_obm_forces (const struct FloatRates *rates, const struct FloatVect3 *vel_body, const float actuator_state[ANDI_NUM_ACT]) |
| Evaluate total force acting on the vehicle from the OBM. | |
| struct FloatVect3 | evaluate_obm_moments (const struct FloatRates *rates, const struct FloatVect3 *vel_body, const float actuator_state[ANDI_NUM_ACT]) |
| Evaluate total moments acting on the vehicle from the OBM. | |
| void | evaluate_obm_f_stb_u (float fu_mat[ANDI_NUM_ACT *ANDI_OUTPUTS], const struct FloatRates *rates, const struct FloatVect3 *vel_body, const float actuator_state[ANDI_NUM_ACT]) |
| Evaluate the state-dependent control effectiveness matrix F_u for stabilization. | |
| void | evaluate_obm_f_stb_x (float nu_obm[ANDI_OUTPUTS], const struct FloatRates *rates, const struct FloatVect3 *vel_body, const struct FloatVect3 *ang_accel, const struct FloatVect3 *accel_body, const float actuator_state[ANDI_NUM_ACT]) |
| Evaluate the state-dependent contribution F_x * x_dot for stabilization. | |
| float | evaluate_obm_thrust_z (const float actuator_state[ANDI_NUM_ACT]) |
| Compute total thrust produced by the current actuator state. | |
Variables | |
| union CycloneCoefficients | obm_coefficients |
| union CeMatrix | ce_mat_tmp |
| union CycloneCoefficients |
Definition at line 12 of file obm_cyclone.c.
| Data Fields | ||
|---|---|---|
| struct CycloneCoefficients.__unnamed0__ | __unnamed__ | |
| float | data[22] | |
| union CeMatrix |
Definition at line 84 of file obm_cyclone.c.
| Data Fields | ||
|---|---|---|
| struct CeMatrix.__unnamed0__ | __unnamed__ | |
| float | data[16] | |
| struct CycloneCoefficients.__unnamed0__ |
Definition at line 13 of file obm_cyclone.c.
| struct CeMatrix.__unnamed0__ |
Definition at line 85 of file obm_cyclone.c.
|
static |
Definition at line 160 of file obm_cyclone.c.
Referenced by evaluate_obm_f_stb_u().
|
static |
Definition at line 201 of file obm_cyclone.c.
Referenced by evaluate_obm_f_stb_x().
|
static |
Definition at line 117 of file obm_cyclone.c.
Referenced by evaluate_obm_forces().
|
static |
Definition at line 133 of file obm_cyclone.c.
Referenced by evaluate_obm_moments().
| void evaluate_obm_f_stb_u | ( | float | fu_mat[ANDI_NUM_ACT *ANDI_OUTPUTS], |
| const struct FloatRates * | rates, | ||
| const struct FloatVect3 * | vel_body, | ||
| const float | actuator_state[ANDI_NUM_ACT] ) |
Evaluate the state-dependent control effectiveness matrix F_u for stabilization.
This function computes the mapping from actuator inputs to aerodynamic/motor outputs for the stabilization model. The output is written into the provided, pre-allocated array fu_mat of size ANDI_NUM_ACT * ANDI_OUTPUTS.
The produced matrix represents the partial derivatives of the modeled outputs with respect to actuator commands (∂f/∂u) evaluated at the current state and actuator conditions. It is intended to be implemented per-airframe (see obm_cyclone for an example).
| [out] | fu_mat | Pre-allocated array (size ANDI_NUM_ACT * ANDI_OUTPUTS) receiving the flattened control-effectiveness matrix. Convention: element for output i and actuator j should be written to fu_mat[i * ANDI_NUM_ACT + j]. |
| [in] | rates | Current angular rates (typically p, q, r) used by the model (rad/s). |
| [in] | vel_body | Body-frame linear velocity vector (u, v, w) (m/s). |
| [in] | actuator_state | Current actuator commands/deflections array (length ANDI_NUM_ACT). Units and normalization depend on the airframe and actuator type (e.g. radians, throttle fraction). |
Definition at line 319 of file obm_cyclone.c.
References actuator_state, ANDI_NUM_ACT, ANDI_OUTPUTS, ce_mat_tmp, cyclone_f_stb_u(), obm_coefficients, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by stabilization_andi_enter(), stabilization_andi_init(), and stabilization_andi_run().
| void evaluate_obm_f_stb_x | ( | float | nu_obm[ANDI_OUTPUTS], |
| const struct FloatRates * | rates, | ||
| const struct FloatVect3 * | vel_body, | ||
| const struct FloatVect3 * | ang_accel, | ||
| const struct FloatVect3 * | accel_body, | ||
| const float | actuator_state[ANDI_NUM_ACT] ) |
Evaluate the state-dependent contribution F_x * x_dot for stabilization.
Computes nu_obm = F_x * x_dot, the portion of the open-body-model outputs that depends on the current state rates/accelerations (i.e. the state-dependent term). This is the term that captures how changes in state drive the modeled outputs independent of actuator inputs.
| [out] | nu_obm | Pre-allocated output vector of length ANDI_OUTPUTS receiving the computed F_x * x_dot values. |
| [in] | rates | Current angular rates (p, q, r) used by the model (rad/s). |
| [in] | vel_body | Body-frame velocity vector (u, v, w) (m/s). |
| [in] | ang_accel | Body angular accelerations (p_dot, q_dot, r_dot) (rad/s^2). |
| [in] | accel_body | Body-frame linear accelerations (ax, ay, az) (m/s^2). |
| [in] | actuator_state | Current actuator commands/deflections array (length ANDI_NUM_ACT). Some terms of F_x may be actuator-state dependent (e.g. rotor wake effects). |
Definition at line 345 of file obm_cyclone.c.
References actuator_state, ANDI_NUM_ACT, ANDI_OUTPUTS, cyclone_f_stb_x(), nu_obm, obm_coefficients, FloatRates::p, FloatRates::q, FloatRates::r, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by stabilization_andi_run().
| struct FloatVect3 evaluate_obm_forces | ( | const struct FloatRates * | rates, |
| const struct FloatVect3 * | vel_body, | ||
| const float | actuator_state[ANDI_NUM_ACT] ) |
Evaluate total force acting on the vehicle from the OBM.
Computes the full set of forces modeled by the on board model for the given airframe as a function of the state and input.
This function is used for complementary filtering in ANDI.
| [in] | rates | Current angular rates (p, q, r) used by the model (rad/s). |
| [in] | vel_body | Body-frame linear velocity vector (u, v, w) (m/s). |
| [in] | actuator_state | Current actuator commands/deflections array (length ANDI_NUM_ACT). Units and normalization depend on the airframe and actuator type (e.g. radians, throttle fraction). |
Definition at line 273 of file obm_cyclone.c.
References actuator_state, ANDI_NUM_ACT, cyclone_obm_forces(), evaluate_obm_forces(), obm_coefficients, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by evaluate_obm_forces(), and stabilization_andi_run().
| struct FloatVect3 evaluate_obm_moments | ( | const struct FloatRates * | rates, |
| const struct FloatVect3 * | vel_body, | ||
| const float | actuator_state[ANDI_NUM_ACT] ) |
Evaluate total moments acting on the vehicle from the OBM.
Computes the full set of moments modeled by the on board model for the given airframe as a function of the state and input.
This function is used for complementary filtering in ANDI.
| [in] | rates | Current angular rates (p, q, r) used by the model (rad/s). |
| [in] | vel_body | Body-frame linear velocity vector (u, v, w) (m/s). |
| [in] | actuator_state | Current actuator commands/deflections array (length ANDI_NUM_ACT). Units and normalization depend on the airframe and actuator type (e.g. radians, throttle fraction). |
Definition at line 294 of file obm_cyclone.c.
References actuator_state, ANDI_NUM_ACT, cyclone_obm_moments(), evaluate_obm_moments(), moments, obm_coefficients, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by evaluate_obm_moments(), and stabilization_andi_run().
| float evaluate_obm_thrust_z | ( | const float | actuator_state[ANDI_NUM_ACT] | ) |
Compute total thrust produced by the current actuator state.
Returns the aggregate thrust generated by the set of actuators described by actuator_state. This value is typically used by the stabilization/obm code when converting actuator commands to net force for direct thrust control.
| [in] | actuator_state | Current actuator commands/deflections array (length ANDI_NUM_ACT). Units and normalization depend on the airframe (e.g. rotor collective, throttle fraction). |
Definition at line 375 of file obm_cyclone.c.
References actuator_state, ANDI_NUM_ACT, and obm_coefficients.
Referenced by stabilization_andi_enter(), and stabilization_andi_run().
| union CeMatrix ce_mat_tmp |
Definition at line 108 of file obm_cyclone.c.
Referenced by evaluate_obm_f_stb_u().
| union CycloneCoefficients obm_coefficients |
Definition at line 54 of file obm_cyclone.c.
Referenced by evaluate_obm_f_stb_u(), evaluate_obm_f_stb_x(), evaluate_obm_forces(), evaluate_obm_moments(), and evaluate_obm_thrust_z().