PX4 Firmware
PX4 Autopilot Software http://px4.io
matrix_alg.cpp File Reference

Matrix algebra on raw arrays. More...

#include "matrix_alg.h"
#include <px4_platform_common/defines.h>
Include dependency graph for matrix_alg.cpp:

Go to the source code of this file.

Functions

float * mat_mul (float *A, float *B, uint8_t n)
 
static void swap (float &a, float &b)
 
static void mat_pivot (float *A, float *pivot, uint8_t n)
 
static void mat_forward_sub (float *L, float *out, uint8_t n)
 
static void mat_back_sub (float *U, float *out, uint8_t n)
 
static void mat_LU_decompose (float *A, float *L, float *U, float *P, uint8_t n)
 
bool mat_inverse (float *A, float *inv, uint8_t n)
 
bool inverse4x4 (float m[], float invOut[])
 

Detailed Description

Matrix algebra on raw arrays.

Definition in file matrix_alg.cpp.

Function Documentation

◆ inverse4x4()

bool inverse4x4 ( float  m[],
float  invOut[] 
)

Definition at line 260 of file matrix_alg.cpp.

References f(), and matrix::inv().

Here is the call graph for this function:

◆ mat_back_sub()

static void mat_back_sub ( float *  U,
float *  out,
uint8_t  n 
)
static

Definition at line 143 of file matrix_alg.cpp.

Referenced by mat_inverse().

Here is the caller graph for this function:

◆ mat_forward_sub()

static void mat_forward_sub ( float *  L,
float *  out,
uint8_t  n 
)
static

Definition at line 119 of file matrix_alg.cpp.

Referenced by mat_inverse().

Here is the caller graph for this function:

◆ mat_inverse()

bool mat_inverse ( float *  A,
float *  inv,
uint8_t  n 
)

Definition at line 215 of file matrix_alg.cpp.

References mat_back_sub(), mat_forward_sub(), mat_LU_decompose(), mat_mul(), and P.

Referenced by run_lm_ellipsoid_fit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mat_LU_decompose()

static void mat_LU_decompose ( float *  A,
float *  L,
float *  U,
float *  P,
uint8_t  n 
)
static

Definition at line 168 of file matrix_alg.cpp.

References mat_mul(), and mat_pivot().

Referenced by mat_inverse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mat_mul()

float* mat_mul ( float *  A,
float *  B,
uint8_t  n 
)

Definition at line 53 of file matrix_alg.cpp.

References f().

Referenced by mat_inverse(), and mat_LU_decompose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mat_pivot()

static void mat_pivot ( float *  A,
float *  pivot,
uint8_t  n 
)
static

Definition at line 86 of file matrix_alg.cpp.

References swap().

Referenced by mat_LU_decompose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap()

static void swap ( float &  a,
float &  b 
)
inlinestatic

Definition at line 69 of file matrix_alg.cpp.

Referenced by mat_pivot().

Here is the caller graph for this function: