NavFilter.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
39 #ifndef NAVFILTER_HPP
40 #define NAVFILTER_HPP
41 
42 #include <iterator>
43 #include <stdint.h>
44 #include <list>
45 #include "ObsID.hpp"
46 #include "NavFilterKey.hpp"
47 
48 namespace gnsstk
49 {
51 
52 
55  class NavFilter
56  {
57  public:
58  typedef std::list<NavFilterKey*> NavMsgList;
59 
60  NavFilter();
61 
76  virtual void validate(NavMsgList& msgBitsIn, NavMsgList& msgBitsOut) = 0;
77 
84  virtual void finalize(NavMsgList& msgBitsOut) = 0;
85 
97  virtual unsigned processingDepth() const noexcept = 0;
98 
106  virtual std::string filterName() const noexcept = 0;
114  virtual std::string reasonTerse() const noexcept
115  { return ""; }
121  virtual std::vector<std::string> reasonVerbose() const noexcept
122  { return std::vector<std::string>(); }
123 
125  virtual void dumpRejected(std::ostream& out) const;
126 
138 
139  protected:
145  inline void accept(NavFilterKey* data, NavMsgList& msgBitsOut);
146 
152  inline void accept(const NavMsgList& valid, NavMsgList& msgBitsOut);
153 
159  inline void reject(NavFilterKey* data);
160 
166  inline void reject(const NavMsgList& invalid);
167  };
168 
170 
171  void NavFilter ::
173  {
174  msgBitsOut.push_back(data);
175  }
176 
177  void NavFilter ::
178  accept(const NavMsgList& valid, NavMsgList& msgBitsOut)
179  {
180  std::copy(valid.begin(), valid.end(),
181  std::back_insert_iterator<NavMsgList>(msgBitsOut));
182  }
183 
184  void NavFilter ::
186  {
187  rejected.push_back(data);
188  }
189 
190  void NavFilter ::
191  reject(const NavMsgList& invalid)
192  {
193  std::copy(invalid.begin(), invalid.end(),
194  std::back_insert_iterator<NavMsgList>(rejected));
195  }
196 
197 } // namepace gnsstk
198 
199 #endif // NAVFILTER_HPP
gnsstk::NavFilter::reasonTerse
virtual std::string reasonTerse() const noexcept
Definition: NavFilter.hpp:114
const
#define const
Definition: getopt.c:43
gnsstk::NavFilter::reject
void reject(NavFilterKey *data)
Definition: NavFilter.hpp:185
gnsstk::NavFilter::finalize
virtual void finalize(NavMsgList &msgBitsOut)=0
gnsstk::NavFilter::rejected
NavMsgList rejected
Definition: NavFilter.hpp:137
gnsstk::NavFilter::validate
virtual void validate(NavMsgList &msgBitsIn, NavMsgList &msgBitsOut)=0
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::NavFilter::filterName
virtual std::string filterName() const noexcept=0
gnsstk::NavFilter
Definition: NavFilter.hpp:55
gnsstk::NavFilter::NavFilter
NavFilter()
Definition: NavFilter.cpp:45
example6.valid
valid
Definition: example6.py:20
gnsstk::NavFilter::reasonVerbose
virtual std::vector< std::string > reasonVerbose() const noexcept
Definition: NavFilter.hpp:121
example3.data
data
Definition: example3.py:22
ObsID.hpp
std
Definition: Angle.hpp:142
gnsstk::NavFilter::dumpRejected
virtual void dumpRejected(std::ostream &out) const
Debug support.
Definition: NavFilter.cpp:50
gnsstk::NavFilter::processingDepth
virtual unsigned processingDepth() const noexcept=0
NavFilterKey.hpp
gnsstk::NavFilter::NavMsgList
std::list< NavFilterKey * > NavMsgList
Definition: NavFilter.hpp:58
gnsstk::NavFilter::accept
void accept(NavFilterKey *data, NavMsgList &msgBitsOut)
Definition: NavFilter.hpp:172
gnsstk::NavFilterKey
Definition: NavFilterKey.hpp:66


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