Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_ardrone2.c File Reference

INS implementation for ardrone2-sdk. More...

#include "subsystems/ins/ins_ardrone2.h"
#include "subsystems/ahrs.h"
#include "subsystems/gps.h"
#include "generated/airframe.h"
#include "generated/flight_plan.h"
#include "math/pprz_geodetic_int.h"
+ Include dependency graph for ins_ardrone2.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_reset_local_origin (void)
 INS local origin reset. More...
 
void ins_reset_altitude_ref (void)
 INS altitude reference reset. More...
 
void ins_propagate ()
 Propagation. More...
 
void ins_update_gps (void)
 Update INS state with GPS measurements. More...
 

Variables

struct InsArdrone2 ins_impl
 global INS state More...
 

Detailed Description

INS implementation for ardrone2-sdk.

Definition in file ins_ardrone2.c.

Macro Definition Documentation

#define USE_INS_NAV_INIT   TRUE

Definition at line 40 of file ins_ardrone2.c.

Function Documentation

void ins_init ( void  )

INS initialization.

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

Definition at line 46 of file ins_ardrone2.c.

References LlaCoor_i::alt, ecef_of_lla_i(), FALSE, LtpDef_i::hmsl, ins_impl, INT32_VECT3_ZERO, LlaCoor_i::lat, LlaCoor_i::lon, InsArdrone2::ltp_accel, InsArdrone2::ltp_def, ltp_def_from_ecef_i(), InsArdrone2::ltp_initialized, InsArdrone2::ltp_pos, InsArdrone2::ltp_speed, stateSetLocalOrigin_i(), and TRUE.

+ Here is the call graph for this function:

void ins_periodic ( void  )

INS periodic call.

Does nothing if not implemented by specific INS algorithm.

Definition at line 71 of file ins_ardrone2.c.

Referenced by sensors_task().

+ Here is the caller graph for this function:

void ins_propagate ( void  )

Propagation.

Usually integrates the gyro rates to angles. Reads the global imu data struct. Does nothing if not implemented by specific INS algorithm.

Definition at line 93 of file ins_ardrone2.c.

Referenced by on_gyro_event().

+ Here is the caller graph for this function:

void ins_reset_altitude_ref ( void  )

INS altitude reference reset.

Reset only vertical reference to the current altitude. Does nothing if not implemented by specific INS algorithm.

Definition at line 80 of file ins_ardrone2.c.

References LlaCoor_i::alt, gps, GpsState::hmsl, LtpDef_i::hmsl, ins_impl, LlaCoor_i::lat, LtpDef_i::lla, GpsState::lla_pos, LlaCoor_i::lon, InsArdrone2::ltp_def, ltp_def_from_lla_i(), State::ned_origin_i, state, and stateSetLocalOrigin_i().

+ Here is the call graph for this function:

void ins_reset_local_origin ( void  )

INS local origin reset.

Reset horizontal and vertical reference to the current position. Does nothing if not implemented by specific INS algorithm.

INS local origin reset.

Definition at line 76 of file ins_ardrone2.c.

References FALSE, ins_impl, and InsArdrone2::ltp_initialized.

void ins_update_gps ( void  )

Update INS state with GPS measurements.

Reads the global gps data struct. Does nothing if not implemented by specific INS algorithm.

Definition at line 114 of file ins_ardrone2.c.

References LlaCoor_i::alt, GpsState::ecef_pos, GpsState::fix, gps, GPS_FIX_3D, GpsState::hmsl, LtpDef_i::hmsl, ins_impl, INT32_POS_OF_CM_DEN, INT32_POS_OF_CM_NUM, INT32_VECT2_SCALE_2, INT32_VECT3_SCALE_2, LtpDef_i::lla, GpsState::lla_pos, InsArdrone2::ltp_def, ltp_def_from_ecef_i(), InsArdrone2::ltp_initialized, InsArdrone2::ltp_pos, ned_of_ecef_point_i(), stateSetLocalOrigin_i(), stateSetPositionNed_i(), and TRUE.

+ Here is the call graph for this function:

Variable Documentation

struct InsArdrone2 ins_impl