refactor: move test_helpers, RunningQuality

This commit is contained in:
2026-03-12 20:34:54 +01:00
parent 90f8943930
commit 9aaec182a8
8 changed files with 297 additions and 174 deletions

View File

@@ -0,0 +1,33 @@
//
// Created by david on 11.03.2026.
//
#ifndef PASADASUPERPROJECT_TEST_HELPERS_H
#define PASADASUPERPROJECT_TEST_HELPERS_H
#include "npy.hpp"
#include "ssf_filter.h"
#include <string>
#include <vector>
template <typename T> static std::vector<double> apply_filter(T& filter, std::vector<double>& x) {
std::vector<double> y;
y.resize(x.size());
for (int i = 0; i < x.size(); i++) {
y[i] = filter.filter(x[i]);
}
return y;
}
void npy_save(std::string path, std::vector<double>& x);
std::vector<double> fetch_y_axis(npy::npy_data<double>& acc);
/** Returns the ssf_threshold as the filter output for debugging. */
class DebugSsfStepDetectorThreshold : public SsfStepDetector {
public:
DebugSsfStepDetectorThreshold(size_t len_refr);
double filter(double val);
};
#endif //PASADASUPERPROJECT_TEST_HELPERS_H