feat: pass fps dynamically
This commit is contained in:
@@ -18,11 +18,10 @@
|
||||
*/
|
||||
class SsfFilter {
|
||||
protected:
|
||||
size_t sw;
|
||||
Filt f_delta_u;
|
||||
Filt f_window;
|
||||
public:
|
||||
SsfFilter(size_t upslope_width);
|
||||
SsfFilter(double fps);
|
||||
double filter(double val);
|
||||
};
|
||||
|
||||
@@ -44,16 +43,17 @@ protected:
|
||||
size_t n_refr;
|
||||
bool is_refr;
|
||||
double ssf_nm1;
|
||||
size_t ssf_usw2;
|
||||
Filt f_ssf_mean;
|
||||
public:
|
||||
/**
|
||||
* @param len_refr duration of refractory period, in samples
|
||||
*/
|
||||
SsfStepDetector(size_t len_refr);
|
||||
SsfStepDetector(double fps);
|
||||
double filter(double val);
|
||||
double peek_threshold();
|
||||
|
||||
static size_t initial_samples();
|
||||
static size_t initial_samples(double fps);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -115,7 +115,7 @@ protected:
|
||||
std::vector<double> ssf_buf;
|
||||
double sqi;
|
||||
public:
|
||||
RunningQualityFilter(size_t upslope_width);
|
||||
RunningQualityFilter(double fps);
|
||||
double filter(double y, double ssf, double step);
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ protected:
|
||||
std::vector<double> buf_out;
|
||||
|
||||
public:
|
||||
StepDetector(StepListener *listener, bool debug = false);
|
||||
StepDetector(double fps, StepListener *listener, bool debug = false);
|
||||
void filter(std::vector<float> values);
|
||||
std::vector<double> getBufSsd();
|
||||
std::vector<double> getBufSqi();
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
* Prime the filters using the given input signal.
|
||||
* Used for debugging (non-realtime processing) to align the signal.
|
||||
*/
|
||||
void primeFilters(std::vector<double> sig);
|
||||
void primeFilters(double fps, std::vector<double> sig);
|
||||
};
|
||||
|
||||
#endif //PASADASUPERPROJECT_STEP_DETECTOR_H
|
||||
Reference in New Issue
Block a user