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) |
bool Math::calculatePolynomial | ( | const Eigen::MatrixXd & | table, |
double | airSpeedMod, | ||
Eigen::VectorXd & | polynomialCoeffs | ||
) |
[in] | table | must have size (1 + NUM_OF_COEFFS, NUM_OF_POINTS), min size is (2, 2) |
[in] | airSpeedMod | should be between table(0, 0) and table(NUM_OF_COEFFS, 0) |
[in,out] | polynomialCoeffs | must have size should be at least NUM_OF_COEFFS |
Definition at line 87 of file common_math.cpp.
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.
Definition at line 59 of file common_math.cpp.
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.
Definition at line 38 of file common_math.cpp.
double Math::griddata | ( | const Eigen::MatrixXd & | x, |
const Eigen::MatrixXd & | y, | ||
const Eigen::MatrixXd & | z, | ||
double | x_val, | ||
double | y_val | ||
) |
Definition at line 68 of file common_math.cpp.
double Math::lerp | ( | double | a, |
double | b, | ||
double | f | ||
) |
Definition at line 26 of file common_math.cpp.
double Math::polyval | ( | const Eigen::VectorXd & | poly, |
double | val | ||
) |
Definition at line 30 of file common_math.cpp.