PNBGLOFNavDataFactory.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 //
28 // This software was developed by Applied Research Laboratories at the
29 // University of Texas at Austin, under contract to an agency or agencies
30 // within the U.S. Department of Defense. The U.S. Government retains all
31 // rights to use, duplicate, distribute, disclose, or release this software.
32 //
33 // Pursuant to DoD Directive 523024
34 //
35 // DISTRIBUTION STATEMENT A: This software has been approved for public
36 // release, distribution is unlimited.
37 //
38 //==============================================================================
39 #ifndef GNSSTK_PNBGLOFNAVDATAFACTORY_HPP
40 #define GNSSTK_PNBGLOFNAVDATAFACTORY_HPP
41 
42 #include "PNBNavDataFactory.hpp"
44 #include "ValidType.hpp"
45 
46 namespace gnsstk
47 {
49 
50 
60  {
61  public:
64 
73  bool addData(const PackedNavBitsPtr& navIn, NavDataPtrList& navOut,
74  double cadence = -1)
75  override;
76 
83  void resetState() override;
84 
99  bool processEph(unsigned long stringID, const PackedNavBitsPtr& navIn,
100  NavDataPtrList& navOut);
101 
115  bool processAlm(unsigned long stringID, const PackedNavBitsPtr& navIn,
116  NavDataPtrList& navOut);
117 
134  bool processAlmOrb(const NavSatelliteID& key, unsigned almIdx,
135  NavDataPtrList& navOut);
136 
146  bool processTime(const PackedNavBitsPtr& navIn, NavDataPtrList& navOut);
147 
157  bool processTimeUT1(const PackedNavBitsPtr& navIn,
158  NavDataPtrList& navOut);
159 
165  unsigned getFrameNum(const CommonTime& xmitTime);
166 
168  inline static bool validSize(const PackedNavBitsPtr& navIn)
169  {
170  size_t sz = navIn->getNumBits();
171  return ((sz == 85) || (sz == 96));
172  }
173 
174  protected:
176  class TimeMeta
177  {
178  public:
180  operator NavDataPtr() const;
182  void setNT(unsigned v);
184  void setNA(unsigned v);
186  bool isValid();
191  private:
192  // keep these private so they can't be changed without
193  // resetting B1/B2, particularly B2 which depends on the
194  // values of NT and NA.
197  };
200  std::map<NavSatelliteID, TimeMeta> timeAcc;
204  std::map<NavSatelliteID, std::vector<PackedNavBitsPtr> > ephAcc;
208  std::map<NavSatelliteID, std::vector<PackedNavBitsPtr> > almAcc;
209 
210  // Some or all of these are likely going to get put into a
211  // time offset class.
212 
217 
221  }; // class PNBGLOFNavDataFactory
222 
224 
225 } // namespace gnsstk
226 
227 #endif // GNSSTK_PNBGLOFNAVDATAFACTORY_HPP
gnsstk::NavDataPtr
std::shared_ptr< NavData > NavDataPtr
Factories instantiate these in response to find() requests.
Definition: NavData.hpp:62
gnsstk::ValidType< double >
gnsstk::PackedNavBitsPtr
std::shared_ptr< PackedNavBits > PackedNavBitsPtr
Managed pointer for passing PackedNavBits around.
Definition: PackedNavBits.hpp:66
gnsstk::PNBGLOFNavDataFactory::almDOY
CommonTime almDOY
Used to set the reference almanac time.
Definition: PNBGLOFNavDataFactory.hpp:216
gnsstk::PNBGLOFNavDataFactory::TimeMeta::tauc
vdouble tauc
GLONASS time scale correction to UTC(SU) time.
Definition: PNBGLOFNavDataFactory.hpp:187
gnsstk::PNBGLOFNavDataFactory::validSize
static bool validSize(const PackedNavBitsPtr &navIn)
Return true if the PNB is 85 or 96 bits.
Definition: PNBGLOFNavDataFactory.hpp:168
ValidType.hpp
gnsstk::NavSatelliteID
Definition: NavSatelliteID.hpp:57
gnsstk::NavDataPtrList
std::list< NavDataPtr > NavDataPtrList
Definition: NavData.hpp:75
gnsstk::PNBGLOFNavDataFactory::TimeMeta::B1
vdouble B1
GLONASS-UT1 offset.
Definition: PNBGLOFNavDataFactory.hpp:188
gnsstk::PNBGLOFNavDataFactory::TimeMeta::NA
vuint NA
NT but for almanac instead of ephemeris.
Definition: PNBGLOFNavDataFactory.hpp:196
gnsstk::PNBGLOFNavDataFactory::almAcc
std::map< NavSatelliteID, std::vector< PackedNavBitsPtr > > almAcc
Definition: PNBGLOFNavDataFactory.hpp:208
gnsstk::PNBNavDataFactory::processAlm
bool processAlm
If true, almanac data will be output by addData.
Definition: PNBNavDataFactory.hpp:126
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::PNBGLOFNavDataFactory::resetState
void resetState() override
Definition: PNBGLOFNavDataFactory.cpp:608
gnsstk::PNBGLOFNavDataFactory::processTimeUT1
bool processTimeUT1(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBGLOFNavDataFactory.cpp:565
gnsstk::PNBGLOFNavDataFactory::btsc
BasicTimeSystemConverter btsc
Used to convert time stamps to and from GLONASS.
Definition: PNBGLOFNavDataFactory.hpp:214
gnsstk::PNBGLOFNavDataFactory::PNBGLOFNavDataFactory
PNBGLOFNavDataFactory()
Initialize data members.
Definition: PNBGLOFNavDataFactory.cpp:59
gnsstk::PNBGLOFNavDataFactory::pendingAlms
bool pendingAlms
Definition: PNBGLOFNavDataFactory.hpp:220
BasicTimeSystemConverter.hpp
gnsstk::PNBGLOFNavDataFactory::ephAcc
std::map< NavSatelliteID, std::vector< PackedNavBitsPtr > > ephAcc
Definition: PNBGLOFNavDataFactory.hpp:204
PNBNavDataFactory.hpp
gnsstk::PNBNavDataFactory::processEph
bool processEph
If true, ephemeris data will be output by addData.
Definition: PNBNavDataFactory.hpp:124
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::PNBGLOFNavDataFactory::TimeMeta::setNA
void setNA(unsigned v)
Set the value of NA (from string 5).
Definition: PNBGLOFNavDataFactory.cpp:641
gnsstk::PNBGLOFNavDataFactory::processTime
bool processTime(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBGLOFNavDataFactory.cpp:486
gnsstk::PNBGLOFNavDataFactory
Definition: PNBGLOFNavDataFactory.hpp:59
gnsstk::PNBGLOFNavDataFactory::TimeMeta::setNT
void setNT(unsigned v)
Set the value of NT (from string 4).
Definition: PNBGLOFNavDataFactory.cpp:632
gnsstk::PNBGLOFNavDataFactory::TimeMeta::isValid
bool isValid()
Return true if all data fields are valid.
Definition: PNBGLOFNavDataFactory.cpp:650
gnsstk::BasicTimeSystemConverter
Definition: BasicTimeSystemConverter.hpp:51
gnsstk::PNBGLOFNavDataFactory::timeAcc
std::map< NavSatelliteID, TimeMeta > timeAcc
Definition: PNBGLOFNavDataFactory.hpp:200
gnsstk::PNBGLOFNavDataFactory::TimeMeta::NT
vuint NT
Current calendar number of day w/in 4-year interval.
Definition: PNBGLOFNavDataFactory.hpp:195
gnsstk::PNBGLOFNavDataFactory::TimeMeta::B2
vdouble B2
GLONASS-UT1 drift.
Definition: PNBGLOFNavDataFactory.hpp:189
gnsstk::PNBGLOFNavDataFactory::getFrameNum
unsigned getFrameNum(const CommonTime &xmitTime)
Definition: PNBGLOFNavDataFactory.cpp:592
gnsstk::PNBGLOFNavDataFactory::TimeMeta
Class to store fields used to turn GLONASS into UT1.
Definition: PNBGLOFNavDataFactory.hpp:176
gnsstk::PNBGLOFNavDataFactory::processAlmOrb
bool processAlmOrb(const NavSatelliteID &key, unsigned almIdx, NavDataPtrList &navOut)
Definition: PNBGLOFNavDataFactory.cpp:377
gnsstk::PNBGLOFNavDataFactory::addData
bool addData(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut, double cadence=-1) override
Definition: PNBGLOFNavDataFactory.cpp:67
gnsstk::PNBGLOFNavDataFactory::TimeMeta::KP
vuint KP
??
Definition: PNBGLOFNavDataFactory.hpp:190
gnsstk::PNBNavDataFactory
Definition: PNBNavDataFactory.hpp:61


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