SatPassIterator.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 
40 
41 #ifndef GNSSTK_SATELLITE_PASS_ITERATOR_INCLUDE
42 #define GNSSTK_SATELLITE_PASS_ITERATOR_INCLUDE
43 
44 // -------------------------------------------------------------------------------
45 #include "SatPass.hpp"
46 
47 namespace gnsstk
48 {
49  // -------------------------------------------------------------------------------
56  {
57  public:
74  explicit SatPassIterator(std::vector<SatPass>& splist, bool rev = false,
75  bool dbug = false);
76 
78  void reset(bool rev = false, bool dbug = false);
79 
90  int next(std::map<unsigned int, unsigned int>& indexMap);
91 
103  int next(RinexObsData& robs);
104 
107 
109  Epoch getLastTime() { return LastTime; }
110 
113  {
114  Epoch ttag = LastTime;
115  for (int i = 0; i < SPList.size(); i++)
116  if (SPList[i].getFirstGoodTime() < ttag)
117  {
118  ttag = SPList[i].getFirstGoodTime();
119  }
120  return ttag;
121  }
122 
125  {
126  Epoch ttag = FirstTime;
127  for (int i = 0; i < SPList.size(); i++)
128  if (SPList[i].getLastGoodTime() > ttag)
129  {
130  ttag = SPList[i].getLastGoodTime();
131  }
132  return ttag;
133  }
134 
136  double getDT() { return DT; }
137 
144  std::map<unsigned int, unsigned int> getIndexes()
145  {
146  return nextIndexMap;
147  }
148 
149  private:
150  SatPassIterator(const SatPassIterator &); // DO NOT implement
151  SatPassIterator& operator=(const SatPassIterator &); // DO NOT implement
152 
154  bool debug;
155 
158 
160  int currentN; // current time = FirstTime + currentN*DT
161 
166  double DT;
167 
174 
176  std::map<RinexSatID, int> listIndex;
177 
182  std::map<RinexSatID, int> dataIndex;
183 
185  std::map<RinexSatID, int> countOffset;
186 
192  std::vector<int> indexStatus;
193 
195  std::vector<SatPass> &SPList;
196 
201  std::map<unsigned int, unsigned int> nextIndexMap;
202 
203  }; // end class SatPassIterator
204 
205 } // namespace gnsstk
206 
207 #endif // GNSSTK_SATELLITE_PASS_ITERATOR_INCLUDE
gnsstk::SatPassIterator::getIndexes
std::map< unsigned int, unsigned int > getIndexes()
Definition: SatPassIterator.hpp:144
gnsstk::SatPassIterator::DT
double DT
Definition: SatPassIterator.hpp:166
SatPass.hpp
gnsstk::SatPassIterator::listIndex
std::map< RinexSatID, int > listIndex
index of the current object in the list for this satellite
Definition: SatPassIterator.hpp:176
gnsstk::SatPassIterator::currentN
int currentN
count of the current epoch, = 0,1,...
Definition: SatPassIterator.hpp:160
gnsstk::SatPassIterator::operator=
SatPassIterator & operator=(const SatPassIterator &)
gnsstk::SatPassIterator::getLastGoodTime
Epoch getLastGoodTime() const
Definition: SatPassIterator.hpp:124
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::SatPassIterator::nextIndexMap
std::map< unsigned int, unsigned int > nextIndexMap
Definition: SatPassIterator.hpp:201
gnsstk::SatPassIterator::SatPassIterator
SatPassIterator(std::vector< SatPass > &splist, bool rev=false, bool dbug=false)
Definition: SatPassIterator.cpp:52
gnsstk::SatPassIterator::getFirstGoodTime
Epoch getFirstGoodTime() const
Definition: SatPassIterator.hpp:112
gnsstk::SatPassIterator::LastTime
Epoch LastTime
Definition: SatPassIterator.hpp:173
gnsstk::SatPassIterator::countOffset
std::map< RinexSatID, int > countOffset
offset in count of the current object in the list for this satellite
Definition: SatPassIterator.hpp:185
gnsstk::SatPassIterator::indexStatus
std::vector< int > indexStatus
Definition: SatPassIterator.hpp:192
gnsstk::SatPassIterator::getFirstTime
Epoch getFirstTime()
Get the first (earliest) time found in the SatPass list.
Definition: SatPassIterator.hpp:106
gnsstk::SatPassIterator::getDT
double getDT()
Get the time interval, which is common to all the SatPass in the list.
Definition: SatPassIterator.hpp:136
gnsstk::SatPassIterator::FirstTime
Epoch FirstTime
Definition: SatPassIterator.hpp:173
gnsstk::SatPassIterator::next
int next(std::map< unsigned int, unsigned int > &indexMap)
Definition: SatPassIterator.cpp:190
gnsstk::SatPassIterator::SPList
std::vector< SatPass > & SPList
reference to the vector of passes being processed
Definition: SatPassIterator.hpp:195
gnsstk::SatPassIterator::getLastTime
Epoch getLastTime()
Get the last (latest) time found in the SatPass list.
Definition: SatPassIterator.hpp:109
gnsstk::SatPassIterator::debug
bool debug
if true, print debug info in nex()
Definition: SatPassIterator.hpp:154
gnsstk::SatPassIterator
Definition: SatPassIterator.hpp:55
gnsstk::SatPassIterator::timeReverse
bool timeReverse
if true, iterate in reverse time order
Definition: SatPassIterator.hpp:157
gnsstk::Epoch
Definition: Epoch.hpp:123
gnsstk::RinexObsData
Definition: RinexObsData.hpp:68
gnsstk::SatPassIterator::dataIndex
std::map< RinexSatID, int > dataIndex
Definition: SatPassIterator.hpp:182
gnsstk::SatPassIterator::reset
void reset(bool rev=false, bool dbug=false)
Restart the iteration, i.e. return to the initial time.
Definition: SatPassIterator.cpp:114


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