Particle filter is now using a fixed time interval as step

This commit is contained in:
2019-09-25 16:49:57 +02:00
parent 24bbc56f28
commit deb318e115
5 changed files with 185 additions and 83 deletions

View File

@@ -6,6 +6,7 @@
#include <vector>
#include <unordered_map>
#include <iostream>
#include <array>
namespace Plotta
{
@@ -39,6 +40,8 @@ namespace Plotta
{
// send data
std::ofstream stream;
stream.exceptions(stream.exceptions() | std::ios::failbit);
stream.open(dataFile);
std::time_t t = std::time(nullptr);
@@ -126,6 +129,12 @@ namespace Plotta
return writeNumpyArray(stream, list.begin(), list.end());
}
template<typename T, size_t S>
plottastream& operator<<(plottastream& stream, const std::array<T, S>& list)
{
return writeNumpyArray(stream, list.begin(), list.end());
}
template<typename T>
static plottastream& operator<<(plottastream& stream, const T& value)