Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
wls_alloc.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void qr_solve_wrapper (int m, int n, float **A, float *b, float *x)
 Wrapper for qr solve. More...
 
int wls_alloc (float *u, float *v, float *umin, float *umax, float **B, int n_u, int n_w, float *u_guess, float *W_init, float *Wv, float *Wu, float *ud, float gamma, int imax)
 active set algorithm for control allocation More...
 

Function Documentation

void qr_solve_wrapper ( int  m,
int  n,
float **  A,
float *  b,
float *  x 
)

Wrapper for qr solve.

Possible to use a different solver if needed. Solves a system of the form Ax = b for x.

Parameters
mnumber of rows
nnumber of columns

Definition at line 63 of file wls_alloc.c.

References qr_solve().

Referenced by wls_alloc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int wls_alloc ( float *  u,
float *  v,
float *  umin,
float *  umax,
float **  B,
int  n_u,
int  n_v,
float *  u_guess,
float *  W_init,
float *  Wv,
float *  Wu,
float *  up,
float  gamma_sq,
int  imax 
)

active set algorithm for control allocation

Takes the control objective and max and min inputs from pprz and calculates the inputs that will satisfy most of the control objective, subject to the weighting matrices Wv and Wu

Parameters
uThe control output vector
vThe control objective
uminThe minimum u vector
umaxThe maximum u vector
BThe control effectiveness matrix
n_uLength of u
n_vLenght of v
u_guessInitial value for u
W_initInitial working set, if known
WvWeighting on different control objectives
WuWeighting on different controls
upPreferred control vector
gamma_sqPreference of satisfying control objective over desired control vector (sqare root of gamma)
imaxMax number of iterations
Returns
Number of iterations, -1 upon failure

Definition at line 101 of file wls_alloc.c.

References A, alpha, p, print_final_values(), print_in_and_outputs(), qr_solve_wrapper(), and UNUSED.

Referenced by stabilization_indi_calc_cmd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: