mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 16:03:34 +08:00
ekf2: change indication test limit float precision to minimize false positives
This commit is contained in:
@@ -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; };
|
||||
|
||||
Reference in New Issue
Block a user