Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Acceleration representations
+ Collaboration diagram for Acceleration representations:

Macros

#define ACCEL_ECEF_I   0
 
#define ACCEL_NED_I   1
 
#define ACCEL_ECEF_F   2
 
#define ACCEL_NED_F   3
 

Functions

void stateCalcAccelNed_i (void)
 
void stateCalcAccelEcef_i (void)
 
void stateCalcAccelNed_f (void)
 
void stateCalcAccelEcef_f (void)
 
static bool stateIsAccelValid (void)
 Test if accelerations are valid. More...
 
static void stateSetAccelNed_i (uint16_t id, struct NedCoor_i *ned_accel)
 Set acceleration in NED coordinates (int). More...
 
static void stateSetAccelEcef_i (uint16_t id, struct EcefCoor_i *ecef_accel)
 Set acceleration in ECEF coordinates (int). More...
 
static void stateSetAccelNed_f (uint16_t id, struct NedCoor_f *ned_accel)
 Set acceleration in NED coordinates (float). More...
 
static void stateSetAccelEcef_f (uint16_t id, struct EcefCoor_f *ecef_accel)
 Set acceleration in ECEF coordinates (float). More...
 
static void stateSetAccelBody_i (uint16_t id, struct Int32Vect3 *body_accel)
 Set acceleration in Body coordinates (int). More...
 
static struct NedCoor_istateGetAccelNed_i (void)
 Get acceleration in NED coordinates (int). More...
 
static struct EcefCoor_istateGetAccelEcef_i (void)
 Get acceleration in ECEF coordinates (int). More...
 
static struct NedCoor_fstateGetAccelNed_f (void)
 Get acceleration in NED coordinates (float). More...
 
static struct EcefCoor_fstateGetAccelEcef_f (void)
 Get acceleration in ECEF coordinates (float). More...
 

Variables

uint8_t State::accel_status
 Holds the status bits for all acceleration representations. More...
 
uint16_t State::accel_input_filter
 Holds the input filter id for acceleration. More...
 
struct Int32Vect3 State::body_accel_i
 Acceleration in Body coordinates. More...
 
struct NedCoor_i State::ned_accel_i
 Acceleration in North East Down coordinates. More...
 
struct EcefCoor_i State::ecef_accel_i
 Acceleration in EarthCenteredEarthFixed coordinates. More...
 
struct NedCoor_f State::ned_accel_f
 Acceleration in North East Down coordinates. More...
 
struct EcefCoor_f State::ecef_accel_f
 Acceleration in EarthCenteredEarthFixed coordinates. More...
 

Detailed Description

Macro Definition Documentation

◆ ACCEL_ECEF_F

#define ACCEL_ECEF_F   2

Definition at line 108 of file state.h.

◆ ACCEL_ECEF_I

#define ACCEL_ECEF_I   0

Definition at line 106 of file state.h.

◆ ACCEL_NED_F

#define ACCEL_NED_F   3

Definition at line 109 of file state.h.

◆ ACCEL_NED_I

#define ACCEL_NED_I   1

Definition at line 107 of file state.h.

Function Documentation

◆ stateCalcAccelEcef_f()

void stateCalcAccelEcef_f ( void  )

Definition at line 1315 of file state.c.

References ACCEL_ECEF_F, ACCEL_ECEF_I, ACCEL_NED_F, ACCEL_NED_I, State::accel_status, ACCELS_FLOAT_OF_BFP, State::ecef_accel_f, ecef_of_ned_vect_f(), State::ned_accel_f, State::ned_accel_i, State::ned_initialized_f, State::ned_origin_f, and state.

Referenced by stateGetAccelEcef_f().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateCalcAccelEcef_i()

void stateCalcAccelEcef_i ( void  )

Definition at line 1250 of file state.c.

