Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ GV_ADAPT_P_FRAC

#define GV_ADAPT_P_FRAC   18

Definition at line 47 of file guidance_v_adapt.h.

◆ GV_ADAPT_X_FRAC

#define GV_ADAPT_X_FRAC   24

Definition at line 40 of file guidance_v_adapt.h.

Function Documentation

◆ gv_adapt_init()

void gv_adapt_init ( void  )

Definition at line 120 of file guidance_v_adapt.c.

References gv_adapt_P, gv_adapt_P0, gv_adapt_X, 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:

◆ gv_adapt_run()

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 133 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, gv_adapt_Xmeas, INT32_ACCEL_FRAC, INT32_SPEED_FRAC, K, K_FRAC, MAX_PPRZ, and ref.

Referenced by guidance_v_run().

+ Here is the caller graph for this function:

Variable Documentation

◆ gv_adapt_P

int32_t gv_adapt_P
extern

Covariance.

fixed point representation with GV_ADAPT_P_FRAC Q13.18

Definition at line 100 of file guidance_v_adapt.c.

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

◆ gv_adapt_X

int32_t gv_adapt_X
extern

State of the estimator.

fixed point representation with GV_ADAPT_X_FRAC Q13.18

Definition at line 99 of file guidance_v_adapt.c.

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

◆ gv_adapt_Xmeas

int32_t gv_adapt_Xmeas
extern

Measurement.

Definition at line 101 of file guidance_v_adapt.c.

Referenced by gv_adapt_run(), and send_vert_loop().