Iterate over a list (vector) of SatPass using this class. NB. this class ignores passes that have Status less than zero, but does not change any Status.
Definition at line 55 of file SatPassIterator.hpp.
#include <SatPassIterator.hpp>
Public Member Functions | |
double | getDT () |
Get the time interval, which is common to all the SatPass in the list. More... | |
Epoch | getFirstGoodTime () const |
Epoch | getFirstTime () |
Get the first (earliest) time found in the SatPass list. More... | |
std::map< unsigned int, unsigned int > | getIndexes () |
Epoch | getLastGoodTime () const |
Epoch | getLastTime () |
Get the last (latest) time found in the SatPass list. More... | |
int | next (RinexObsData &robs) |
int | next (std::map< unsigned int, unsigned int > &indexMap) |
void | reset (bool rev=false, bool dbug=false) |
Restart the iteration, i.e. return to the initial time. More... | |
SatPassIterator (std::vector< SatPass > &splist, bool rev=false, bool dbug=false) | |
Private Member Functions | |
SatPassIterator & | operator= (const SatPassIterator &) |
SatPassIterator (const SatPassIterator &) | |
Private Attributes | |
std::map< RinexSatID, int > | countOffset |
offset in count of the current object in the list for this satellite More... | |
int | currentN |
count of the current epoch, = 0,1,... More... | |
std::map< RinexSatID, int > | dataIndex |
bool | debug |
if true, print debug info in nex() More... | |
double | DT |
Epoch | FirstTime |
std::vector< int > | indexStatus |
Epoch | LastTime |
std::map< RinexSatID, int > | listIndex |
index of the current object in the list for this satellite More... | |
std::map< unsigned int, unsigned int > | nextIndexMap |
std::vector< SatPass > & | SPList |
reference to the vector of passes being processed More... | |
bool | timeReverse |
if true, iterate in reverse time order More... | |
|
explicit |
Explicit (only) constructor. Check the list for consistency (else throw) and find common time step and obs types, as well as first and last times. Ignore passes with Status less than zero. After building a vector<SatPass> (in time order), declare an iterator using this constructor, then call member function next(RinexObsData&) to access the data in time order, until it returns zero.
splist | Vector of (consistent) SatPass objects |
rev | If true, interate in reverse time order |
dbug | If true, print debug info in next() |
Exception | if input list is empty, or if elements in the list have differing data interval or obs types, or if any observation type is not registered (cf. RinexUtilities.hpp) |
Definition at line 52 of file SatPassIterator.cpp.
|
private |
|
inline |
Get the time interval, which is common to all the SatPass in the list.
Definition at line 136 of file SatPassIterator.hpp.
|
inline |
Definition at line 112 of file SatPassIterator.hpp.
|
inline |
Get the first (earliest) time found in the SatPass list.
Definition at line 106 of file SatPassIterator.hpp.
|
inline |
get a map of pairs of indexes for the current epoch. call this after calling next() to get pairs (i,j) where the data returned by next() is the same as SatPassList[i].data(j,<obstype>), for each i in the map, and j=map[i].
Definition at line 144 of file SatPassIterator.hpp.
|
inline |
Definition at line 124 of file SatPassIterator.hpp.
|
inline |
Get the last (latest) time found in the SatPass list.
Definition at line 109 of file SatPassIterator.hpp.
int gnsstk::SatPassIterator::next | ( | RinexObsData & | robs | ) |
Access (all of) the data for the next epoch. As long as this function returns non-zero, there is more data to be accessed. Ignore passes with Status less than zero. NB. If SatPass obs types are not registered (cf. RinexUtilities.hpp), then data will NOT be added to RinexObsData. NB. This assumes that all the SatPasses have the same obs in the same order!!
robs | RinexObsData in which data is returned. |
Exception | if time tags are out of order |
Definition at line 396 of file SatPassIterator.cpp.
int gnsstk::SatPassIterator::next | ( | std::map< unsigned int, unsigned int > & | indexMap | ) |
Access (all of) the data for the next epoch. As long as this function returns non-zero, there is more data to be accessed. Ignore passes with Status less than zero.
indexMap | map<unsigned int, unsigned int> defined so that all the data in the current iteration is found at SatPassList[i].data(j) where indexMap[i] = j. |
Exception | if time tags are out of order. |
Definition at line 190 of file SatPassIterator.cpp.
|
private |
void gnsstk::SatPassIterator::reset | ( | bool | rev = false , |
bool | dbug = false |
||
) |
Restart the iteration, i.e. return to the initial time.
Definition at line 114 of file SatPassIterator.cpp.
|
private |
offset in count of the current object in the list for this satellite
Definition at line 185 of file SatPassIterator.hpp.
|
private |
count of the current epoch, = 0,1,...
Definition at line 160 of file SatPassIterator.hpp.
|
private |
index of the data vector (spdvector) of the current object in the list for this satellite
Definition at line 182 of file SatPassIterator.hpp.
|
private |
if true, print debug info in nex()
Definition at line 154 of file SatPassIterator.hpp.
|
private |
time step (seconds) found in all objects in the list (constructor throws if they are not identical).
Definition at line 166 of file SatPassIterator.hpp.
|
private |
first (earliest) start time (getFirstGoodTime()) of the passes in the list, and last (latest) end time (getLastGoodTime()) of the passes in the list.
Definition at line 173 of file SatPassIterator.hpp.
|
private |
vector parallel to SPList used to mark current use by iteration; value is "-1,0,1" as SPList[i] is "yet to be used, in use, done". This has nothing to do with SatPass::Status()
Definition at line 192 of file SatPassIterator.hpp.
|
private |
Definition at line 173 of file SatPassIterator.hpp.
|
private |
index of the current object in the list for this satellite
Definition at line 176 of file SatPassIterator.hpp.
|
private |
map of indexes i,j, created by next(), such that data returned by next() is found at SatPassList[i].spdvector[j] where map[i]=j.
Definition at line 201 of file SatPassIterator.hpp.
|
private |
reference to the vector of passes being processed
Definition at line 195 of file SatPassIterator.hpp.
|
private |
if true, iterate in reverse time order
Definition at line 157 of file SatPassIterator.hpp.