References ACCEL_ECEF_F, ACCEL_ECEF_I, ACCEL_NED_F, ACCEL_NED_I, State::accel_status, ACCELS_BFP_OF_REAL, State::ecef_accel_f, State::ecef_accel_i, ecef_of_ned_vect_i(), State::ned_accel_f, State::ned_accel_i, State::ned_initialized_i, State::ned_origin_i, and state.

Referenced by stateGetAccelEcef_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateCalcAccelNed_f()

void stateCalcAccelNed_f ( void  )

Definition at line 1282 of file state.c.

References ACCEL_ECEF_F, ACCEL_ECEF_I, ACCEL_NED_F, ACCEL_NED_I, State::accel_status, ACCELS_FLOAT_OF_BFP, State::ecef_accel_f, State::ecef_accel_i, State::ned_accel_f, State::ned_accel_i, State::ned_initialized_f, ned_of_ecef_vect_f(), State::ned_origin_f, and state.

Referenced by stateGetAccelNed_f().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateCalcAccelNed_i()

void stateCalcAccelNed_i ( void  )

Definition at line 1217 of file state.c.

References ACCEL_ECEF_F, ACCEL_ECEF_I, ACCEL_NED_F, ACCEL_NED_I, State::accel_status, ACCELS_BFP_OF_REAL, State::ecef_accel_f, State::ecef_accel_i, State::ned_accel_f, State::ned_accel_i, State::ned_initialized_i, ned_of_ecef_vect_i(), State::ned_origin_i, and state.

Referenced by stateGetAccelNed_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateGetAccelEcef_f()

static struct EcefCoor_f* stateGetAccelEcef_f ( void  )
inlinestatic

Get acceleration in ECEF coordinates (float).

Definition at line 1204 of file state.h.

References ACCEL_ECEF_F, State::accel_status, State::ecef_accel_f, state, and stateCalcAccelEcef_f().

+ Here is the call graph for this function:

◆ stateGetAccelEcef_i()

static struct EcefCoor_i* stateGetAccelEcef_i ( void  )
inlinestatic

Get acceleration in ECEF coordinates (int).

Definition at line 1186 of file state.h.

References ACCEL_ECEF_I, State::accel_status, State::ecef_accel_i, state, and stateCalcAccelEcef_i().

+ Here is the call graph for this function:

◆ stateGetAccelNed_f()

static struct NedCoor_f* stateGetAccelNed_f ( void  )
inlinestatic

◆ stateGetAccelNed_i()

static struct NedCoor_i* stateGetAccelNed_i ( void  )
inlinestatic

Get acceleration in NED coordinates (int).

Definition at line 1177 of file state.h.

References ACCEL_NED_I, State::accel_status, State::ned_accel_i, state, and stateCalcAccelNed_i().

Referenced by ekf_aw_wrapper_fetch(), guidance_v_run(), ins_vectornav_propagate(), save_shot_on_disk(), send_hover_loop(), send_vert_loop(), and stabilization_attitude_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateIsAccelValid()

static bool stateIsAccelValid ( void  )
inlinestatic

Test if accelerations are valid.

Definition at line 1119 of file state.h.

References State::accel_status, and state.

◆ stateSetAccelBody_i()

static void stateSetAccelBody_i ( uint16_t  id,
struct Int32Vect3 body_accel 
)
inlinestatic

Set acceleration in Body coordinates (int).

Definition at line 1167 of file state.h.

References State::accel_input_filter, State::body_accel_i, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.

Referenced by accel_cb(), ekf_run(), ins_ekf2_publish_attitude(), ins_float_invariant_propagate(), ins_int_propagate(), and ins_module_propagate().

+ Here is the caller graph for this function:

◆ stateSetAccelEcef_f()

static void stateSetAccelEcef_f ( uint16_t  id,
struct EcefCoor_f ecef_accel 
)
inlinestatic

Set acceleration in ECEF coordinates (float).

Definition at line 1157 of file state.h.

References ACCEL_ECEF_F, State::accel_input_filter, State::accel_status, State::ecef_accel_f, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.

