ObsClockModel.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 
49 #ifndef OBSCLOCKMODEL_HPP
50 #define OBSCLOCKMODEL_HPP
51 
52 #include <map>
53 #include "Exception.hpp"
54 #include "gps_constants.hpp"
55 
56 #include "Stats.hpp"
57 #include "ClockModel.hpp"
58 #include "ORDEpoch.hpp"
59 
60 
61 namespace gnsstk
62 {
64 
65 
66  class ObsClockModel : public ClockModel
67  {
68  public:
69  enum SvMode
70  {
74  };
75 
76  enum SvStatus
77  {
78  USED,
84  };
85 
87  typedef std::map<SatID, SvMode> SvModeMap;
88 
90  typedef std::map<SatID, SvStatus> SvStatusMap;
91 
92  ObsClockModel(double sigma = 2, double elmask = 0, SvMode mode = ALWAYS)
93  : sigmam(sigma), elvmask(elmask), useWonkyData(false)
94  {
95  status.clear();
96  setSvMode(mode);
97  }
98 
102  virtual void addEpoch(const ORDEpoch& re) = 0;
103 
104  // set accessor methods ----------------------------------------------
105 
111  ObsClockModel& setSvModeMap(const SvModeMap& right) noexcept;
112 
119  ObsClockModel& setSvMode(const SatID& svid, const SvMode& mode) noexcept
120  { modes[svid] = mode; return *this; }
121 
127  ObsClockModel& setSvMode(const SvMode& mode) noexcept
128  {
129  for(int prn = 1; prn <= gnsstk::MAX_PRN; prn++)
130  {
132  modes[svid] = mode;
133  }
134  return *this;
135  }
136 
142  ObsClockModel& setSigmaMultiplier(double right) noexcept
143  { sigmam = right; return *this; }
144 
150  ObsClockModel& setElevationMask(double right) noexcept
151  { elvmask = right; return *this; }
152 
156  ObsClockModel& setUseWonkyData(bool right) noexcept
157  { useWonkyData = right; return *this; }
158 
159  // get accessor methods ----------------------------------------------
160 
166  const SvStatusMap& getSvStatusMap() const noexcept
167  { return status; };
168 
175  SvStatus getSvStatus(const SatID& svid) const;
176 
181  const SvModeMap& getSvModeMap() const noexcept { return modes; }
182 
189  SvMode getSvMode(const SatID& svid) const;
190 
195  double getSigmaMultiplier() const noexcept { return sigmam; }
196 
201  double getElevationMask() const noexcept { return elvmask; }
202 
203 
207  bool getUseWonkyData() const noexcept
208  { return useWonkyData; }
209 
217 
218  virtual void dump(std::ostream& s, short detail=1) const noexcept;
219 
220  friend std::ostream& operator<<(std::ostream& s, const ObsClockModel& r)
221  { r.dump(s, 0); return s; };
222 
223  protected:
224 
225  double sigmam;
226  double elvmask;
230  };
231 
233 
234 }
235 #endif
gnsstk::ObsClockModel::HEALTHY
@ HEALTHY
include ORDs from this SV if it is healthy
Definition: ObsClockModel.hpp:72
example3.svid
svid
Definition: example3.py:19
gnsstk::ObsClockModel::getSvMode
SvMode getSvMode(const SatID &svid) const
Definition: ObsClockModel.cpp:86
gnsstk::ObsClockModel::SvMode
SvMode
Definition: ObsClockModel.hpp:69
gnsstk::ObsClockModel::simpleOrdClock
Stats< double > simpleOrdClock(const ORDEpoch &oe)
Definition: ObsClockModel.cpp:104
gnsstk::ObsClockModel::SvStatus
SvStatus
Definition: ObsClockModel.hpp:76
gnsstk::ObsClockModel::SVHEALTH
@ SVHEALTH
ORD removed from computation because SV unhealthy.
Definition: ObsClockModel.hpp:80
const
#define const
Definition: getopt.c:43
gnsstk::ObsClockModel::getSigmaMultiplier
double getSigmaMultiplier() const noexcept
Definition: ObsClockModel.hpp:195
gnsstk::ObsClockModel::USED
@ USED
ORD used in the clock bias computation.
Definition: ObsClockModel.hpp:78
gnsstk::ObsClockModel
Definition: ObsClockModel.hpp:66
gnsstk::ObsClockModel::setSigmaMultiplier
ObsClockModel & setSigmaMultiplier(double right) noexcept
Definition: ObsClockModel.hpp:142
gps_constants.hpp
gnsstk::ObsClockModel::getSvStatusMap
const SvStatusMap & getSvStatusMap() const noexcept
Definition: ObsClockModel.hpp:166
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::ObsClockModel::setSvMode
ObsClockModel & setSvMode(const SatID &svid, const SvMode &mode) noexcept
Definition: ObsClockModel.hpp:119
gnsstk::ObsClockModel::WONKY
@ WONKY
ORD removed due to being flagged wonky.
Definition: ObsClockModel.hpp:82
gnsstk::ObsClockModel::addEpoch
virtual void addEpoch(const ORDEpoch &re)=0
gnsstk::ObsClockModel::setElevationMask
ObsClockModel & setElevationMask(double right) noexcept
Definition: ObsClockModel.hpp:150
gnsstk::ObsClockModel::useWonkyData
bool useWonkyData
set to use ords that are flagged wonky
Definition: ObsClockModel.hpp:229
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::Stats< double >
Stats.hpp
gnsstk::SatelliteSystem::GPS
@ GPS
gnsstk::ObsClockModel::status
SvStatusMap status
map of ORD usage in bias computation
Definition: ObsClockModel.hpp:227
gnsstk::ObsClockModel::SIGMA
@ SIGMA
ORD removed from computation because it was outlier.
Definition: ObsClockModel.hpp:83
ORDEpoch.hpp
gnsstk::ObsClockModel::modes
SvModeMap modes
map of modes to use ORDs in bias computation
Definition: ObsClockModel.hpp:228
gnsstk::ObsClockModel::setSvModeMap
ObsClockModel & setSvModeMap(const SvModeMap &right) noexcept
Definition: ObsClockModel.cpp:73
gnsstk::ObsClockModel::ALWAYS
@ ALWAYS
always include ORDs from this SV
Definition: ObsClockModel.hpp:73
gnsstk::ClockModel
Definition: ClockModel.hpp:62
gnsstk::MAX_PRN
const long MAX_PRN
Definition: gps_constants.hpp:55
gnsstk::ObsClockModel::MANUAL
@ MANUAL
ORD removed from computation by user request.
Definition: ObsClockModel.hpp:79
gnsstk::ObsClockModel::elvmask
double elvmask
elevation mask angle for ORD stripping
Definition: ObsClockModel.hpp:226
gnsstk::ObsClockModel::dump
virtual void dump(std::ostream &s, short detail=1) const noexcept
Definition: ObsClockModel.cpp:172
gnsstk::ObsClockModel::setUseWonkyData
ObsClockModel & setUseWonkyData(bool right) noexcept
Definition: ObsClockModel.hpp:156
example5.oe
oe
Definition: example5.py:19
gnsstk::ObsClockModel::sigmam
double sigmam
sigma multiple value for ORD stripping
Definition: ObsClockModel.hpp:221
gnsstk::ObsClockModel::SvModeMap
std::map< SatID, SvMode > SvModeMap
defines a store for each SV's SvMode
Definition: ObsClockModel.hpp:87
gnsstk::ObsClockModel::ObsClockModel
ObsClockModel(double sigma=2, double elmask=0, SvMode mode=ALWAYS)
Definition: ObsClockModel.hpp:92
gnsstk::ORDEpoch
Definition: ORDEpoch.hpp:59
Exception.hpp
std
Definition: Angle.hpp:142
gnsstk::ObsClockModel::ELEVATION
@ ELEVATION
ORD removed from computation because SV elevation < mask.
Definition: ObsClockModel.hpp:81
gnsstk::ObsClockModel::getSvModeMap
const SvModeMap & getSvModeMap() const noexcept
Definition: ObsClockModel.hpp:181
gnsstk::ObsClockModel::setSvMode
ObsClockModel & setSvMode(const SvMode &mode) noexcept
Definition: ObsClockModel.hpp:127
ClockModel.hpp
gnsstk::ObsClockModel::getSvStatus
SvStatus getSvStatus(const SatID &svid) const
Definition: ObsClockModel.cpp:58
gnsstk::ObsClockModel::getUseWonkyData
bool getUseWonkyData() const noexcept
Definition: ObsClockModel.hpp:207
gnsstk::ObsClockModel::getElevationMask
double getElevationMask() const noexcept
Definition: ObsClockModel.hpp:201
gnsstk::ObsClockModel::IGNORE
@ IGNORE
do not include ORDs from this SV
Definition: ObsClockModel.hpp:71
gnsstk::ObsClockModel::SvStatusMap
std::map< SatID, SvStatus > SvStatusMap
defines a store for each SV's SvStatus
Definition: ObsClockModel.hpp:90


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