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_alt_float.c File Reference

Filters altitude and climb rate for fixedwings. More...

#include "subsystems/ins.h"
#include <inttypes.h>
#include <math.h>
#include "state.h"
#include "subsystems/gps.h"
#include "subsystems/nav.h"
#include "generated/airframe.h"
#include "generated/modules.h"
#include "subsystems/sensors/baro.h"
+ Include dependency graph for ins_alt_float.c:

Go to the source code of this file.

Macros

#define ALT_KALMAN_ENABLED   FALSE
 
#define GPS_DT   0.25
 
#define GPS_SIGMA2   1.
 
#define GPS_R   2.
 
#define BARO_DT   0.1
 

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...
 
void alt_kalman_reset (void)
 
void alt_kalman_init (void)
 
void alt_kalman (float z_meas)
 

Variables

float ins_alt
 estimated altitude above MSL in meters More...
 
float ins_alt_dot
 estimated vertical speed in m/s (positive-up) More...
 
int32_t ins_qfe
 
bool_t ins_baro_initialised
 
float ins_baro_alt
 
bool_t alt_kalman_enabled
 
static float p [2][2]
 

Detailed Description

Filters altitude and climb rate for fixedwings.

Definition in file ins_alt_float.c.

Macro Definition Documentation

#define ALT_KALMAN_ENABLED   FALSE

Definition at line 151 of file ins_alt_float.c.

Referenced by alt_kalman_init().

#define BARO_DT   0.1

Definition at line 160 of file ins_alt_float.c.

Referenced by alt_kalman().

#define GPS_DT   0.25

Definition at line 155 of file ins_alt_float.c.

Referenced by alt_kalman().

#define GPS_R   2.

Definition at line 158 of file ins_alt_float.c.

Referenced by alt_kalman().

#define GPS_SIGMA2   1.

Definition at line 157 of file ins_alt_float.c.

Referenced by alt_kalman().

Function Documentation

void alt_kalman_init ( void  )

Definition at line 171 of file ins_alt_float.c.

References ALT_KALMAN_ENABLED, and alt_kalman_reset().

Referenced by ins_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void alt_kalman_reset ( void  )

Definition at line 164 of file ins_alt_float.c.

Referenced by alt_kalman_init().

+ Here is the caller graph for this function:

void ins_init ( void  )

INS initialization.

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

Definition at line 55 of file ins_alt_float.c.

References alt_kalman_init(), EstimatorSetAlt, FALSE, ground_alt, ins, ins_baro_alt, ins_baro_initialised, ins_qfe, nav_utm_east0, nav_utm_north0, nav_utm_zone0, stateSetLocalUtmOrigin_f(), stateSetPositionUtm_f(), and Ins::vf_realign.

+ 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 75 of file ins_alt_float.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. Needs to be implemented by each INS algorithm.

Definition at line 84 of file ins_alt_float.c.

Referenced by on_gyro_accel_event(), and on_gyro_event().

+ Here is the caller 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 78 of file ins_alt_float.c.

Referenced by track_event().

+ Here is the caller 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 81 of file ins_alt_float.c.

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 87 of file ins_alt_float.c.

Referenced by on_baro_abs_event().

+ Here is the caller graph for this function:

void ins_update_gps ( void  )

Update INS state with GPS measurements.

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

Definition at line 119 of file ins_alt_float.c.

Referenced by on_gps_event(), and on_gps_solution().

+ Here is the caller 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 145 of file ins_alt_float.c.

Variable Documentation

bool_t alt_kalman_enabled

Definition at line 148 of file ins_alt_float.c.

float ins_alt

estimated altitude above MSL in meters

Definition at line 44 of file ins_alt_float.c.

Referenced by alt_kalman(), ins_update_baro(), and ins_update_gps().

float ins_alt_dot

estimated vertical speed in m/s (positive-up)

Definition at line 45 of file ins_alt_float.c.

Referenced by alt_kalman(), ins_update_baro(), and ins_update_gps().

float ins_baro_alt

Definition at line 52 of file ins_alt_float.c.

Referenced by ins_init(), and ins_update_baro().

bool_t ins_baro_initialised

Definition at line 51 of file ins_alt_float.c.

Referenced by ins_init(), and ins_update_baro().

int32_t ins_qfe

Definition at line 50 of file ins_alt_float.c.

Referenced by ins_init(), and ins_update_baro().