Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
gnsstk::NavOrderFilter Class Reference

Detailed Description

Order navigation message subframes by the timestamp in the NavFilterKey class. The intent is to use this when you have (near) real time navigation data arriving from multiple sites where the time of the data is not guaranteed to be completely synchronous, but the time needs to be synchronous.

The processing depth of this filter is configurable, but defaults to 3 epochs. The processing depth should be set according to how many epochs of navigation data (i.e. unique, consecutive time stamps) to collect before passing it along. The default of 3 is recommended to be the minimum as anything less would eliminate the function of this class by preventing enough accumulation of data to occur to fix an order, however if 2 is used this will behave like a filter to discard "old" navigation data.

Accepted messages are guaranteed to be in time order. Rejected messages are more than processingDepth epochs older than the most recent.

As data is added to the filter via the validate method, data older than, or the same age as procDepth epochs is accepted. This allows data to be accepted in the case where the time stamp jumps by 2 or more epochs.

Definition at line 88 of file NavOrderFilter.hpp.

#include <NavOrderFilter.hpp>

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

Public Member Functions

virtual std::string filterName () const noexcept
 Return the filter name. More...
 
virtual void finalize (NavMsgList &msgBitsOut)
 
 NavOrderFilter (unsigned depth=3, unsigned epoch=6)
 Initialize internal structures and set the processing depth. More...
 
virtual unsigned processingDepth () const noexcept
 Internal storage includes a user-specified number of epochs. More...
 
virtual void validate (NavMsgList &msgBitsIn, NavMsgList &msgBitsOut)
 
- Public Member Functions inherited from gnsstk::NavFilter
virtual void dumpRejected (std::ostream &out) const
 Debug support. More...
 
 NavFilter ()
 
virtual std::string reasonTerse () const noexcept
 
virtual std::vector< std::string > reasonVerbose () const noexcept
 

Public Attributes

unsigned epochInSeconds
 
unsigned procDepth
 
- Public Attributes inherited from gnsstk::NavFilter
NavMsgList rejected
 

Protected Types

typedef std::set< NavFilterKey *, NavTimeSortSubframeSet
 

Protected Member Functions

void examineSubframes (NavMsgList &msgBitsOut)
 
- Protected Member Functions inherited from gnsstk::NavFilter
void accept (const NavMsgList &valid, NavMsgList &msgBitsOut)
 
void accept (NavFilterKey *data, NavMsgList &msgBitsOut)
 
void reject (const NavMsgList &invalid)
 
void reject (NavFilterKey *data)
 

Protected Attributes

SubframeSet orderedNav
 Ordered set of nav message subframes. More...
 

Additional Inherited Members

- Public Types inherited from gnsstk::NavFilter
typedef std::list< NavFilterKey * > NavMsgList
 

Member Typedef Documentation

◆ SubframeSet

Definition at line 125 of file NavOrderFilter.hpp.

Constructor & Destructor Documentation

◆ NavOrderFilter()

gnsstk::NavOrderFilter::NavOrderFilter ( unsigned  depth = 3,
unsigned  epoch = 6 
)

Initialize internal structures and set the processing depth.

Definition at line 46 of file NavOrderFilter.cpp.

Member Function Documentation

◆ examineSubframes()

void gnsstk::NavOrderFilter::examineSubframes ( NavMsgList msgBitsOut)
protected

Filter by age.

Parameters
[out]msgBitsOutNav messages passing age filter algorithm are stored here.

Definition at line 93 of file NavOrderFilter.cpp.

◆ filterName()

virtual std::string gnsstk::NavOrderFilter::filterName ( ) const
inlinevirtualnoexcept

Return the filter name.

Implements gnsstk::NavFilter.

Definition at line 119 of file NavOrderFilter.hpp.

◆ finalize()

void gnsstk::NavOrderFilter::finalize ( NavMsgList msgBitsOut)
virtual

Flush the remaining contents of orderedNav.

Parameters
[out]msgBitsOutAny remaining nav messages are stored here on return.

Implements gnsstk::NavFilter.

Definition at line 84 of file NavOrderFilter.cpp.

◆ processingDepth()

virtual unsigned gnsstk::NavOrderFilter::processingDepth ( ) const
inlinevirtualnoexcept

Internal storage includes a user-specified number of epochs.

Implements gnsstk::NavFilter.

Definition at line 115 of file NavOrderFilter.hpp.

◆ validate()

void gnsstk::NavOrderFilter::validate ( NavMsgList msgBitsIn,
NavMsgList msgBitsOut 
)
virtual

Add nav messages to the collection (orderedNav).

Precondition
NavFilterKey::timeStamp is set to an appropriate, consistent value for the navigation data being filtered.
Parameters
[in,out]msgBitsInA list of NavFilterKey* objects containing navigation messages.
[out]msgBitsOutThe messages successfully passing the filter.

Implements gnsstk::NavFilter.

Definition at line 54 of file NavOrderFilter.cpp.

Member Data Documentation

◆ epochInSeconds

unsigned gnsstk::NavOrderFilter::epochInSeconds

This defaults to 6 seconds, which is the LNAV subframe period. It should be changed accordingly for other navigation message formats, either via the constructor or directly.

Definition at line 95 of file NavOrderFilter.hpp.

◆ orderedNav

SubframeSet gnsstk::NavOrderFilter::orderedNav
protected

Ordered set of nav message subframes.

Definition at line 128 of file NavOrderFilter.hpp.

◆ procDepth

unsigned gnsstk::NavOrderFilter::procDepth

Definition at line 122 of file NavOrderFilter.hpp.


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


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