Algorithm for masking time when the signal is above a threshold
问题 I have a realtime signal from a sensor. I need logic to implement a masking time once the signal is above a threshold. As shown below: Here the signal (in blue) crosses a threshold. And I need to mask for any checks for the threshold for a period (masking time). (In this way I can detect only the positive pulse , similarly, I have another check for negative pulse ) See the code below: static QTime time(QTime::currentTime()); // calculate two new data points: double key = time.elapsed()/1000.0