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

Integrated Navigation System interface. More...

#include "subsystems/ins.h"
#include "subsystems/gps.h"
#include "state.h"
+ Include dependency graph for ins.c:

Go to the source code of this file.

Data Structures

struct  Ins
 Inertial Navigation System state. More...
 

Macros

#define __DefaultInsRegister(_x)   _x ## _register()
 
#define _DefaultInsRegister(_x)   __DefaultInsRegister(_x)
 
#define DefaultInsRegister()   _DefaultInsRegister(DefaultInsImpl)
 

Functions

void ins_register_impl (InsInit init)
 
void ins_init (void)
 INS initialization. More...
 
void WEAK ins_reset_local_origin (void)
 INS local origin reset. More...
 
void WEAK ins_reset_altitude_ref (void)
 INS altitude reference reset. More...
 
void WEAK ins_reset_utm_zone (struct UtmCoor_f *utm)
 INS utm zone reset. More...
 

Variables

struct Ins ins
 

Detailed Description

Integrated Navigation System interface.

Definition in file ins.c.


Data Structure Documentation

struct Ins

Inertial Navigation System state.

Definition at line 47 of file ins.c.

Data Fields
InsInit init

Macro Definition Documentation

#define __DefaultInsRegister (   _x)    _x ## _register()

Definition at line 42 of file ins.c.

#define _DefaultInsRegister (   _x)    __DefaultInsRegister(_x)

Definition at line 43 of file ins.c.

#define DefaultInsRegister ( )    _DefaultInsRegister(DefaultInsImpl)

Definition at line 44 of file ins.c.

Referenced by ins_init().

Function Documentation

void ins_init ( void  )

INS initialization.

Called at startup. Initializes the global ins struct.

Definition at line 60 of file ins.c.

References DefaultInsRegister, Ins::init, and ins.

Referenced by init_ap(), and main_init().

+ Here is the caller graph for this function:

void ins_register_impl ( InsInit  init)

Definition at line 53 of file ins.c.

References Ins::init, init, and ins.

Referenced by ins_altf_register(), ins_float_invariant_register(), ins_gps_passthrough_register(), ins_gps_utm_register(), ins_int_register(), and ins_vectornav_register().

+ Here is the caller graph for this function:

void WEAK 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 95 of file ins.c.

References UtmCoor_f::alt, gps, GpsState::hmsl, ins_altf, InsAltFloat::reset_alt_ref, state, stateSetLocalUtmOrigin_f(), TRUE, and State::utm_origin_f.

+ Here is the call graph for this function:

void WEAK 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 72 of file ins.c.

References UtmCoor_f::alt, UtmCoor_f::east, UtmCoor_i::east, gps, GpsState::hmsl, ins_altf, LLA_FLOAT_OF_BFP, GpsState::lla_pos, LlaCoor_i::lon, UtmCoor_f::north, UtmCoor_i::north, InsAltFloat::reset_alt_ref, stateSetLocalUtmOrigin_f(), TRUE, utm_of_lla_f(), GpsState::utm_pos, UtmCoor_f::zone, and UtmCoor_i::zone.

+ Here is the call graph for this function:

void WEAK ins_reset_utm_zone ( struct UtmCoor_f utm)

INS utm zone reset.

Reset UTM zone according te the actual position. Only used with fixedwing firmware. Can be overwritte by specifc INS implementation.

Parameters
utminitial utm zone, returns the corrected utm position

Definition at line 98 of file ins.c.

References gps, lla_of_utm_f(), GpsState::lla_pos, LlaCoor_i::lon, stateSetLocalUtmOrigin_f(), utm_of_lla_f(), GpsState::utm_pos, UtmCoor_f::zone, and UtmCoor_i::zone.

Referenced by nav_reset_utm_zone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct Ins ins

Definition at line 51 of file ins.c.

Referenced by ins_init(), and ins_register_impl().