msecHandler.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 
42 #ifndef GNSSTK_MSHANDLER_INCLUDE
43 #define GNSSTK_MSHANDLER_INCLUDE
44 
45 #include <map>
46 #include <string>
47 #include <vector>
48 
49 #include "CommonTime.hpp"
50 #include "Exception.hpp"
51 #include "SatID.hpp"
52 
53 namespace gnsstk
54 {
55  // -------------------------------------------------------------------------------
67  {
68  private:
69  // member data
70  double dt;
71 
72  // estimation
73  int N;
74  std::vector<std::string>
76  std::vector<double> wavelengths;
78  // keep the following parallel
79  std::vector<std::map<SatID, double>> curr,
80  past;
81  std::vector<double> ave;
82  std::vector<int> npt;
83 
84  /* consistency of adjusts
85  record results; typesMap = count adjusts/unique set obs types, should
86  be only 1 */
87  std::map<std::string, int>
89 
90  // messages to pass back
91  std::string findMsg, fixMsg;
92 
93  // the adjusts - keep these parallel
94  std::vector<CommonTime> times;
95  std::vector<int> nms;
96  std::vector<std::vector<std::string>> ots;
97  std::vector<std::string> adjMsgs;
98  std::vector<std::string> editCmds;
99  std::vector<std::string> badMsgs;
100 
101  // fixing
102  bool doPR;
103  int ims, ntot;
104 
105  // piece-wise linear clock model
106  bool rmvClk;
107  double intercept, slope;
109 
110  // static const double wl1, wl2;
111  static const double Rfact;
112 
116  void compute(const CommonTime ttag);
117 
118  public:
121  msecHandler();
122 
124  void reset();
125 
131  void setObstypes(const std::vector<std::string> &ots,
132  const std::vector<double> &waves);
133 
135  std::vector<std::string> getObsTypes()
136  {
137  std::vector<std::string> ots = obstypes;
138  return ots;
139  }
140 
142  void setDT(double dt_in) { dt = dt_in; }
143 
151  void add(CommonTime ttag, const SatID sat, const std::string obstype, double data);
152 
155  int afterAddbeforeFix();
156 
166  void fix(CommonTime &ttag, const SatID sat, const std::string obstype, double &data);
167 
169  std::string getFindMessage(bool verbose = false);
170 
172  std::vector<std::string> getEditCommands() { return editCmds; }
173 
175  std::string getFixMessage(bool verbose = false) { return fixMsg; }
176 
178  int getNMS() { return times.size(); }
179 
181  int getNbadMS() { return badMsgs.size(); }
182 
185  std::map<gnsstk::CommonTime, int> getAdjusts();
186 
187  }; // end class msecHandler
188 
189 } // namespace gnsstk
190 
191 #endif // GNSSTK_MSHANDLER_INCLUDE
gnsstk::msecHandler::compute
void compute(const CommonTime ttag)
Definition: msecHandler.cpp:356
gnsstk::msecHandler::nms
std::vector< int > nms
number of ms
Definition: msecHandler.hpp:95
gnsstk::msecHandler::setObstypes
void setObstypes(const std::vector< std::string > &ots, const std::vector< double > &waves)
Definition: msecHandler.cpp:108
gnsstk::msecHandler::npt
std::vector< int > npt
number of data per obstypes
Definition: msecHandler.hpp:82
gnsstk::msecHandler::prevttag
CommonTime prevttag
Definition: msecHandler.hpp:77
gnsstk::msecHandler::getNbadMS
int getNbadMS()
get the number of invalid adjusts found
Definition: msecHandler.hpp:181
gnsstk::msecHandler::fixMsg
std::string fixMsg
messages that are passed to caller
Definition: msecHandler.hpp:91
gnsstk::msecHandler::doPR
bool doPR
if adjusts appear in pseudorange, fix time tags also
Definition: msecHandler.hpp:102
gnsstk::msecHandler::fix
void fix(CommonTime &ttag, const SatID sat, const std::string obstype, double &data)
Definition: msecHandler.cpp:214
gnsstk::msecHandler::getNMS
int getNMS()
get number of valid adjusts found
Definition: msecHandler.hpp:178
gnsstk::msecHandler::curr
std::vector< std::map< SatID, double > > curr
Definition: msecHandler.hpp:79
gnsstk::msecHandler::times
std::vector< CommonTime > times
time of adjust
Definition: msecHandler.hpp:94
gnsstk::msecHandler
Definition: msecHandler.hpp:66
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::msecHandler::reset
void reset()
Reset the object.
Definition: msecHandler.cpp:84
gnsstk::msecHandler::currttag
CommonTime currttag
for tracking timetags internally
Definition: msecHandler.hpp:77
SatID.hpp
gnsstk::msecHandler::slope
double slope
the piece-wise linear model
Definition: msecHandler.hpp:107
gnsstk::msecHandler::wavelengths
std::vector< double > wavelengths
wavelengths of obstypes - 0 for code
Definition: msecHandler.hpp:76
gnsstk::msecHandler::past
std::vector< std::map< SatID, double > > past
storing data internally
Definition: msecHandler.hpp:80
gnsstk::msecHandler::typesMap
std::map< std::string, int > typesMap
[string "P1 C2 !L1 !L2"] = number of adj
Definition: msecHandler.hpp:88
gnsstk::msecHandler::add
void add(CommonTime ttag, const SatID sat, const std::string obstype, double data)
Definition: msecHandler.cpp:124
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::msecHandler::Rfact
static const double Rfact
one ms in m,L1cyc,L2cyc
Definition: msecHandler.hpp:111
gnsstk::msecHandler::dt
double dt
nominal time spacing
Definition: msecHandler.hpp:70
gnsstk::msecHandler::msecHandler
msecHandler()
Definition: msecHandler.cpp:63
gnsstk::msecHandler::getAdjusts
std::map< gnsstk::CommonTime, int > getAdjusts()
Definition: msecHandler.cpp:342
gnsstk::msecHandler::obstypes
std::vector< std::string > obstypes
obstypes to monitor (L1 L2 C1 C2 P1 P2)
Definition: msecHandler.hpp:75
gnsstk::msecHandler::ims
int ims
Definition: msecHandler.hpp:103
gnsstk::msecHandler::ots
std::vector< std::vector< std::string > > ots
ots that jump
Definition: msecHandler.hpp:96
gnsstk::msecHandler::badMsgs
std::vector< std::string > badMsgs
bad ones
Definition: msecHandler.hpp:99
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::msecHandler::getEditCommands
std::vector< std::string > getEditCommands()
get find message in the form of editing commands for EditRinex
Definition: msecHandler.hpp:172
gnsstk::msecHandler::findMsg
std::string findMsg
Definition: msecHandler.hpp:91
gnsstk::msecHandler::setDT
void setDT(double dt_in)
must set the nominal timestep before any add() or fix()
Definition: msecHandler.hpp:142
gnsstk::msecHandler::N
int N
number of obstypes (6)
Definition: msecHandler.hpp:73
example3.data
data
Definition: example3.py:22
gnsstk::msecHandler::editCmds
std::vector< std::string > editCmds
adjust editing cmds
Definition: msecHandler.hpp:98
gnsstk::msecHandler::tref
CommonTime tref
reference time for the linear models
Definition: msecHandler.hpp:108
Exception.hpp
CommonTime.hpp
gnsstk::msecHandler::ntot
int ntot
internal bookkeeping on which adjust, total ms adjust
Definition: msecHandler.hpp:103
gnsstk::msecHandler::adjMsgs
std::vector< std::string > adjMsgs
adjust summary (i/o)
Definition: msecHandler.hpp:97
gnsstk::msecHandler::getFixMessage
std::string getFixMessage(bool verbose=false)
get messages generated during fixing phase
Definition: msecHandler.hpp:175
gnsstk::msecHandler::ave
std::vector< double > ave
average step per obstypes
Definition: msecHandler.hpp:81
gnsstk::msecHandler::getFindMessage
std::string getFindMessage(bool verbose=false)
get messages generated during detection phase
Definition: msecHandler.cpp:287
gnsstk::msecHandler::afterAddbeforeFix
int afterAddbeforeFix()
Definition: msecHandler.cpp:170
gnsstk::msecHandler::rmvClk
bool rmvClk
NB currently hardcoded false.
Definition: msecHandler.hpp:106
gnsstk::msecHandler::getObsTypes
std::vector< std::string > getObsTypes()
Get the obstypes used in the detector.
Definition: msecHandler.hpp:135
gnsstk::msecHandler::intercept
double intercept
Definition: msecHandler.hpp:107


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