Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
gnsstk::NavFilter Class Referenceabstract

Detailed Description

Base class for all navigation message filters used by NavFilterMgr.

Definition at line 55 of file NavFilter.hpp.

#include <NavFilter.hpp>

Inheritance diagram for gnsstk::NavFilter:
Inheritance graph
[legend]

Public Types

typedef std::list< NavFilterKey * > NavMsgList
 

Public Member Functions

virtual void dumpRejected (std::ostream &out) const
 Debug support. More...
 
virtual std::string filterName () const noexcept=0
 
virtual void finalize (NavMsgList &msgBitsOut)=0
 
 NavFilter ()
 
virtual unsigned processingDepth () const noexcept=0
 
virtual std::string reasonTerse () const noexcept
 
virtual std::vector< std::string > reasonVerbose () const noexcept
 
virtual void validate (NavMsgList &msgBitsIn, NavMsgList &msgBitsOut)=0
 

Public Attributes

NavMsgList rejected
 

Protected Member Functions

void accept (const NavMsgList &valid, NavMsgList &msgBitsOut)
 
void accept (NavFilterKey *data, NavMsgList &msgBitsOut)
 
void reject (const NavMsgList &invalid)
 
void reject (NavFilterKey *data)
 

Member Typedef Documentation

◆ NavMsgList

Definition at line 58 of file NavFilter.hpp.

Constructor & Destructor Documentation

◆ NavFilter()

gnsstk::NavFilter::NavFilter ( )

Definition at line 45 of file NavFilter.cpp.

Member Function Documentation

◆ accept() [1/2]

void gnsstk::NavFilter::accept ( const NavMsgList valid,
NavMsgList msgBitsOut 
)
inlineprotected

Add a list of validated nav messages to the output list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.

Definition at line 178 of file NavFilter.hpp.

◆ accept() [2/2]

void gnsstk::NavFilter::accept ( NavFilterKey data,
NavMsgList msgBitsOut 
)
inlineprotected

Add a validated nav msg to the output list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.

Definition at line 172 of file NavFilter.hpp.

◆ dumpRejected()

void gnsstk::NavFilter::dumpRejected ( std::ostream &  out) const
virtual

Debug support.

Definition at line 50 of file NavFilter.cpp.

◆ filterName()

virtual std::string gnsstk::NavFilter::filterName ( ) const
pure virtualnoexcept

Return a simple string containing the name of the filter for the purposes of providing some user feedback as to which filter rejected a message. As an example, LNavEmptyFilter would return "Empty". The reason for using this method instead of type_id.name() is that the latter often returns compiler-munged names rather than human-readable ones.

Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::CNavCookFilter, gnsstk::LNavCookFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavTOWFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.

◆ finalize()

virtual void gnsstk::NavFilter::finalize ( NavMsgList msgBitsOut)
pure virtual

Flush the filter's stored data, if any. This method is called by NavFilterMgr::finalize() which is in turn called by the user. This method allows any lingering data stored internally by filters to be output.

Parameters
[out]msgBitsOutThe messages successfully passing the filter.

Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavCookFilter, gnsstk::CNavTOWFilter, gnsstk::LNavCookFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.

◆ processingDepth()

virtual unsigned gnsstk::NavFilter::processingDepth ( ) const
pure virtualnoexcept

Return the number of epochs worth of navigation data that the filter child class stores internally to function properly. This can be used to determine the size of a nav data buffer to allocate. A return value of 0 means that the subframes in msgBitsIn for the validate() call are immediately put in msgBitsOut or in rejected. A return value of 1 means that nav subframes of time t will not be accepted or rejected until validate is called with a nav subframe of time t+1 or later, and so on. Most filters will return a value of 0, indicating an immediate validation of the data.

Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavCookFilter, gnsstk::CNavTOWFilter, gnsstk::LNavCookFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.

◆ reasonTerse()

virtual std::string gnsstk::NavFilter::reasonTerse ( ) const
inlinevirtualnoexcept

Return a human-readable string containing a terse (short, 1-line) description of the reasons for the current contents of the rejected data. In most cases this will be an empty string as most filters are single-purpose and the filter name is sufficient to determine the cause. This method is meant to be used by complex filters with multiple pass/fail criteria.

Definition at line 114 of file NavFilter.hpp.

◆ reasonVerbose()

virtual std::vector<std::string> gnsstk::NavFilter::reasonVerbose ( ) const
inlinevirtualnoexcept

Return a human-readable string containing a verbose description containing the detailed reasoning behind the current rejected data. As an example, reasonTerse() might only return "Ahalf", while this method might return "Ahalf=10" i.e. include the rejected value.

Definition at line 121 of file NavFilter.hpp.

◆ reject() [1/2]

void gnsstk::NavFilter::reject ( const NavMsgList invalid)
inlineprotected

Add a list of invalid nav messages to the reject list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.

Definition at line 191 of file NavFilter.hpp.

◆ reject() [2/2]

void gnsstk::NavFilter::reject ( NavFilterKey data)
inlineprotected

Add an invalid nav message to the reject list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.

Definition at line 185 of file NavFilter.hpp.

◆ validate()

virtual void gnsstk::NavFilter::validate ( NavMsgList msgBitsIn,
NavMsgList msgBitsOut 
)
pure virtual

Validate/filter navigation messages. This method is called by NavFilterMgr. Messages are ingested and filtered results returned, but not necessarily all in a single call to this method. Multiple calls may be required to accumulate sufficient data to give meaningful results. This behavior is filter-specific.

Parameters
[in,out]msgBitsInA list of NavFilterKey* objects containing navigation messages.
[out]msgBitsOutThe messages successfully passing the filter. The data from msgBitsIn will not appear here until it successfully passes the filter, which may require multiple calls of validate with multiple epochs of data.

Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavCookFilter, gnsstk::CNavTOWFilter, gnsstk::LNavCookFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.

Member Data Documentation

◆ rejected

NavMsgList gnsstk::NavFilter::rejected

Rejected nav messages go here. If using NavFilterMgr, this list will be cleared prior to the validate message being called (to prevent memory bloat).

Filter users may want to examine the contents of this list after each NavFilterMgr::validate() call.

Warning
If you are NOT using NavFilterMgr, be aware that you will need to manage the rejected list yourself to avoid it growing unbounded.

Definition at line 137 of file NavFilter.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45