Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Macros | |
#define | WINDSPEED_I 0 |
#define | AIRSPEED_I 1 |
#define | WINDSPEED_F 2 |
#define | AIRSPEED_F 3 |
#define | AOA_F 4 |
#define | SIDESLIP_F 5 |
Functions | |
void | stateCalcHorizontalWindspeed_i (void) |
void | stateCalcAirspeed_i (void) |
void | stateCalcHorizontalWindspeed_f (void) |
void | stateCalcAirspeed_f (void) |
static bool_t | stateIsWindspeedValid (void) |
test if wind speed is available. More... | |
static bool_t | stateIsAirspeedValid (void) |
test if air speed is available. More... | |
static bool_t | stateIsAngleOfAttackValid (void) |
test if angle of attack is available. More... | |
static bool_t | stateIsSideslipValid (void) |
test if sideslip is available. More... | |
static void | stateSetHorizontalWindspeed_i (struct Int32Vect2 *h_windspeed) |
Set horizontal windspeed (int). More... | |
static void | stateSetAirspeed_i (int32_t airspeed) |
Set airspeed (int). More... | |
static void | stateSetHorizontalWindspeed_f (struct FloatVect2 *h_windspeed) |
Set horizontal windspeed (float). More... | |
static void | stateSetAirspeed_f (float airspeed) |
Set airspeed (float). More... | |
static void | stateSetAngleOfAttack_f (float aoa) |
Set angle of attack in radians (float). More... | |
static void | stateSetSideslip_f (float sideslip) |
Set sideslip angle in radians (float). More... | |
static struct Int32Vect2 * | stateGetHorizontalWindspeed_i (void) |
Get horizontal windspeed (int). More... | |
static int32_t | stateGetAirspeed_i (void) |
Get airspeed (int). More... | |
static struct FloatVect2 * | stateGetHorizontalWindspeed_f (void) |
Get horizontal windspeed (float). More... | |
static float | stateGetAirspeed_f (void) |
Get airspeed (float). More... | |
static float | stateGetAngleOfAttack_f (void) |
Get angle of attack (float). More... | |
static float | stateGetSideslip_f (void) |
Get sideslip (float). More... | |
Variables | |
uint8_t | State::wind_air_status |
Holds the status bits for all wind- and airspeed representations. More... | |
struct Int32Vect2 | State::h_windspeed_i |
Horizontal windspeed in north/east. More... | |
int32_t | State::airspeed_i |
Norm of relative wind speed. More... | |
struct FloatVect2 | State::h_windspeed_f |
Horizontal windspeed. More... | |
float | State::airspeed_f |
Norm of relative air speed. More... | |
float | State::angle_of_attack_f |
Angle of attack Unit: rad. More... | |
float | State::sideslip_f |
Sideslip angle Unit: rad. More... | |
#define AIRSPEED_F 3 |
Definition at line 121 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateGetAirspeed_f(), stateIsAirspeedValid(), stateSetAirspeed_f(), and stateSetAirspeed_i().
#define AIRSPEED_I 1 |
Definition at line 119 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateGetAirspeed_i(), stateIsAirspeedValid(), stateSetAirspeed_f(), and stateSetAirspeed_i().
#define AOA_F 4 |
Definition at line 122 of file state.h.
Referenced by stateIsAngleOfAttackValid(), and stateSetAngleOfAttack_f().
#define SIDESLIP_F 5 |
Definition at line 123 of file state.h.
Referenced by stateIsSideslipValid(), and stateSetSideslip_f().
#define WINDSPEED_F 2 |
Definition at line 120 of file state.h.
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetHorizontalWindspeed_f(), stateIsWindspeedValid(), stateSetHorizontalWindspeed_f(), and stateSetHorizontalWindspeed_i().
#define WINDSPEED_I 0 |
Definition at line 118 of file state.h.
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetHorizontalWindspeed_i(), stateIsWindspeedValid(), stateSetHorizontalWindspeed_f(), and stateSetHorizontalWindspeed_i().
void stateCalcAirspeed_f | ( | void | ) |
Definition at line 1147 of file state.c.
References AIRSPEED_F, State::airspeed_f, AIRSPEED_I, State::airspeed_i, SPEED_FLOAT_OF_BFP, state, and State::wind_air_status.
Referenced by stateGetAirspeed_f().
void stateCalcAirspeed_i | ( | void | ) |
Definition at line 1120 of file state.c.
References AIRSPEED_F, State::airspeed_f, AIRSPEED_I, State::airspeed_i, SPEED_BFP_OF_REAL, state, and State::wind_air_status.
Referenced by stateGetAirspeed_i().
void stateCalcHorizontalWindspeed_f | ( | void | ) |
Definition at line 1133 of file state.c.
References State::h_windspeed_f, State::h_windspeed_i, State::rate_status, SPEED_FLOAT_OF_BFP, state, State::wind_air_status, WINDSPEED_F, WINDSPEED_I, FloatVect2::x, Int32Vect2::x, and Int32Vect2::y.
Referenced by stateGetHorizontalWindspeed_f().
void stateCalcHorizontalWindspeed_i | ( | void | ) |
Definition at line 1106 of file state.c.
References State::h_windspeed_f, State::h_windspeed_i, State::rate_status, SPEED_BFP_OF_REAL, state, State::wind_air_status, WINDSPEED_F, WINDSPEED_I, FloatVect2::x, Int32Vect2::x, FloatVect2::y, and Int32Vect2::y.
Referenced by stateGetHorizontalWindspeed_i().
|
inlinestatic |
Get airspeed (float).
Definition at line 1310 of file state.h.
References AIRSPEED_F, State::airspeed_f, state, stateCalcAirspeed_f(), and State::wind_air_status.
Referenced by dl_parse_msg(), flight_benchmark_periodic(), generic_com_periodic(), mavlink_send_vfr_hud(), nav_bungee_takeoff_run(), snav_on_time(), and v_ctl_climb_loop().
|
inlinestatic |
Get airspeed (int).
Definition at line 1292 of file state.h.
References AIRSPEED_I, State::airspeed_i, state, stateCalcAirspeed_i(), and State::wind_air_status.
|
inlinestatic |
Get angle of attack (float).
Definition at line 1319 of file state.h.
References State::angle_of_attack_f, and state.
Referenced by h_ctl_pitch_loop().
|
static |
Get horizontal windspeed (float).
Definition at line 1301 of file state.h.
References State::h_windspeed_f, state, stateCalcHorizontalWindspeed_f(), State::wind_air_status, and WINDSPEED_F.
Referenced by ahrs_infrared_update_gps(), compute_TOD(), gls_compute_TOD(), mf_daq_send_state(), nav_anemotaxis(), nav_anemotaxis_downwind(), nav_anemotaxis_init(), nav_survey_disc_run(), parse_mf_daq_msg(), and snav_on_time().
|
static |
Get horizontal windspeed (int).
Definition at line 1283 of file state.h.
References State::h_windspeed_i, state, stateCalcHorizontalWindspeed_i(), State::wind_air_status, and WINDSPEED_I.
|
inlinestatic |
Get sideslip (float).
Definition at line 1328 of file state.h.
References State::sideslip_f, and state.
|
inlinestatic |
test if air speed is available.
Definition at line 1207 of file state.h.
References AIRSPEED_F, AIRSPEED_I, state, and State::wind_air_status.
|
inlinestatic |
test if angle of attack is available.
Definition at line 1213 of file state.h.
References AOA_F, state, and State::wind_air_status.
|
inlinestatic |
test if sideslip is available.
Definition at line 1219 of file state.h.
References SIDESLIP_F, state, and State::wind_air_status.
|
inlinestatic |
test if wind speed is available.
Definition at line 1201 of file state.h.
References state, State::wind_air_status, WINDSPEED_F, and WINDSPEED_I.
|
inlinestatic |
Set airspeed (float).
Definition at line 1254 of file state.h.
References AIRSPEED_F, State::airspeed_f, AIRSPEED_I, state, and State::wind_air_status.
Referenced by airspeed_adc_update(), airspeed_amsys_read_event(), airspeed_amsys_read_periodic(), airspeed_ets_read_event(), airspeed_ets_read_periodic(), dl_parse_msg(), ms45xx_i2c_event(), pbn_read_event(), and pressure_diff_cb().
|
inlinestatic |
Set airspeed (int).
Definition at line 1236 of file state.h.
References AIRSPEED_F, AIRSPEED_I, State::airspeed_i, state, and State::wind_air_status.
|
inlinestatic |
Set angle of attack in radians (float).
Definition at line 1263 of file state.h.
References State::angle_of_attack_f, AOA_F, state, and State::wind_air_status.
Referenced by aoa_adc_update(), and aoa_pwm_update().
|
inlinestatic |
Set horizontal windspeed (float).
Definition at line 1245 of file state.h.
References State::h_windspeed_f, state, VECT2_COPY, State::wind_air_status, WINDSPEED_F, and WINDSPEED_I.
Referenced by dl_parse_msg().
|
inlinestatic |
Set horizontal windspeed (int).
Definition at line 1227 of file state.h.
References State::h_windspeed_i, state, VECT2_COPY, State::wind_air_status, WINDSPEED_F, and WINDSPEED_I.
|
inlinestatic |
Set sideslip angle in radians (float).
Definition at line 1272 of file state.h.
References SIDESLIP_F, State::sideslip_f, state, and State::wind_air_status.
float State::airspeed_f |
Norm of relative air speed.
Unit: m/s
Definition at line 414 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateGetAirspeed_f(), and stateSetAirspeed_f().
int32_t State::airspeed_i |
Norm of relative wind speed.
Unit: m/s in BFP with INT32_SPEED_FRAC
Definition at line 402 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateGetAirspeed_i(), and stateSetAirspeed_i().
float State::angle_of_attack_f |
Angle of attack Unit: rad.
Definition at line 420 of file state.h.
Referenced by stateGetAngleOfAttack_f(), and stateSetAngleOfAttack_f().
struct FloatVect2 State::h_windspeed_f |
Horizontal windspeed.
Units: m/s with x=north, y=east
Definition at line 408 of file state.h.
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetHorizontalWindspeed_f(), and stateSetHorizontalWindspeed_f().
struct Int32Vect2 State::h_windspeed_i |
Horizontal windspeed in north/east.
Units: m/s in BFP with INT32_SPEED_FRAC
Definition at line 396 of file state.h.
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetHorizontalWindspeed_i(), and stateSetHorizontalWindspeed_i().
float State::sideslip_f |
Sideslip angle Unit: rad.
Definition at line 426 of file state.h.
Referenced by stateGetSideslip_f(), and stateSetSideslip_f().
uint8_t State::wind_air_status |
Holds the status bits for all wind- and airspeed representations.
When the corresponding bit is one the representation is already computed.
Definition at line 390 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetAirspeed_f(), stateGetAirspeed_i(), stateGetHorizontalWindspeed_f(), stateGetHorizontalWindspeed_i(), stateInit(), stateIsAirspeedValid(), stateIsAngleOfAttackValid(), stateIsSideslipValid(), stateIsWindspeedValid(), stateSetAirspeed_f(), stateSetAirspeed_i(), stateSetAngleOfAttack_f(), stateSetHorizontalWindspeed_f(), stateSetHorizontalWindspeed_i(), and stateSetSideslip_f().