-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lag threshold influence values #6
Comments
Just another user here... The library source is 142 lines long. I'd look there for how it works. And surprisingly ChatGPT answered my question "Thanks. A sample of the calculated magnitude values is: "99 To determine the optimal values for lag, threshold, and influence, we need to analyze the provided data. Here's a breakdown of how to choose these parameters:
Lag:
Lag: Peaks occur relatively quickly, so a lag of around 10 samples should work well. lag = 10: A small window for responsive peak detection. cpp std::vector magnitudes = { void setup() {
} void loop() { Increase threshold to reduce false positives. |
By the way, ChatGPT's answer says to use "peakDetector.begin(10, 2.5, 0.5);" which is wrong, since the threshold is an int. ChatGPT is helpful and not perfect. |
I have a sinewave from mpu9250 sensor which I need to calculate the max of during live sensor readings. I'm trying to understand how lag threshold influence values work in your library and what i should set them to. is there any other sources? In example they are peakDetection.begin(48, 3, 0.6); and have no idea why.
The text was updated successfully, but these errors were encountered: