SatCat5
satcat5::ptp::AmplitudeReject Class Reference

Detailed Description

Amplitude-based outlier rejection.

Iteratively estimate RMS power of the input, then reject outliers that greatly exceed that estimate.

Definition at line 135 of file ptp_filters.h.

#include <ptp_filters.h>

Inheritance diagram for satcat5::ptp::AmplitudeReject:
[legend]
Collaboration diagram for satcat5::ptp::AmplitudeReject:
[legend]

Public Member Functions

 AmplitudeReject (unsigned tau_msec=10000)
 
s64 get_mean () const
 
u64 get_sigma () const
 
void set_min (u64 min_subns)
 
void set_tau (u32 tau_msec)
 
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

s64 m_mean
 
u64 m_sigma
 
u64 m_min
 
u32 m_tau_usec
 

Private Attributes

satcat5::ptp::Filterm_next
 

Member Function Documentation

◆ rate()

virtual void satcat5::ptp::Filter::rate ( s64  delta_subns,
u32  elapsed_usec 
)
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.

◆ reset()

void AmplitudeReject::reset ( )
overridevirtual

Flush previous inputs and reset to a neutral state.

Child class MUST override this method.

Implements satcat5::ptp::Filter.

Definition at line 141 of file ptp_filters.cc.

◆ update()

s64 AmplitudeReject::update ( s64  next,
u32  elapsed_usec 
)
overridevirtual

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 146 of file ptp_filters.cc.


The documentation for this class was generated from the following files: