get rid of the dirty determinant for now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Marius Eggert 2023-02-24 13:27:27 +01:00
parent f765707886
commit e349bb8a7f

View File

@ -10,8 +10,6 @@
#include <iostream> #include <iostream>
#include "fsfw/timemanager/Stopwatch.h"
using namespace Math; using namespace Math;
template <typename T1, typename T2 = T1> template <typename T1, typename T2 = T1>
@ -333,10 +331,6 @@ class MathOperations {
static int inverseMatrix(const T1 *inputMatrix, T1 *inverse, uint8_t size) { static int inverseMatrix(const T1 *inputMatrix, T1 *inverse, uint8_t size) {
// Stopwatch stopwatch; // Stopwatch stopwatch;
// if (MathOperations<T1>::matrixDeterminant(inputMatrix, size) == 0) {
// return 1; // Matrix is singular and not invertible
// }
// stopwatch.stop(true);
T1 matrix[size][size], identity[size][size]; T1 matrix[size][size], identity[size][size];
// reformat array to matrix // reformat array to matrix
for (uint8_t row = 0; row < size; row++) { for (uint8_t row = 0; row < size; row++) {
@ -351,7 +345,6 @@ class MathOperations {
} }
// gauss-jordan algo // gauss-jordan algo
// sort matrix such as no diag entry shall be 0 // sort matrix such as no diag entry shall be 0
// should not be needed as such a matrix has a det=0
for (uint8_t row = 0; row < size; row++) { for (uint8_t row = 0; row < size; row++) {
if (matrix[row][row] == 0.0) { if (matrix[row][row] == 0.0) {
bool swaped = false; bool swaped = false;