Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_int.c File Reference

INS for rotorcrafts combining vertical and horizontal filters. More...

#include "subsystems/ins/ins_int.h"
#include "subsystems/imu.h"
#include "subsystems/sensors/baro.h"
#include "subsystems/gps.h"
#include "generated/airframe.h"
#include "math/pprz_geodetic_int.h"
#include "generated/flight_plan.h"
+ Include dependency graph for ins_int.c:

Go to the source code of this file.

Macros

#define USE_INS_NAV_INIT   TRUE
 

Functions

void ins_init ()
 INS initialization. More...
 
void ins_periodic (void)
 INS periodic call. More...
 
void ins_realign_h (struct FloatVect2 pos, struct FloatVect2 speed)
 INS horizontal realign. More...
 
void ins_realign_v (float z)
 INS vertical realign. More...
 
void ins_propagate ()
 Propagation. More...
 
void ins_update_baro ()
 Update INS state with barometer measurements. More...
 
void ins_update_gps (void)
 Update INS state with GPS measurements. More...
 
void ins_update_sonar ()
 Update INS state with sonar measurements. More...
 

Variables

struct LtpDef_i ins_ltp_def
 Ins implementation state (fixed point) More...
 
bool_t ins_ltp_initialised
 
struct NedCoor_i ins_gps_pos_cm_ned
 
struct NedCoor_i ins_gps_speed_cm_s_ned
 
struct NedCoor_i ins_ltp_pos
 
struct NedCoor_i ins_ltp_speed
 
struct NedCoor_i ins_ltp_accel
 

Detailed Description

INS for rotorcrafts combining vertical and horizontal filters.

Definition in file ins_int.c.

Macro Definition Documentation

#define USE_INS_NAV_INIT   TRUE

Definition at line 56 of file ins_int.c.

Function Documentation

void ins_init ( void  )

INS initialization.

Called at startup. Needs to be implemented by each INS algorithm.

Definition at line 88 of file ins_int.c.

References LlaCoor_i::alt, b2_hff_init(), ecef_of_lla_i(), FALSE, Ins::hf_realign, LtpDef_i::hmsl, ins, ins_ltp_accel, ins_ltp_def, ins_ltp_pos, ins_ltp_speed, INS_RUNNING, INT32_RAD_OF_DEG, INT32_VECT3_ZERO, LlaCoor_i::lat, LlaCoor_i::lon, ltp_def_from_ecef_i(), stateSetLocalOrigin_i(), Ins::status, TRUE, Ins::vf_realign, and vff_init().

+ Here is the call graph for this function:

void ins_periodic ( void  )

INS periodic call.

Needs to be implemented by each INS algorithm.

Definition at line 129 of file ins_int.c.

void ins_propagate ( void  )

Propagation.

Usually integrates the gyro rates to angles. Reads the global imu data struct. Needs to be implemented by each INS algorithm.

Definition at line 144 of file ins_int.c.

References Imu::accel, ACCEL_BFP_OF_REAL, ACCEL_FLOAT_OF_BFP, b2_hff_propagate(), baro, Imu::body_to_imu_rmat, BS_RUNNING, imu, ins_ltp_accel, ins_ltp_pos, ins_ltp_speed, INS_NED_TO_STATE, INT32_RMAT_TRANSP_VMULT, POS_BFP_OF_REAL, SPEED_BFP_OF_REAL, stateGetNedToBodyRMat_i(), Baro::status, vff_propagate(), vff_z, vff_zdot, vff_zdotdot, NedCoor_i::x, Int32Vect3::x, NedCoor_i::y, Int32Vect3::y, NedCoor_i::z, and Int32Vect3::z.

+ Here is the call graph for this function:

void ins_realign_h ( struct FloatVect2  pos,
struct FloatVect2  speed 
)

INS horizontal realign.

Parameters
posnew horizontal position to set
speednew horizontal speed to set Needs to be implemented by each INS algorithm.

Definition at line 132 of file ins_int.c.

References b2_hff_realign().

+ Here is the call graph for this function:

void ins_realign_v ( float  z)

INS vertical realign.

Parameters
znew altitude to set Needs to be implemented by each INS algorithm.

Definition at line 138 of file ins_int.c.

References vff_realign(), and EcefCoor_i::z.

+ Here is the call graph for this function:

void ins_update_baro ( void  )

Update INS state with barometer measurements.

Reads the global baro data struct. Needs to be implemented by each INS algorithm.

Definition at line 178 of file ins_int.c.

References Baro::absolute, ACCEL_BFP_OF_REAL, baro, BS_RUNNING, FALSE, ins, ins_ltp_accel, ins_ltp_pos, ins_ltp_speed, INS_NED_TO_STATE, ins_qfe, POS_BFP_OF_REAL, POS_FLOAT_OF_BFP, sonar_meas, SPEED_BFP_OF_REAL, Baro::status, TRUE, Ins::vf_realign, vff_realign(), vff_update(), vff_z, vff_zdot, vff_zdotdot, and NedCoor_i::z.

+ Here is the call graph for this function:

void ins_update_sonar ( void  )

Update INS state with sonar measurements.

Reads the global #sonar data struct. Needs to be implemented by each INS algorithm.

Definition at line 265 of file ins_int.c.

References Baro::absolute, baro, BS_RUNNING, sonar_meas, and Baro::status.

Variable Documentation

struct NedCoor_i ins_gps_pos_cm_ned

Definition at line 63 of file ins_int.c.

Referenced by ins_update_gps().

struct NedCoor_i ins_gps_speed_cm_s_ned

Definition at line 64 of file ins_int.c.

Referenced by ins_update_gps().

struct NedCoor_i ins_ltp_accel

Definition at line 85 of file ins_int.c.

Referenced by ins_init(), ins_propagate(), and ins_update_baro().

struct LtpDef_i ins_ltp_def

Ins implementation state (fixed point)

global INS state

Definition at line 61 of file ins_int.c.

Referenced by ins_init(), and ins_update_gps().

bool_t ins_ltp_initialised

Definition at line 62 of file ins_int.c.

struct NedCoor_i ins_ltp_pos

Definition at line 83 of file ins_int.c.

Referenced by ins_init(), ins_propagate(), ins_update_baro(), and ins_update_gps().

struct NedCoor_i ins_ltp_speed

Definition at line 84 of file ins_int.c.

Referenced by ins_init(), ins_propagate(), ins_update_baro(), and ins_update_gps().