◆ stateSetAccelEcef_i()

static void stateSetAccelEcef_i ( uint16_t  id,
struct EcefCoor_i ecef_accel 
)
inlinestatic

Set acceleration in ECEF coordinates (int).

Definition at line 1137 of file state.h.

References ACCEL_ECEF_I, State::accel_input_filter, State::accel_status, State::ecef_accel_i, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.

◆ stateSetAccelNed_f()

static void stateSetAccelNed_f ( uint16_t  id,
struct NedCoor_f ned_accel 
)
inlinestatic

Set acceleration in NED coordinates (float).

Definition at line 1147 of file state.h.

References State::accel_input_filter, ACCEL_NED_F, State::accel_status, State::ned_accel_f, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.

Referenced by ArduIMU_event(), ekf_run(), ins_ekf2_update(), ins_float_invariant_propagate(), ins_vectornav_propagate(), set_state_from_ins(), and sim_overwrite_ins().

+ Here is the caller graph for this function:

◆ stateSetAccelNed_i()

static void stateSetAccelNed_i ( uint16_t  id,
struct NedCoor_i ned_accel 
)
inlinestatic

Set acceleration in NED coordinates (int).

Definition at line 1127 of file state.h.

References State::accel_input_filter, ACCEL_NED_I, State::accel_status, State::ned_accel_i, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.

Referenced by accel_cb(), and ins_ned_to_state().

+ Here is the caller graph for this function:

Variable Documentation

◆ accel_input_filter

uint16_t State::accel_input_filter

Holds the input filter id for acceleration.

Definition at line 370 of file state.h.

Referenced by stateGetEcefOrigin_f(), stateInit(), stateSetAccelBody_i(), stateSetAccelEcef_f(), stateSetAccelEcef_i(), stateSetAccelNed_f(), and stateSetAccelNed_i().

◆ accel_status

uint8_t State::accel_status

◆ body_accel_i

struct Int32Vect3 State::body_accel_i

Acceleration in Body coordinates.

Units: m/s^2 in BFP with INT32_ACCEL_FRAC

Definition at line 370 of file state.h.

Referenced by stateGetAccelBody_i(), and stateSetAccelBody_i().

◆ ecef_accel_f

struct EcefCoor_f State::ecef_accel_f

Acceleration in EarthCenteredEarthFixed coordinates.

Units: m/s^2

Definition at line 370 of file state.h.

Referenced by stateCalcAccelEcef_f(), stateCalcAccelEcef_i(), stateCalcAccelNed_f(), stateCalcAccelNed_i(), stateGetAccelEcef_f(), and stateSetAccelEcef_f().

◆ ecef_accel_i

struct EcefCoor_i State::ecef_accel_i

Acceleration in EarthCenteredEarthFixed coordinates.

Units: m/s^2 in BFP with INT32_ACCEL_FRAC

Definition at line 370 of file state.h.

Referenced by stateCalcAccelEcef_i(), stateCalcAccelNed_f(), stateCalcAccelNed_i(), stateGetAccelEcef_i(), and stateSetAccelEcef_i().

◆ ned_accel_f

struct NedCoor_f State::ned_accel_f

Acceleration in North East Down coordinates.

Units: m/s^2

Definition at line 370 of file state.h.

Referenced by stateCalcAccelEcef_f(), stateCalcAccelEcef_i(), stateCalcAccelNed_f(), stateCalcAccelNed_i(), stateGetAccelNed_f(), and stateSetAccelNed_f().

◆ ned_accel_i

struct NedCoor_i State::ned_accel_i

Acceleration in North East Down coordinates.

Units: m/s^2 in BFP with INT32_ACCEL_FRAC

Definition at line 370 of file state.h.

Referenced by stateCalcAccelEcef_f(), stateCalcAccelEcef_i(), stateCalcAccelNed_f(), stateCalcAccelNed_i(), stateGetAccelNed_i(), and stateSetAccelNed_i().