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

Macros

#define SPEED_ECEF_I   0
 
#define SPEED_NED_I   1
 
#define SPEED_ENU_I   2
 
#define SPEED_HNORM_I   3
 
#define SPEED_HDIR_I   4
 
#define SPEED_ECEF_F   5
 
#define SPEED_NED_F   6
 
#define SPEED_ENU_F   7
 
#define SPEED_HNORM_F   8
 
#define SPEED_HDIR_F   9
 
#define SPEED_LOCAL_COORD   ((1<<SPEED_NED_I)|(1<<SPEED_ENU_I)|(1<<SPEED_NED_F)|(1<<SPEED_ENU_F))
 

Functions

void stateCalcSpeedNed_i (void)
 
void stateCalcSpeedEnu_i (void)
 
void stateCalcSpeedEcef_i (void)
 
void stateCalcHorizontalSpeedNorm_i (void)
 
void stateCalcHorizontalSpeedDir_i (void)
 
void stateCalcSpeedNed_f (void)
 
void stateCalcSpeedEnu_f (void)
 
void stateCalcSpeedEcef_f (void)
 
void stateCalcHorizontalSpeedNorm_f (void)
 
void stateCalcHorizontalSpeedDir_f (void)
 
static void stateSetSpeedNed_i (struct NedCoor_i *ned_speed)
 Set ground speed in local NED coordinates (int). More...
 
static void stateSetSpeedEnu_i (struct EnuCoor_i *enu_speed)
 Set ground speed in local ENU coordinates (int). More...
 
static void stateSetSpeedEcef_i (struct EcefCoor_i *ecef_speed)
 Set ground speed in ECEF coordinates (int). More...
 
static void stateSetSpeed_i (struct EcefCoor_i *ecef_speed, struct NedCoor_i *ned_speed, struct EnuCoor_i *enu_speed)
 Set multiple speed coordinates (int). More...
 
static void stateSetSpeedNed_f (struct NedCoor_f *ned_speed)
 Set ground speed in local NED coordinates (float). More...
 
static void stateSetSpeedEnu_f (struct EnuCoor_f *enu_speed)
 Set ground speed in local ENU coordinates (float). More...
 
static void stateSetSpeedEcef_f (struct EcefCoor_f *ecef_speed)
 Set ground speed in ECEF coordinates (float). More...
 
static void stateSetSpeed_f (struct EcefCoor_f *ecef_speed, struct NedCoor_f *ned_speed, struct EnuCoor_f *enu_speed)
 Set multiple speed coordinates (float). More...
 
static void stateSetAccelBody_i (struct Int32Vect3 *body_accel)
 Set acceleration in Body coordinates (int). More...
 
static struct NedCoor_istateGetSpeedNed_i (void)
 Get ground speed in local NED coordinates (int). More...
 
static struct EnuCoor_istateGetSpeedEnu_i (void)
 Get ground speed in local ENU coordinates (int). More...
 
static struct EcefCoor_istateGetSpeedEcef_i (void)
 Get ground speed in ECEF coordinates (int). More...
 
static uint32_t stateGetHorizontalSpeedNorm_i (void)
 Get norm of horizontal ground speed (int). More...
 
static int32_t stateGetHorizontalSpeedDir_i (void)
 Get dir of horizontal ground speed (int). More...
 
static struct NedCoor_fstateGetSpeedNed_f (void)
 Get ground speed in local NED coordinates (float). More...
 
static struct EnuCoor_fstateGetSpeedEnu_f (void)
 Get ground speed in local ENU coordinates (float). More...
 
static struct EcefCoor_fstateGetSpeedEcef_f (void)
 Get ground speed in ECEF coordinates (float). More...
 
static float stateGetHorizontalSpeedNorm_f (void)
 Get norm of horizontal ground speed (float). More...
 
static float stateGetHorizontalSpeedDir_f (void)
 Get dir of horizontal ground speed (float). More...
 
static struct Int32Vect3stateGetAccelBody_i (void)
 Get acceleration in Body coordinates (int). More...
 

Variables

uint16_t State::speed_status
 Holds the status bits for all ground speed representations. More...
 
struct EcefCoor_i State::ecef_speed_i
 Velocity in EarthCenteredEarthFixed coordinates. More...
 
struct NedCoor_i State::ned_speed_i
 Velocity in North East Down coordinates. More...
 
struct EnuCoor_i State::enu_speed_i
 Velocity in East North Up coordinates. More...
 
uint32_t State::h_speed_norm_i
 Norm of horizontal ground speed. More...
 
int32_t State::h_speed_dir_i
 Direction of horizontal ground speed. More...
 
struct EcefCoor_f State::ecef_speed_f
 Velocity in EarthCenteredEarthFixed coordinates. More...
 
struct NedCoor_f State::ned_speed_f
 speed in North East Down coordinates More...
 
struct EnuCoor_f State::enu_speed_f
 Velocity in East North Up coordinates. More...
 
