Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
guidance_v_adapt.h File Reference

Adaptation block of the vertical guidance. More...

#include "std.h"
+ Include dependency graph for guidance_v_adapt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GV_ADAPT_X_FRAC   24
 
#define GV_ADAPT_P_FRAC   18
 

Functions

void gv_adapt_init (void)
 
void gv_adapt_run (int32_t zdd_meas, int32_t thrust_applied, int32_t zd_ref)
 Adaptation function. More...
 

Variables

int32_t gv_adapt_X
 State of the estimator. More...
 
int32_t gv_adapt_P
 Covariance. More...
 
int32_t gv_adapt_Xmeas
 Measurement. More...
 

Detailed Description

Adaptation block of the vertical guidance.

This is a dimension one kalman filter estimating the ratio of vertical acceleration over thrust command ( ~ inverse of the mass ) needed by the invert dynamic model to produce a nominal command.

Definition in file guidance_v_adapt.h.

Macro Definition Documentation

#define GV_ADAPT_P_FRAC   18

Definition at line 47 of file guidance_v_adapt.h.

Referenced by gv_adapt_run().

#define GV_ADAPT_X_FRAC   24

Definition at line 40 of file guidance_v_adapt.h.

Referenced by gv_adapt_run(), and run_hover_loop().

Function Documentation

void gv_adapt_init ( void  )

Definition at line 115 of file guidance_v_adapt.c.

References gv_adapt_P0, and gv_adapt_X0.

Referenced by guidance_v_init(), guidance_v_notify_in_flight(), and guidance_v_run().

+ Here is the caller graph for this function:

void gv_adapt_run ( int32_t  zdd_meas,
int32_t  thrust_applied,
int32_t  zd_ref 
)

Adaptation function.

Parameters
zdd_measvert accel measurement in m/s^2 with INT32_ACCEL_FRAC
thrust_appliedcontroller input [0 : MAX_PPRZ]
zd_refvertical speed reference in m/s with INT32_SPEED_FRAC

Definition at line 128 of file guidance_v_adapt.c.

References ACCEL_BFP_OF_REAL, BFP_OF_REAL, E, GUIDANCE_V_ADAPT_MAX_ACCEL, GUIDANCE_V_ADAPT_MAX_CMD, GUIDANCE_V_ADAPT_MAX_HOVER_THROTTLE, GUIDANCE_V_ADAPT_MIN_CMD, GUIDANCE_V_ADAPT_MIN_HOVER_THROTTLE, GV_ADAPT_MEAS_NOISE_HOVER, GV_ADAPT_MEAS_NOISE_OF_ZD, gv_adapt_P, gv_adapt_P0, GV_ADAPT_P_FRAC, GV_ADAPT_SYS_NOISE, gv_adapt_X, GV_ADAPT_X_FRAC, INT32_ACCEL_FRAC, INT32_SPEED_FRAC, K_FRAC, MAX_PPRZ, and ref.

Referenced by guidance_v_run().

+ Here is the caller graph for this function:

Variable Documentation

int32_t gv_adapt_P

Covariance.

fixed point representation with GV_ADAPT_P_FRAC Q13.18

Definition at line 95 of file guidance_v_adapt.c.

Referenced by gv_adapt_run(), and send_vert_loop().

int32_t gv_adapt_X

State of the estimator.

fixed point representation with GV_ADAPT_X_FRAC Q13.18

Definition at line 94 of file guidance_v_adapt.c.

Referenced by gv_adapt_run(), run_hover_loop(), and send_vert_loop().

int32_t gv_adapt_Xmeas

Measurement.

Definition at line 96 of file guidance_v_adapt.c.

Referenced by send_vert_loop().