diff options
author | DaMichel <mw.pub@welter-4d.de> | 2016-07-29 11:12:22 +0200 |
---|---|---|
committer | DaMichel <mw.pub@welter-4d.de> | 2016-07-29 11:38:21 +0200 |
commit | 7b3be452b6be528de753a1a633a3aacdb11be86c (patch) | |
tree | 63df2693909a92529610a055e2f670d5860cedf8 /opentrack-logic/tracklogger.cpp | |
parent | 2bae0bce582f05259f64fb13b364fe6dbd28817a (diff) |
new track logging: record poses in various stages of processing into a file
Diffstat (limited to 'opentrack-logic/tracklogger.cpp')
-rw-r--r-- | opentrack-logic/tracklogger.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/opentrack-logic/tracklogger.cpp b/opentrack-logic/tracklogger.cpp new file mode 100644 index 00000000..5e4cf4f9 --- /dev/null +++ b/opentrack-logic/tracklogger.cpp @@ -0,0 +1,28 @@ +#include "tracklogger.hpp" +#include "tracker.h" + + +void TrackLoggerCSV::write(const char *s) +{ + out << s; +} + + +void TrackLoggerCSV::write(const double *p, int n) +{ + if (!first_col) + out.put(';'); + first_col = false; + for (int i = 0; i < n-1; ++i) + { + out << p[i]; + out.put(';'); + } + out << p[n-1]; +} + +void TrackLoggerCSV::next_line() +{ + out << std::endl; + first_col = true; +}
\ No newline at end of file |