float State::h_speed_norm_f
 Norm of horizontal ground speed. More...
 
float State::h_speed_dir_f
 Direction of horizontal ground speed. More...
 

Detailed Description

Macro Definition Documentation

#define SPEED_HDIR_F   9
#define SPEED_HDIR_I   4
#define SPEED_HNORM_F   8
#define SPEED_HNORM_I   3
#define SPEED_LOCAL_COORD   ((1<<SPEED_NED_I)|(1<<SPEED_ENU_I)|(1<<SPEED_NED_F)|(1<<SPEED_ENU_F))

Definition at line 95 of file state.h.

Referenced by stateSetLocalUtmOrigin_f().

Function Documentation

void stateCalcSpeedEcef_f ( void  )

Definition at line 978 of file state.c.

References ecef_of_ned_vect_f(), State::ecef_speed_f, State::ned_origin_f, State::ned_speed_f, State::ned_speed_i, SPEED_ECEF_F, SPEED_ECEF_I, SPEED_NED_F, SPEED_NED_I, State::speed_status, SPEEDS_FLOAT_OF_BFP, and state.

Referenced by stateGetSpeedEcef_f().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stateCalcSpeedEcef_i ( void  )

Definition at line 776 of file state.c.

References ecef_of_ned_vect_i(), State::ecef_speed_f, State::ecef_speed_i, State::ned_origin_i, State::ned_speed_f, State::ned_speed_i, SPEED_ECEF_F, SPEED_ECEF_I, SPEED_NED_F, SPEED_NED_I, State::speed_status, SPEEDS_BFP_OF_REAL, and state.

Referenced by stateGetSpeedEcef_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct Int32Vect3* stateGetAccelBody_i ( void  )
static

Get acceleration in Body coordinates (int).

Definition at line 953 of file state.h.

References State::body_accel_i, and state.

Referenced by hff_propagate(), and lms_estimation().

+ Here is the caller graph for this function:

static float stateGetHorizontalSpeedDir_f ( void  )
inlinestatic

Get dir of horizontal ground speed (float).

Definition at line 944 of file state.h.

References State::h_speed_dir_f, SPEED_HDIR_F, State::speed_status, state, and stateCalcHorizontalSpeedDir_f().

Referenced by cam_target(), dc_send_shot_position(), fly_to_xy(), formation_flight(), gvf_control_2D(), h_ctl_course_loop(), nav_survey_losange_carto(), nav_survey_rectangle_init(), potential_task(), snav_init(), and tcas_periodic_task_1Hz().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int32_t stateGetHorizontalSpeedDir_i ( void  )
inlinestatic

Get dir of horizontal ground speed (int).

Definition at line 899 of file state.h.

References State::h_speed_dir_i, SPEED_HDIR_I, State::speed_status, state, and stateCalcHorizontalSpeedDir_i().

Referenced by dc_send_command().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static float stateGetHorizontalSpeedNorm_f ( void  )
inlinestatic
static uint32_t stateGetHorizontalSpeedNorm_i ( void  )
inlinestatic

Get norm of horizontal ground speed (int).

Definition at line 890 of file state.h.

References State::h_speed_norm_i, SPEED_HNORM_I, State::speed_status, state, and stateCalcHorizontalSpeedNorm_i().

Referenced by dc_send_command(), and hott_update_eam_msg().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct EcefCoor_f* stateGetSpeedEcef_f ( void  )
static

Get ground speed in ECEF coordinates (float).

Definition at line 926 of file state.h.

References State::ecef_speed_f, SPEED_ECEF_F, State::speed_status, state, and stateCalcSpeedEcef_f().

+ Here is the call graph for this function:

static struct EcefCoor_i* stateGetSpeedEcef_i ( void  )
static

Get ground speed in ECEF coordinates (int).

Definition at line 881 of file state.h.

References State::ecef_speed_i, SPEED_ECEF_I, State::speed_status, state, and stateCalcSpeedEcef_i().

+ Here is the call graph for this function:

static struct EnuCoor_f* stateGetSpeedEnu_f ( void  )
static
static struct EnuCoor_i* stateGetSpeedEnu_i ( void  )
static

Get ground speed in local ENU coordinates (int).

Definition at line 872 of file state.h.

References State::enu_speed_i, SPEED_ENU_I, State::speed_status, state, and stateCalcSpeedEnu_i().

Referenced by hott_update_eam_msg(), nav_approaching_from(), and send_fp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct NedCoor_f* stateGetSpeedNed_f ( void  )
static

Get ground speed in local NED coordinates (float).

Definition at line 908 of file state.h.

References State::ned_speed_f, SPEED_NED_F, State::speed_status, state, and stateCalcSpeedNed_f().

Referenced by autopilot_check_in_flight(), guidance_indi_run(), ins_alt_float_update_baro(), mavlink_send_global_position_int(), mavlink_send_local_position_ned(), mavlink_send_vfr_hud(), OA_update(), range_msg_callback(), and wind_estimator_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void stateSetAccelBody_i ( struct Int32Vect3 body_accel)
inlinestatic

