|
SatCat5
|
A median filter for an odd number of elements.
Note: Order 1 is a simple passthrough.
Definition at line 187 of file ptp_filters.h.
#include <ptp_filters.h>
Public Member Functions | |
| MedianFilter (unsigned order=MAX_ORDER) | |
| void | set_order (unsigned x) |
| void | reset () override |
| Flush previous inputs and reset to a neutral state. More... | |
| s64 | update (s64 next, u32 elapsed_usec) override |
| Method called for each new input sample. More... | |
| virtual void | rate (s64 delta_subns, u32 elapsed_usec) |
| Optional handler for fast-acquisition; override if required. More... | |
Protected Attributes | |
| unsigned | m_order |
| satcat5::ptp::SlidingWindow< s64, MAX_ORDER|1 > | m_window |
Private Attributes | |
| satcat5::ptp::Filter * | m_next |
|
inlinevirtualinherited |
Optional handler for fast-acquisition; override if required.
Upstream controller provides estimated rate (i.e., rise/run). The "elapsed_usec" parameter will be between 10^5 and 10^7. Child class MAY override this method.
Reimplemented in satcat5::ptp::LinearPrediction, satcat5::ptp::ControllerLR_Inner, satcat5::ptp::ControllerPII, and satcat5::ptp::ControllerPI.
Definition at line 48 of file ptp_filters.h.
|
inlineoverridevirtual |
Flush previous inputs and reset to a neutral state.
Child class MUST override this method.
Implements satcat5::ptp::Filter.
Definition at line 195 of file ptp_filters.h.
|
inlineoverridevirtual |
Method called for each new input sample.
Input or output of INT64_MAX indicates the sample should be discarded. Otherwise, return the resulting output sample. The "elapsed_usec" parameter will be between 10^3 and 10^6. Child class MUST override this method.
Implements satcat5::ptp::Filter.
Definition at line 198 of file ptp_filters.h.