Paparazzi UAS  v5.4.2_stable-3-gc351a71
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures 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 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_tstateGetHorizontalSpeedNorm_i (void)
 Get norm of horizontal ground speed (int). More...
 
static int32_tstateGetHorizontalSpeedDir_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...
 

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 93 of file state.h.

Referenced by stateSetLocalUtmOrigin_f().

Function Documentation

void stateCalcSpeedEcef_f ( void  )

Definition at line 865 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 669 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 float* stateGetHorizontalSpeedDir_f ( void  )
inlinestatic

Get dir of horizontal ground speed (float).

Definition at line 921 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(), h_ctl_course_loop(), nav_chemotaxis(), 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 876 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

Get norm of horizontal ground speed (float).

Definition at line 912 of file state.h.

References State::h_speed_norm_f, SPEED_HNORM_F, State::speed_status, state, and stateCalcHorizontalSpeedNorm_f().

Referenced by ArduIMU_periodicGPS(), dc_send_shot_position(), fly_to_xy(), formation_flight(), gls_run(), h_ctl_course_loop(), monitor_task(), nav_approaching_xy(), nav_bungee_takeoff_run(), nav_circle_XY(), potential_task(), tcas_periodic_task_1Hz(), and v_ctl_climb_loop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t* stateGetHorizontalSpeedNorm_i ( void  )
inlinestatic

Get norm of horizontal ground speed (int).

Definition at line 867 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 903 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 858 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

Get ground speed in local ENU coordinates (float).

Definition at line 894 of file state.h.

References State::enu_speed_f, SPEED_ENU_F, State::speed_status, state, and stateCalcSpeedEnu_f().

Referenced by ac_char_update(), formation_flight(), max7456_periodic(), mf_daq_send_state(), parse_mf_daq_msg(), potential_task(), send_estimator(), tcas_periodic_task_1Hz(), v_ctl_climb_auto_throttle_loop(), v_ctl_climb_loop(), v_ctl_set_pitch(), and v_ctl_set_throttle().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct EnuCoor_i* stateGetSpeedEnu_i ( void  )
static

Get ground speed in local ENU coordinates (int).

Definition at line 849 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 885 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(), baro_cb(), mavlink_send_global_position_int(), and mavlink_send_local_position_ned().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct NedCoor_i* stateGetSpeedNed_i ( void  )
static

Get ground speed in local NED coordinates (int).

Definition at line 840 of file state.h.

References State::ned_speed_i, SPEED_NED_I, State::speed_status, state, and stateCalcSpeedNed_i().

Referenced by guidance_h_traj_run(), guidance_v_mode_changed(), guidance_v_run(), reset_guidance_reference_from_current_position(), and run_hover_loop().

+ Here is the call graph for this function:

+ 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 816 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 770 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 808 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 762 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 800 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 754 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 792 of file state.h.

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

Referenced by ahrs_propagate(), baro_cb(), ins_propagate(), and ins_update_gps().

+ 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 746 of file state.h.

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

Referenced by ins_ned_to_state(), and ins_update_gps().

+ 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 316 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 287 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 310 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 280 of file state.h.

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