Set acceleration in Body coordinates (int).

Definition at line 855 of file state.h.

References State::body_accel_i, state, and VECT3_COPY.

Referenced by ins_float_invariant_propagate(), ins_int_propagate(), and ins_module_propagate().

+ Here is the caller graph for this function:

static void stateSetSpeed_f ( struct EcefCoor_f ecef_speed,
struct NedCoor_f ned_speed,
struct EnuCoor_f enu_speed 
)
inlinestatic

Set multiple speed coordinates (float).

Definition at line 833 of file state.h.

References State::ecef_speed_f, State::enu_speed_f, State::ned_speed_f, SPEED_ECEF_F, SPEED_ENU_F, SPEED_NED_F, State::speed_status, state, and VECT3_COPY.

static void stateSetSpeed_i ( struct EcefCoor_i ecef_speed,
struct NedCoor_i ned_speed,
struct EnuCoor_i enu_speed 
)
inlinestatic

Set multiple speed coordinates (int).

Definition at line 787 of file state.h.

References State::ecef_speed_i, State::enu_speed_i, State::ned_speed_i, SPEED_ECEF_I, SPEED_ENU_I, SPEED_NED_I, State::speed_status, state, and VECT3_COPY.

static void stateSetSpeedEcef_f ( struct EcefCoor_f ecef_speed)
inlinestatic

Set ground speed in ECEF coordinates (float).

Definition at line 825 of file state.h.

References State::ecef_speed_f, SPEED_ECEF_F, State::speed_status, state, and VECT3_COPY.

static void stateSetSpeedEcef_i ( struct EcefCoor_i ecef_speed)
inlinestatic

Set ground speed in ECEF coordinates (int).

Definition at line 779 of file state.h.

References State::ecef_speed_i, SPEED_ECEF_I, State::speed_status, state, and VECT3_COPY.

static void stateSetSpeedEnu_f ( struct EnuCoor_f enu_speed)
inlinestatic

Set ground speed in local ENU coordinates (float).

Definition at line 817 of file state.h.

References State::enu_speed_f, SPEED_ENU_F, State::speed_status, state, and VECT3_COPY.

static void stateSetSpeedEnu_i ( struct EnuCoor_i enu_speed)
inlinestatic

Set ground speed in local ENU coordinates (int).

Definition at line 771 of file state.h.

References State::enu_speed_i, SPEED_ENU_I, State::speed_status, state, and VECT3_COPY.

static void stateSetSpeedNed_f ( struct NedCoor_f ned_speed)
inlinestatic

Set ground speed in local NED coordinates (float).

Definition at line 809 of file state.h.

References State::ned_speed_f, SPEED_NED_F, State::speed_status, state, and VECT3_COPY.

Referenced by gps_cb(), ins_alt_float_update_baro(), ins_alt_float_update_gps(), ins_float_invariant_propagate(), ins_vectornav_propagate(), set_state_from_ins(), and sim_overwrite_ins().

+ Here is the caller graph for this function:

static void stateSetSpeedNed_i ( struct NedCoor_i ned_speed)
inlinestatic

Set ground speed in local NED coordinates (int).

Definition at line 763 of file state.h.

References State::ned_speed_i, SPEED_NED_I, State::speed_status, state, and VECT3_COPY.

Referenced by gps_cb(), and ins_ned_to_state().

+ Here is the caller graph for this function:

Variable Documentation

struct EcefCoor_i State::ecef_speed_i
float State::h_speed_dir_f

Direction of horizontal ground speed.

Unit: rad (clockwise, zero=north)

Definition at line 321 of file state.h.

Referenced by max7456_periodic(), stateCalcHorizontalSpeedDir_f(), stateCalcHorizontalSpeedDir_i(), and stateGetHorizontalSpeedDir_f().

int32_t State::h_speed_dir_i

Direction of horizontal ground speed.

Unit: rad in BFP with INT32_ANGLE_FRAC (clockwise, zero=north)

Definition at line 292 of file state.h.

Referenced by stateCalcHorizontalSpeedDir_f(), stateCalcHorizontalSpeedDir_i(), and stateGetHorizontalSpeedDir_i().

float State::h_speed_norm_f

Norm of horizontal ground speed.

Unit: m/s

Definition at line 315 of file state.h.

Referenced by max7456_periodic(), stateCalcHorizontalSpeedNorm_f(), stateCalcHorizontalSpeedNorm_i(), and stateGetHorizontalSpeedNorm_f().

uint32_t State::h_speed_norm_i

Norm of horizontal ground speed.

Unit: m/s in BFP with INT32_SPEED_FRAC

Definition at line 285 of file state.h.

Referenced by stateCalcHorizontalSpeedNorm_f(), stateCalcHorizontalSpeedNorm_i(), and stateGetHorizontalSpeedNorm_i().