Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Macros | |
#define | WINDSPEED_I 0 |
#define | DOWNWIND_I 1 |
#define | AIRSPEED_I 2 |
#define | WINDSPEED_F 3 |
#define | DOWNWIND_F 4 |
#define | AIRSPEED_F 5 |
#define | AOA_F 6 |
#define | SIDESLIP_F 7 |
Functions | |
void | stateCalcHorizontalWindspeed_i (void) |
void | stateCalcVerticalWindspeed_i (void) |
void | stateCalcAirspeed_i (void) |
void | stateCalcHorizontalWindspeed_f (void) |
void | stateCalcVerticalWindspeed_f (void) |
void | stateCalcAirspeed_f (void) |
static bool | stateIsWindspeedValid (void) |
test if wind speed is available. More... | |
static bool | stateIsVerticalWindspeedValid (void) |
test if vertical wind speed is available. More... | |
static bool | stateIsAirspeedValid (void) |
test if air speed is available. More... | |
static bool | stateIsAngleOfAttackValid (void) |
test if angle of attack is available. More... | |
static bool | stateIsSideslipValid (void) |
test if sideslip is available. More... | |
static void | stateSetHorizontalWindspeed_i (struct Int32Vect2 *h_windspeed) |
Set horizontal windspeed (int). More... | |
static void | stateSetVerticalWindspeed_i (int32_t v_windspeed) |
Set vertical 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 | stateSetVerticalWindspeed_f (float v_windspeed) |
Set vertical 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 float | stateGetVerticalWindspeed_i (void) |
Get vertical windspeed (int). More... | |
static struct Int32Vect3 * | stateGetWindspeed_i (void) |
Get 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 | stateGetVerticalWindspeed_f (void) |
Get vertical windspeed (float). More... | |
static struct FloatVect3 * | stateGetWindspeed_f (void) |
Get 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... | |
union { | |
struct Int32Vect3 | vect3 |
struct Int32Vect2 | vect2 |
} | State::windspeed_i |
Horizontal windspeed in north/east/down. More... | |
int32_t | State::airspeed_i |
Norm of relative wind speed. More... | |
union { | |
struct FloatVect3 | vect3 |
struct FloatVect2 | vect2 |
} | State::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 5 |
Definition at line 125 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateGetAirspeed_f(), stateIsAirspeedValid(), stateSetAirspeed_f(), and stateSetAirspeed_i().
#define AIRSPEED_I 2 |
Definition at line 122 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateGetAirspeed_i(), stateIsAirspeedValid(), stateSetAirspeed_f(), and stateSetAirspeed_i().
#define AOA_F 6 |
Definition at line 126 of file state.h.
Referenced by stateIsAngleOfAttackValid(), and stateSetAngleOfAttack_f().
#define DOWNWIND_F 4 |
Definition at line 124 of file state.h.
Referenced by stateCalcVerticalWindspeed_f(), stateCalcVerticalWindspeed_i(), stateGetVerticalWindspeed_f(), stateGetWindspeed_f(), stateIsVerticalWindspeedValid(), stateSetVerticalWindspeed_f(), and stateSetVerticalWindspeed_i().
#define DOWNWIND_I 1 |
Definition at line 121 of file state.h.
Referenced by stateCalcVerticalWindspeed_f(), stateCalcVerticalWindspeed_i(), stateGetVerticalWindspeed_i(), stateGetWindspeed_i(), stateIsVerticalWindspeedValid(), stateSetVerticalWindspeed_f(), and stateSetVerticalWindspeed_i().
#define SIDESLIP_F 7 |
Definition at line 127 of file state.h.
Referenced by stateIsSideslipValid(), and stateSetSideslip_f().
#define WINDSPEED_F 3 |
Definition at line 123 of file state.h.
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetHorizontalWindspeed_f(), stateGetWindspeed_f(), stateIsWindspeedValid(), stateSetHorizontalWindspeed_f(), and stateSetHorizontalWindspeed_i().
#define WINDSPEED_I 0 |
Definition at line 120 of file state.h.
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateGetHorizontalWindspeed_i(), stateGetWindspeed_i(), stateIsWindspeedValid(), stateSetHorizontalWindspeed_f(), and stateSetHorizontalWindspeed_i().
void stateCalcAirspeed_f | ( | void | ) |
Definition at line 1325 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 1279 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 1294 of file state.c.
References SPEED_FLOAT_OF_BFP, state, State::wind_air_status, WINDSPEED_F, State::windspeed_f, WINDSPEED_I, and State::windspeed_i.
Referenced by stateGetHorizontalWindspeed_f(), and stateGetWindspeed_f().
void stateCalcHorizontalWindspeed_i | ( | void | ) |
Definition at line 1248 of file state.c.
References SPEED_BFP_OF_REAL, state, State::wind_air_status, WINDSPEED_F, State::windspeed_f, WINDSPEED_I, and State::windspeed_i.
Referenced by stateGetHorizontalWindspeed_i(), and stateGetWindspeed_i().
void stateCalcVerticalWindspeed_f | ( | void | ) |
Definition at line 1310 of file state.c.
References DOWNWIND_F, DOWNWIND_I, SPEED_FLOAT_OF_BFP, state, State::wind_air_status, State::windspeed_f, and State::windspeed_i.
Referenced by stateGetVerticalWindspeed_f(), and stateGetWindspeed_f().
void stateCalcVerticalWindspeed_i | ( | void | ) |
Definition at line 1264 of file state.c.
References DOWNWIND_F, DOWNWIND_I, SPEED_BFP_OF_REAL, state, State::wind_air_status, State::windspeed_f, and State::windspeed_i.
Referenced by stateGetVerticalWindspeed_i(), and stateGetWindspeed_i().
|
inlinestatic |
Get airspeed (float).
Definition at line 1407 of file state.h.
References AIRSPEED_F, State::airspeed_f, state, stateCalcAirspeed_f(), and State::wind_air_status.
Referenced by firmware_parse_msg(), flight_benchmark_periodic(), generic_com_periodic(), mavlink_send_vfr_hud(), nav_bungee_takeoff_run(), send_airspeed(), snav_on_time(), v_ctl_climb_loop(), and wind_estimator_periodic().
|
inlinestatic |
Get airspeed (int).
Definition at line 1368 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 1416 of file state.h.
References State::angle_of_attack_f, and state.
Referenced by h_ctl_pitch_loop(), and wind_estimator_periodic().
|
static |
Get horizontal windspeed (float).
Definition at line 1377 of file state.h.
References state, stateCalcHorizontalWindspeed_f(), State::wind_air_status, WINDSPEED_F, and State::windspeed_f.
Referenced by ahrs_infrared_update_gps(), compute_TOD(), gls_compute_TOD(), mf_daq_send_state(), nav_survey_disc_run(), parse_mf_daq_msg(), and snav_on_time().
|
static |
Get horizontal windspeed (int).
Definition at line 1338 of file state.h.
References state, stateCalcHorizontalWindspeed_i(), State::wind_air_status, WINDSPEED_I, and State::windspeed_i.
|
inlinestatic |
Get sideslip (float).
Definition at line 1425 of file state.h.
References State::sideslip_f, and state.
Referenced by wind_estimator_periodic().
|
inlinestatic |
Get vertical windspeed (float).
Definition at line 1386 of file state.h.
References DOWNWIND_F, state, stateCalcVerticalWindspeed_f(), State::wind_air_status, and State::windspeed_f.
|
inlinestatic |
Get vertical windspeed (int).
Definition at line 1347 of file state.h.
References DOWNWIND_I, state, stateCalcVerticalWindspeed_i(), State::wind_air_status, and State::windspeed_i.
|
static |
Get windspeed (float).
Definition at line 1395 of file state.h.
References DOWNWIND_F, state, stateCalcHorizontalWindspeed_f(), stateCalcVerticalWindspeed_f(), State::wind_air_status, WINDSPEED_F, and State::windspeed_f.
|
static |
Get windspeed (int).
Definition at line 1356 of file state.h.
References DOWNWIND_I, state, stateCalcHorizontalWindspeed_i(), stateCalcVerticalWindspeed_i(), State::wind_air_status, WINDSPEED_I, and State::windspeed_i.
|
inlinestatic |
test if air speed is available.
Definition at line 1244 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 1250 of file state.h.
References AOA_F, state, and State::wind_air_status.
|
inlinestatic |
test if sideslip is available.
Definition at line 1256 of file state.h.
References SIDESLIP_F, state, and State::wind_air_status.
|
inlinestatic |
test if vertical wind speed is available.
Definition at line 1238 of file state.h.
References DOWNWIND_F, DOWNWIND_I, state, and State::wind_air_status.
|
inlinestatic |
test if wind speed is available.
Definition at line 1232 of file state.h.
References state, State::wind_air_status, WINDSPEED_F, and WINDSPEED_I.
|
inlinestatic |
Set airspeed (float).
Definition at line 1309 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_cb(), airspeed_ets_read_event(), airspeed_ets_read_periodic(), firmware_parse_msg(), ms45xx_i2c_event(), nps_autopilot_run_step(), and pressure_diff_cb().
|
inlinestatic |
Set airspeed (int).
Definition at line 1282 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 1318 of file state.h.
References State::angle_of_attack_f, AOA_F, state, and State::wind_air_status.
Referenced by aoa_adc_update(), and incidence_cb().
|
inlinestatic |
Set horizontal windspeed (float).
Definition at line 1291 of file state.h.
References state, VECT2_COPY, State::wind_air_status, WINDSPEED_F, State::windspeed_f, and WINDSPEED_I.
Referenced by firmware_parse_msg(), and wind_estimator_event().
|
inlinestatic |
Set horizontal windspeed (int).
Definition at line 1264 of file state.h.
References state, VECT2_COPY, State::wind_air_status, WINDSPEED_F, WINDSPEED_I, and State::windspeed_i.
|
inlinestatic |
Set sideslip angle in radians (float).
Definition at line 1327 of file state.h.
References SIDESLIP_F, State::sideslip_f, state, and State::wind_air_status.
Referenced by incidence_cb().
|
inlinestatic |
Set vertical windspeed (float).
Definition at line 1300 of file state.h.
References DOWNWIND_F, DOWNWIND_I, state, State::wind_air_status, and State::windspeed_f.
Referenced by firmware_parse_msg(), and wind_estimator_event().
|
inlinestatic |
Set vertical windspeed (int).
Definition at line 1273 of file state.h.
References DOWNWIND_F, DOWNWIND_I, state, State::wind_air_status, and State::windspeed_i.
float State::airspeed_f |
Norm of relative air speed.
Unit: m/s
Definition at line 431 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 416 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 437 of file state.h.
Referenced by stateGetAngleOfAttack_f(), and stateSetAngleOfAttack_f().
float State::sideslip_f |
Sideslip angle Unit: rad.
Definition at line 443 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 401 of file state.h.
Referenced by stateCalcAirspeed_f(), stateCalcAirspeed_i(), stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateCalcVerticalWindspeed_f(), stateCalcVerticalWindspeed_i(), stateGetAirspeed_f(), stateGetAirspeed_i(), stateGetHorizontalWindspeed_f(), stateGetHorizontalWindspeed_i(), stateGetVerticalWindspeed_f(), stateGetVerticalWindspeed_i(), stateGetWindspeed_f(), stateGetWindspeed_i(), stateInit(), stateIsAirspeedValid(), stateIsAngleOfAttackValid(), stateIsSideslipValid(), stateIsVerticalWindspeedValid(), stateIsWindspeedValid(), stateSetAirspeed_f(), stateSetAirspeed_i(), stateSetAngleOfAttack_f(), stateSetHorizontalWindspeed_f(), stateSetHorizontalWindspeed_i(), stateSetSideslip_f(), stateSetVerticalWindspeed_f(), and stateSetVerticalWindspeed_i().
union { ... } State::windspeed_f |
Horizontal windspeed.
Units: m/s with x=north, y=east, z=down
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateCalcVerticalWindspeed_f(), stateCalcVerticalWindspeed_i(), stateGetHorizontalWindspeed_f(), stateGetVerticalWindspeed_f(), stateGetWindspeed_f(), stateSetHorizontalWindspeed_f(), and stateSetVerticalWindspeed_f().
union { ... } State::windspeed_i |
Horizontal windspeed in north/east/down.
Units: m/s in BFP with INT32_SPEED_FRAC
Referenced by stateCalcHorizontalWindspeed_f(), stateCalcHorizontalWindspeed_i(), stateCalcVerticalWindspeed_f(), stateCalcVerticalWindspeed_i(), stateGetHorizontalWindspeed_i(), stateGetVerticalWindspeed_i(), stateGetWindspeed_i(), stateSetHorizontalWindspeed_i(), and stateSetVerticalWindspeed_i().