SatCat5
satcat5::ptp::Filter Class Referenceabstract

Detailed Description

Define the basic chain-of-filters API.

See also
ptp_filters.h

Definition at line 38 of file ptp_filters.h.

#include <ptp_filters.h>

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

Public Member Functions

virtual void reset ()=0
 Flush previous inputs and reset to a neutral state. More...
 
virtual void rate (s64 delta_subns, u32 elapsed_usec)
 Optional handler for fast-acquisition; override if required. More...
 
virtual s64 update (s64 next, u32 elapsed_usec)=0
 Method called for each new input sample. More...
 

Protected Member Functions

constexpr Filter ()
 Private constructor and destructor.
 

Private Attributes

satcat5::ptp::Filterm_next
 

Member Function Documentation

◆ rate()

virtual void satcat5::ptp::Filter::rate ( s64  delta_subns,
u32  elapsed_usec 
)
inlinevirtual

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()

virtual void satcat5::ptp::Filter::reset ( )
pure virtual

◆ update()

virtual s64 satcat5::ptp::Filter::update ( s64  next,
u32  elapsed_usec 
)
pure virtual

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.

Implemented in satcat5::ptp::LinearPrediction, satcat5::ptp::ControllerLR< MAX_WINDOW >, satcat5::ptp::ControllerPII, satcat5::ptp::ControllerPI, satcat5::ptp::MedianFilter< MAX_ORDER >, satcat5::ptp::BoxcarFilter< MAX_ORDER >, satcat5::ptp::AmplitudeReject, and satcat5::ptp::DebugFilter.


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