SatPassIterator Class Reference

#include <SatPass.hpp>

Collaboration diagram for SatPassIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

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 499 of file SatPass.hpp.

Public Member Functions

 SatPassIterator (std::vector< SatPass > &splist) throw (Exception)
 Explicit (only) constructor.
int next (std::map< unsigned int, unsigned int > &indexMap) throw (Exception)
 Access (all of) the data for the next epoch.
int next (RinexObsData &robs) throw (Exception)
 Access (all of) the data for the next epoch.
void reset (void) throw ()
 Restart the iteration, i.e. return to the initial time.
DayTime getFirstTime (void) throw ()
 Get the first (earliest) time found in the SatPass list.
DayTime getLastTime (void) throw ()
 Get the last (latest) time found in the SatPass list.
DayTime getFirstGoodTime (void) const throw ()
 the earliest time of good data in this SatPass list
DayTime getLastGoodTime (void) const throw ()
 the latest time of good data in this SatPass list
double getDT (void) throw ()
 Get the time interval, which is common to all the SatPass in the list.
std::map< unsigned int, unsigned
int > 
getIndexes (void) throw ()
 get a map of pairs of indexes for the current epoch.


Constructor & Destructor Documentation

SatPassIterator std::vector< SatPass > &  splist  )  throw (Exception) [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 non-zero.

Parameters:
splist Vector of (consistent) SatPass objects
Returns:
1 for success, 0 at the end of the dataset.
Exceptions:
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 593 of file SatPass.cpp.

References gpstk::StringUtils::asString(), GPSTK_THROW, and SatPass::sort.


Member Function Documentation

double getDT void   )  throw () [inline]
 

Get the time interval, which is common to all the SatPass in the list.

Definition at line 562 of file SatPass.hpp.

Referenced by gpstk::SatPassToRinexFile().

DayTime getFirstGoodTime void   )  const throw () [inline]
 

the earliest time of good data in this SatPass list

Definition at line 544 of file SatPass.hpp.

DayTime getFirstTime void   )  throw () [inline]
 

Get the first (earliest) time found in the SatPass list.

Definition at line 538 of file SatPass.hpp.

Referenced by gpstk::SatPassToRinexFile().

std::map<unsigned int,unsigned int> getIndexes void   )  throw () [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 567 of file SatPass.hpp.

DayTime getLastGoodTime void   )  const throw () [inline]
 

the latest time of good data in this SatPass list

Definition at line 553 of file SatPass.hpp.

DayTime getLastTime void   )  throw () [inline]
 

Get the last (latest) time found in the SatPass list.

Definition at line 541 of file SatPass.hpp.

Referenced by gpstk::SatPassToRinexFile().

int next RinexObsData robs  )  throw (Exception)
 

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.

Parameters:
robs RinexObsData in which data is returned.
Returns:
1 for success, 0 at the end of the dataset.
Exceptions:
if time tags are out of order

Definition at line 731 of file SatPass.cpp.

int next std::map< unsigned int, unsigned int > &  indexMap  )  throw (Exception)
 

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.

Parameters:
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.
Returns:
1 for success, 0 at the end of the dataset.
Exceptions:
if time tags are out of order.

Definition at line 656 of file SatPass.cpp.

Referenced by gpstk::SatPassToRinexFile().

void reset void   )  throw ()
 

Restart the iteration, i.e. return to the initial time.

Definition at line 773 of file SatPass.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 03:31:26 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1