From 62a2599772b6224274ba9569df8dc015c7797f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9d=C3=A9ric=20Fourmy?= <mfourmy@laas.fr> Date: Mon, 8 Jun 2020 16:24:45 +0200 Subject: [PATCH] Add timestamp to capture in printeaders --- src/capture/capture_base.cpp | 5 ++--- src/capture/capture_motion.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/capture/capture_base.cpp b/src/capture/capture_base.cpp index c091b5527..8b31edc53 100644 --- a/src/capture/capture_base.cpp +++ b/src/capture/capture_base.cpp @@ -232,7 +232,7 @@ void CaptureBase::setProblem(ProblemPtr _problem) void CaptureBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _state_blocks, std::ostream& _stream, std::string _tabs) const { - _stream << _tabs << "Cap" << id() << " " << getType(); + _stream << _tabs << "Cap" << id() << " " << getType() << " ts = " << std::setprecision(3) << getTimeStamp(); if(getSensor() != nullptr) { @@ -261,8 +261,7 @@ void CaptureBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _s } else if (_metric) { - _stream << _tabs << (isFixed() ? "Fix" : "Est") << ", ts=" << std::setprecision(5) - << getTimeStamp(); + _stream << _tabs << (isFixed() ? "Fix" : "Est"); _stream << ",\t x= ( " << std::setprecision(2) << getStateVector() << " )"; _stream << std::endl; } diff --git a/src/capture/capture_motion.cpp b/src/capture/capture_motion.cpp index 1a61a7f5c..4c7fd3ffb 100644 --- a/src/capture/capture_motion.cpp +++ b/src/capture/capture_motion.cpp @@ -72,7 +72,7 @@ bool CaptureMotion::containsTimeStamp (const TimeStamp& _ts, double _time_tolera void CaptureMotion::printHeader(int _depth, bool _constr_by, bool _metric, bool _state_blocks, std::ostream& _stream, std::string _tabs) const { - _stream << _tabs << "CapM" << id() << " " << getType(); + _stream << _tabs << "CapM" << id() << " " << getType() << " ts = " << std::setprecision(3) << getTimeStamp(); if(getSensor() != nullptr) { -- GitLab