feat: add GravityFilter and Resampler to StepDetector
This commit is contained in:
@@ -20,12 +20,13 @@ TEST(StepDetector, t1_sub_sample_resolution) {
|
||||
StepDetector det(fps, nullptr, true);
|
||||
|
||||
// initialize: feed for priming the filters
|
||||
det.primeFilters(fps, signal);
|
||||
double ts = det.primeFilters(fps, signal);
|
||||
|
||||
// feed for actual test
|
||||
for (size_t i = 0; i < N; i++) {
|
||||
const auto a_i = static_cast<float>(signal[i]);
|
||||
det.filter(std::vector<float> {0.0f, a_i, 0.0f});
|
||||
det.filter(ts, std::vector<float> {0.0f, a_i, 0.0f});
|
||||
ts += 1.0 / fps;
|
||||
}
|
||||
|
||||
std::vector<double> ssd = det.getBufSsd(); // raw SsfStepDetector
|
||||
|
||||
Reference in New Issue
Block a user