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>
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) |
![]() | |
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 |
![]() | |
NavMsgList | rejected |
Protected Types | |
typedef std::set< NavFilterKey *, NavTimeSort > | SubframeSet |
Protected Member Functions | |
void | examineSubframes (NavMsgList &msgBitsOut) |
![]() | |
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 | |
![]() | |
typedef std::list< NavFilterKey * > | NavMsgList |
|
protected |
Definition at line 125 of file NavOrderFilter.hpp.
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.
|
protected |
Filter by age.
[out] | msgBitsOut | Nav messages passing age filter algorithm are stored here. |
Definition at line 93 of file NavOrderFilter.cpp.
|
inlinevirtualnoexcept |
Return the filter name.
Implements gnsstk::NavFilter.
Definition at line 119 of file NavOrderFilter.hpp.
|
virtual |
Flush the remaining contents of orderedNav.
[out] | msgBitsOut | Any remaining nav messages are stored here on return. |
Implements gnsstk::NavFilter.
Definition at line 84 of file NavOrderFilter.cpp.
|
inlinevirtualnoexcept |
Internal storage includes a user-specified number of epochs.
Implements gnsstk::NavFilter.
Definition at line 115 of file NavOrderFilter.hpp.
|
virtual |
Add nav messages to the collection (orderedNav).
[in,out] | msgBitsIn | A list of NavFilterKey* objects containing navigation messages. |
[out] | msgBitsOut | The messages successfully passing the filter. |
Implements gnsstk::NavFilter.
Definition at line 54 of file NavOrderFilter.cpp.
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.
|
protected |
Ordered set of nav message subframes.
Definition at line 128 of file NavOrderFilter.hpp.
unsigned gnsstk::NavOrderFilter::procDepth |
Definition at line 122 of file NavOrderFilter.hpp.