feat: iterate on SsfStepDetector

* use SSF signal instead of accelerometer signal
* use higher BEAT_CORR_THR_{12} for SSF signal
* add absolute SSF_THRESHOLD to ignore small accelero bumps
* compute ssf_threshold according to detected SSF peaks, not the mean (more robust vs. noise)
This commit is contained in:
2026-03-11 20:47:53 +01:00
parent 95d1fee44d
commit 90f8943930
8 changed files with 103 additions and 27 deletions

View File

@@ -113,7 +113,7 @@ double clip(double val, double a_min, double a_max) {
}
// two-dimensional mean of a collection of signals
void mean(std::vector<double> &out, std::vector<std::vector<double> >& m) {
template<class T> void mean_tpl(std::vector<double> &out, T& m) {
if (m.empty()) {
out.resize(0);
return;
@@ -132,4 +132,11 @@ void mean(std::vector<double> &out, std::vector<std::vector<double> >& m) {
}
}
void mean(std::vector<double> &out, std::vector<std::vector<double> >& m) {
mean_tpl(out, m);
}
void mean(std::vector<double> &out, std::deque<std::vector<double> >& m) {
mean_tpl(out, m);
}
}