Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Wind- and airspeed representations
+ Collaboration diagram for Wind- and airspeed representations:

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 Int32Vect2stateGetHorizontalWindspeed_i (void)
 Get horizontal windspeed (int). More...
 
static int32_t stateGetAirspeed_i (void)
 Get airspeed (int). More...
 
static struct FloatVect2stateGetHorizontalWindspeed_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...
 

Detailed Description

Macro Definition Documentation

#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().

Function Documentation

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

void stateCalcHorizontalWindspeed_f ( void  )
void stateCalcHorizontalWindspeed_i ( void  )
static float stateGetAirspeed_f ( void  )
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int32_t stateGetAirspeed_i ( void  )
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.

+ Here is the call graph for this function:

static float stateGetAngleOfAttack_f ( void  )
inlinestatic

Get angle of attack (float).

Todo:
only float for now

Definition at line 1319 of file state.h.

References State::angle_of_attack_f, and state.

Referenced by h_ctl_pitch_loop().

+ Here is the caller graph for this function:

static struct FloatVect2* stateGetHorizontalWindspeed_f ( void  )
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct Int32Vect2* stateGetHorizontalWindspeed_i ( void  )
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.

+ Here is the call graph for this function:

static float stateGetSideslip_f ( void  )
inlinestatic

Get sideslip (float).

Todo:
only float for now

Definition at line 1328 of file state.h.

References State::sideslip_f, and state.

static bool_t stateIsAirspeedValid ( void  )
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.

static bool_t stateIsAngleOfAttackValid ( void  )
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.

static bool_t stateIsSideslipValid ( void  )
inlinestatic

test if sideslip is available.

Definition at line 1219 of file state.h.

References SIDESLIP_F, state, and State::wind_air_status.

static bool_t stateIsWindspeedValid ( void  )
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.

static void stateSetAirspeed_f ( float  airspeed)
inlinestatic
static void stateSetAirspeed_i ( int32_t  airspeed)
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.

static void stateSetAngleOfAttack_f ( float  aoa)
inlinestatic

Set angle of attack in radians (float).

Todo:
no integer yet

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().

+ Here is the caller graph for this function:

static void stateSetHorizontalWindspeed_f ( struct FloatVect2 h_windspeed)
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().

+ Here is the caller graph for this function:

static void stateSetHorizontalWindspeed_i ( struct Int32Vect2 h_windspeed)
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.

static void stateSetSideslip_f ( float  sideslip)
inlinestatic

Set sideslip angle in radians (float).

Todo:
no integer yet

Definition at line 1272 of file state.h.

References SIDESLIP_F, State::sideslip_f, state, and State::wind_air_status.

Variable Documentation

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().