Functions
Math Namespace Reference

Functions

bool calculatePolynomial (const Eigen::MatrixXd &table, double airSpeedMod, Eigen::VectorXd &polynomialCoeffs)
 
size_t findPrevRowIdxInIncreasingSequence (const Eigen::MatrixXd &table, double value)
 Given an increasing sequence and a key, return the index of the previous element closest to the key. More...
 
size_t findPrevRowIdxInMonotonicSequence (const Eigen::MatrixXd &matrix, double key)
 Given monotonic sequence (increasing or decreasing) and key, return the index of the previous element closest to the key. More...
 
double griddata (const Eigen::MatrixXd &x, const Eigen::MatrixXd &y, const Eigen::MatrixXd &z, double x_val, double y_val)
 
double lerp (double a, double b, double f)
 
double polyval (const Eigen::VectorXd &poly, double val)
 

Function Documentation

◆ calculatePolynomial()

bool Math::calculatePolynomial ( const Eigen::MatrixXd &  table,
double  airSpeedMod,
Eigen::VectorXd &  polynomialCoeffs 
)
Parameters
[in]tablemust have size (1 + NUM_OF_COEFFS, NUM_OF_POINTS), min size is (2, 2)
[in]airSpeedModshould be between table(0, 0) and table(NUM_OF_COEFFS, 0)
[in,out]polynomialCoeffsmust have size should be at least NUM_OF_COEFFS
Returns
true and modify polynomialCoeffs if input is ok, otherwise return false

Definition at line 87 of file common_math.cpp.

◆ findPrevRowIdxInIncreasingSequence()

size_t Math::findPrevRowIdxInIncreasingSequence ( const Eigen::MatrixXd &  table,
double  value 
)

Given an increasing sequence and a key, return the index of the previous element closest to the key.

Note
size should be greater or equel than 2!

Definition at line 59 of file common_math.cpp.

◆ findPrevRowIdxInMonotonicSequence()

size_t Math::findPrevRowIdxInMonotonicSequence ( const Eigen::MatrixXd &  matrix,
double  key 
)

Given monotonic sequence (increasing or decreasing) and key, return the index of the previous element closest to the key.

Note
size should be greater or equel than 2!

Definition at line 38 of file common_math.cpp.

◆ griddata()

double Math::griddata ( const Eigen::MatrixXd &  x,
const Eigen::MatrixXd &  y,
const Eigen::MatrixXd &  z,
double  x_val,
double  y_val 
)

◆ lerp()

double Math::lerp ( double  a,
double  b,
double  f 
)

◆ polyval()

double Math::polyval ( const Eigen::VectorXd &  poly,
double  val 
)

Definition at line 30 of file common_math.cpp.



inno_vtol_dynamics
Author(s): Roman Fedorenko, Dmitry Ponomarev, Ezra Tal, Winter Guerra
autogenerated on Mon Dec 9 2024 03:13:35