ekf2: change indication test limit float precision to minimize false positives

This commit is contained in:
Daniel Agar
2021-07-26 13:54:36 -04:00
parent e84c6664bb
commit e01b631465
4 changed files with 740 additions and 741 deletions
@@ -1,14 +1,13 @@
#include "ekf_logger.h"
#include <iomanip>
EkfLogger::EkfLogger(std::shared_ptr<Ekf> ekf):
_ekf{ekf},
_ekf_wrapper(ekf)
{
}
EkfLogger::~EkfLogger() {}
void EkfLogger::setFilePath(std::string file_path)
{
_file_path = file_path;
@@ -56,7 +55,7 @@ void EkfLogger::writeState()
matrix::Vector<float, 24> state = _ekf->getStateAtFusionHorizonAsVector();
for (int i = 0; i < 24; i++) {
_file << "," << state(i);
_file << "," << std::setprecision(4) << state(i);
}
}
@@ -48,7 +48,7 @@ class EkfLogger
{
public:
EkfLogger(std::shared_ptr<Ekf> ekf);
~EkfLogger();
~EkfLogger() = default;
void setFilePath(std::string file_path);
void enableStateLogging() { _state_logging_enabled = true; };