|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"Go to the source code of this file.
Data Structures | |
| union | rotwing_bitmask_t |
| struct | rotwing_state_t |
| struct | rotwing_bitmask_t.__unnamed0__ |
| struct | rotwing_state_t.skew_sweep |
Macros | |
| #define | ROTWING_SKEW_ANGLE_STEP 55.0 |
| #define | ROTWING_QUAD_PREF_PITCH -5.0 |
Enumerations | |
| enum | rotwing_states_t { ROTWING_STATE_FORCE_HOVER , ROTWING_STATE_REQUEST_HOVER , ROTWING_STATE_FORCE_FW , ROTWING_STATE_REQUEST_FW , ROTWING_STATE_FREE } |
Functions | |
| void | rotwing_state_init (void) |
| void | rotwing_state_periodic (void) |
| bool | rotwing_state_hover_motors_running (void) |
| bool | rotwing_state_pusher_motor_running (void) |
| bool | rotwing_state_skew_angle_valid (void) |
| bool | rotwing_state_hover_motors_idling (void) |
| Check if hover motors are idling (COMMAND_THRUST < ROTWING_QUAD_IDLE_MIN_THRUST) for ROTWING_QUAD_IDLE_TIMEOUT time. | |
| void | rotwing_state_set (enum rotwing_states_t state) |
| bool | rotwing_state_choose_circle_direction (uint8_t wp_id) |
| bool | rotwing_state_choose_state_by_dist (uint8_t wp_id) |
Variables | |
| struct rotwing_state_t | rotwing_state |
| union rotwing_bitmask_t |
Definition at line 49 of file rotwing_state.h.
| Data Fields | ||
|---|---|---|
| struct rotwing_bitmask_t.__unnamed0__ | __unnamed__ | |
| uint16_t | value | |
| struct rotwing_state_t |
Definition at line 61 of file rotwing_state.h.
| Data Fields | ||
|---|---|---|
| float | cruise_airspeed | |
| bool | fail_hover_motor | |
| bool | fail_pusher_motor | |
| bool | fail_skew_angle | |
| bool | force_skew | |
| float | fw_min_airspeed | |
| bool | hover_motors_enabled | |
| float | max_airspeed | |
| int32_t | meas_rpm[5] | |
| float | meas_rpm_time[5] | |
| float | meas_skew_angle_deg | |
| float | meas_skew_angle_time | |
| float | min_airspeed | |
| enum rotwing_states_t | nav_state | |
| float | ref_model_skew_angle_deg | |
| int16_t | skew_cmd | |
| struct rotwing_state_t.skew_sweep | skew_sweep | |
| float | sp_skew_angle_deg | |
| enum rotwing_states_t | state | |
| struct rotwing_bitmask_t.__unnamed0__ |
Definition at line 51 of file rotwing_state.h.
| Data Fields | ||
|---|---|---|
| bool | hover_motors_enabled: 1 | |
| bool | hover_motors_idle: 1 | |
| bool | hover_motors_running: 1 | |
| bool | pusher_motor_running: 1 | |
| bool | skew_angle_valid: 1 | |
| bool | skew_forced: 1 | |
| struct rotwing_state_t.skew_sweep |
Definition at line 73 of file rotwing_state.h.
| Data Fields | ||
|---|---|---|
| bool | active | |
| float | freq | |
| float | max_deg | |
| float | min_deg | |
| #define ROTWING_QUAD_PREF_PITCH -5.0 |
Definition at line 38 of file rotwing_state.h.
Referenced by guidance_indi_hybrid_set_wls_settings().
| #define ROTWING_SKEW_ANGLE_STEP 55.0 |
Definition at line 33 of file rotwing_state.h.
Referenced by guidance_indi_hybrid_set_wls_settings(), and rotwing_state_periodic().
| enum rotwing_states_t |
| Enumerator | |
|---|---|
| ROTWING_STATE_FORCE_HOVER | |
| ROTWING_STATE_REQUEST_HOVER | |
| ROTWING_STATE_FORCE_FW | |
| ROTWING_STATE_REQUEST_FW | |
| ROTWING_STATE_FREE | |
Definition at line 41 of file rotwing_state.h.
| bool rotwing_state_choose_circle_direction | ( | uint8_t | wp_id | ) |
Definition at line 591 of file rotwing_state.c.
References float_rmat_transp_vmult(), stateGetNedToBodyRMat_f(), stateGetPositionNed_f(), VECT3_CROSS_PRODUCT, VECT3_DIFF, VECT3_DOT_PRODUCT, waypoints, FloatVect3::x, NedCoor_f::x, FloatVect3::y, NedCoor_f::y, and NedCoor_f::z.
| bool rotwing_state_choose_state_by_dist | ( | uint8_t | wp_id | ) |
Definition at line 626 of file rotwing_state.c.
References AP_MODE_NAV, autopilot, dist2_to_wp, get_dist2_to_point(), ROTWING_STATE_MIN_FW_DIST, ROTWING_STATE_REQUEST_FW, ROTWING_STATE_REQUEST_HOVER, rotwing_state_set(), and waypoints.
| bool rotwing_state_hover_motors_idling | ( | void | ) |
Check if hover motors are idling (COMMAND_THRUST < ROTWING_QUAD_IDLE_MIN_THRUST) for ROTWING_QUAD_IDLE_TIMEOUT time.
Definition at line 269 of file rotwing_state.c.
References get_sys_time_float(), ROTWING_QUAD_IDLE_MIN_THRUST, ROTWING_QUAD_IDLE_TIMEOUT, and stabilization.
Referenced by guidance_indi_hybrid_set_wls_settings(), rotwing_state_periodic(), and send_rotating_wing_state().
| bool rotwing_state_hover_motors_running | ( | void | ) |
Definition at line 551 of file rotwing_state.c.
References get_sys_time_float(), ROTWING_QUAD_MIN_RPM, ROTWING_RPM_TIMEOUT, and rotwing_state.
Referenced by compute_accel_from_speed_sp(), G1G2_oneloop(), guidance_indi_hybrid_set_wls_settings(), rotwing_state_periodic(), and send_rotating_wing_state().
| void rotwing_state_init | ( | void | ) |
Definition at line 227 of file rotwing_state.c.
References DefaultPeriodic, preflight_check_register(), register_periodic_telemetry(), ROTWING_SKEW_SWEEP_FREQ, ROTWING_SKEW_SWEEP_MAX, ROTWING_SKEW_SWEEP_MIN, rotwing_state, ROTWING_STATE_ACT_FEEDBACK_ID, rotwing_state_feedback_cb(), rotwing_state_feedback_ev, ROTWING_STATE_FORCE_HOVER, and send_rotating_wing_state().
| void rotwing_state_periodic | ( | void | ) |
Definition at line 303 of file rotwing_state.c.
References ACT_FEEDBACK_BOARD_ID, actuators_pprz, AP_MODE_FAILSAFE, autopilot, commands, get_sys_time_float(), gi_unbounded_airspeed_sp, guidance_h, GUIDANCE_H_MAX_BANK, GUIDANCE_H_MODE_NONE, GUIDANCE_INDI_FWD_CLIMB_SPEED, GUIDANCE_INDI_FWD_DESCEND_SPEED, GUIDANCE_INDI_QUAD_CLIMB_SPEED, GUIDANCE_INDI_QUAD_DESCEND_SPEED, guidance_set_max_bank_angle(), guidance_set_max_climb_speed(), guidance_set_max_descend_speed(), guidance_set_min_max_airspeed(), act_feedback_t::idx, MAX_PPRZ, nav_max_deceleration_sp, act_feedback_t::act_feedback_set_t::position, act_feedback_t::position, ROTWING_FW_SKEW_ANGLE, ROTWING_FW_STALL_TIMEOUT, ROTWING_MIN_AIRSPEED_SLOPE_START_ANGLE, ROTWING_PUSH_MIN_RPM, ROTWING_QUAD_MIN_RPM, ROTWING_QUAD_SKEW_ANGLE, ROTWING_SKEW_ANGLE_STEP, ROTWING_SKEW_BACK_MARGIN, rotwing_state, ROTWING_STATE_FORCE_FW, ROTWING_STATE_FORCE_HOVER, ROTWING_STATE_FREE, rotwing_state_hover_motors_idling(), rotwing_state_hover_motors_running(), rotwing_state_pusher_motor_running(), ROTWING_STATE_REQUEST_FW, ROTWING_STATE_REQUEST_HOVER, rotwing_state_skew_angle_valid(), rotwing_state_skew_sweep(), ROTWING_TRANSITION_MAX_BANK, ROTWING_TRANSITION_MAX_CLIMB_SPEED, ROTWING_TRANSITION_MAX_DESCEND_SPEED, act_feedback_t::set, speed_sp, stabilization, STABILIZATION_ATT_SUBMODE_FORWARD, STABILIZATION_MODE_ATTITUDE, STABILIZATION_MODE_NONE, stateGetAirspeed_f(), and stateSetFixedWingFlight().
| bool rotwing_state_pusher_motor_running | ( | void | ) |
Definition at line 568 of file rotwing_state.c.
References get_sys_time_float(), ROTWING_PUSH_MIN_RPM, ROTWING_RPM_TIMEOUT, and rotwing_state.
Referenced by compute_accel_from_speed_sp(), guidance_indi_hybrid_set_wls_settings(), rotwing_state_periodic(), and send_rotating_wing_state().
| void rotwing_state_set | ( | enum rotwing_states_t | state | ) |
Definition at line 585 of file rotwing_state.c.
References rotwing_state, and state.
Referenced by rotwing_state_choose_state_by_dist().
| bool rotwing_state_skew_angle_valid | ( | void | ) |
Definition at line 577 of file rotwing_state.c.
References get_sys_time_float(), ROTWING_RPM_TIMEOUT, ROTWING_SKEW_REF_MODEL_MAX_DIFF, and rotwing_state.
Referenced by rotwing_state_periodic(), and send_rotating_wing_state().
|
extern |
Definition at line 183 of file rotwing_state.c.
Referenced by G1G2_oneloop(), guidance_indi_hybrid_set_wls_settings(), oneloop_andi_run(), rotwing_state_feedback_cb(), rotwing_state_hover_motors_running(), rotwing_state_init(), rotwing_state_periodic(), rotwing_state_pusher_motor_running(), rotwing_state_set(), rotwing_state_skew_angle_valid(), rotwing_state_skew_sweep(), and send_rotating_wing_state().