Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Paparazzi specific wrapper to run simple module based INS. More...
#include "modules/ins/ins_skeleton.h"
#include "modules/core/abi.h"
#include "mcu_periph/sys_time.h"
#include "message_pragmas.h"
#include "state.h"
Go to the source code of this file.
Macros | |
#define | USE_INS_NAV_INIT TRUE |
#define | INS_MODULE_BARO_ID ABI_BROADCAST |
baro More... | |
#define | INS_MODULE_IMU_ID ABI_BROADCAST |
IMU (accel) More... | |
#define | INS_MODULE_GPS_ID GPS_MULTI_ID |
ABI binding for gps data. More... | |
Functions | |
void | ins_module_wrapper_init (void) |
static void | ins_ned_to_state (void) |
copy position and speed to state interface More... | |
static void | reset_cb (uint8_t sender_id UNUSED, uint8_t flag) |
static void | baro_cb (uint8_t sender_id, uint32_t stamp, float pressure) |
static void | accel_cb (uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *accel) |
static void | gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s) |
void WEAK | ins_module_init (void) |
void WEAK | ins_module_update_baro (float pressure) |
void WEAK | ins_module_update_gps (struct GpsState *gps_s, float dt) |
void WEAK | ins_module_propagate (struct Int32Vect3 *accel, float dt) |
void WEAK | ins_module_reset_local_origin (void) |
Variables | |
static abi_event | baro_ev |
static abi_event | accel_ev |
static abi_event | gps_ev |
static abi_event | reset_ev |
struct InsModuleInt | ins_module |
global INS state More... | |
Paparazzi specific wrapper to run simple module based INS.
Definition in file ins_skeleton.c.
#define INS_MODULE_BARO_ID ABI_BROADCAST |
baro
Definition at line 47 of file ins_skeleton.c.
#define INS_MODULE_GPS_ID GPS_MULTI_ID |
#define INS_MODULE_IMU_ID ABI_BROADCAST |
IMU (accel)
Definition at line 54 of file ins_skeleton.c.
#define USE_INS_NAV_INIT TRUE |
Definition at line 35 of file ins_skeleton.c.
|
static |
Definition at line 117 of file ins_skeleton.c.
References ins_module_propagate(), and ins_ned_to_state().
Referenced by ins_module_wrapper_init().
Definition at line 110 of file ins_skeleton.c.
References ins_module_update_baro(), and ins_ned_to_state().
Referenced by ins_module_wrapper_init().
Definition at line 132 of file ins_skeleton.c.
References GpsState::fix, InsModuleInt::gps, GPS_FIX_3D, ins_module, ins_module_update_gps(), ins_ned_to_state(), INS_RESET_REF, InsModuleInt::ltp_initialized, and reset_cb().
Referenced by ins_module_wrapper_init().
void WEAK ins_module_init | ( | void | ) |
Definition at line 161 of file ins_skeleton.c.
Referenced by ins_module_wrapper_init().
void WEAK ins_module_propagate | ( | struct Int32Vect3 * | accel, |
float | dt | ||
) |
Definition at line 197 of file ins_skeleton.c.
References ins_module, int32_rmat_transp_vmult(), InsModuleInt::ltp_accel, stateGetNedToBodyRMat_i(), stateSetAccelBody_i(), and VECT3_COPY.
Referenced by accel_cb().
void WEAK ins_module_reset_local_origin | ( | void | ) |
Definition at line 207 of file ins_skeleton.c.
Referenced by reset_cb().
void WEAK ins_module_update_baro | ( | float | pressure | ) |
Definition at line 165 of file ins_skeleton.c.
Referenced by baro_cb().
void WEAK ins_module_update_gps | ( | struct GpsState * | gps_s, |
float | dt | ||
) |
Definition at line 169 of file ins_skeleton.c.
References GpsState::ecef_pos, GpsState::ecef_vel, GPS_VALID_POS_ECEF_BIT, GPS_VALID_VEL_ECEF_BIT, GPS_VALID_VEL_NED_BIT, ins_module, INT32_POS_OF_CM_DEN, INT32_POS_OF_CM_NUM, INT32_SPEED_OF_CM_S_DEN, INT32_SPEED_OF_CM_S_NUM, INT32_VECT3_SCALE_2, InsModuleInt::ltp_def, InsModuleInt::ltp_pos, InsModuleInt::ltp_speed, ned_of_ecef_point_i(), ned_of_ecef_vect_i(), GpsState::ned_vel, and GpsState::valid_fields.
Referenced by gps_cb().
void ins_module_wrapper_init | ( | void | ) |
Definition at line 212 of file ins_skeleton.c.
References ABI_BROADCAST, accel_cb(), accel_ev, baro_cb(), baro_ev, gps_cb(), gps_ev, ins_init_origin_i_from_flightplan(), ins_module, INS_MODULE_BARO_ID, INS_MODULE_GPS_ID, INS_MODULE_IMU_ID, ins_module_init(), INT32_VECT3_ZERO, InsModuleInt::ltp_accel, InsModuleInt::ltp_def, InsModuleInt::ltp_initialized, InsModuleInt::ltp_pos, InsModuleInt::ltp_speed, reset_cb(), and reset_ev.
|
static |
copy position and speed to state interface
Definition at line 76 of file ins_skeleton.c.
References ins_module, InsModuleInt::ltp_accel, InsModuleInt::ltp_pos, InsModuleInt::ltp_speed, nps_bypass_ins, sim_overwrite_ins(), stateSetAccelNed_i(), stateSetPositionNed_i(), and stateSetSpeedNed_i().
Referenced by accel_cb(), baro_cb(), and gps_cb().
Definition at line 93 of file ins_skeleton.c.
References LlaCoor_i::alt, GpsState::ecef_pos, GpsState::fix, InsModuleInt::gps, GPS_FIX_3D, LtpDef_i::hmsl, GpsState::hmsl, ins_module, ins_module_reset_local_origin(), INS_RESET_REF, LtpDef_i::lla, GpsState::lla_pos, InsModuleInt::ltp_def, ltp_def_from_ecef_i(), InsModuleInt::ltp_initialized, and stateSetLocalOrigin_i().
Referenced by gps_cb(), and ins_module_wrapper_init().
|
static |
Definition at line 67 of file ins_skeleton.c.
Referenced by ins_module_wrapper_init().
|
static |
Definition at line 66 of file ins_skeleton.c.
Referenced by ins_module_wrapper_init().
|
static |
Definition at line 68 of file ins_skeleton.c.
Referenced by ins_module_wrapper_init().
struct InsModuleInt ins_module |
global INS state
Definition at line 69 of file ins_skeleton.c.
Referenced by gps_cb(), ins_module_propagate(), ins_module_update_gps(), ins_module_wrapper_init(), ins_ned_to_state(), and reset_cb().
|
static |
Definition at line 69 of file ins_skeleton.c.
Referenced by ins_module_wrapper_init().