#include <SatPass.hpp>
Inheritance diagram for SatPass:


Constructed and filled by the calling program, it is used to pass data into and out of the GPSTK discontinuity corrector. NB. if objects of this class are combined together, e.g. in STL containers such as list or vector, they MUST be consistently defined, namely the number of observation types must be the same, otherwise a nasty segmentation fault can occur when building the STL container.
Definition at line 52 of file SatPass.hpp.
Public Member Functions | |
| SatPass (GSatID sat, double dt) throw () | |
| Constructor for the given sat; default obs types are L1, L2, P1, P2, in that order; dt is the nominal time spacing of the data. | |
| SatPass (GSatID sat, double dt, std::vector< std::string > obstypes) throw () | |
| Constructor from a list of strings <=> RINEX obs types to be read NB. | |
| SatPass & | operator= (const SatPass &right) throw () |
| int | addData (const CommonTime tt, std::vector< std::string > &obstypes, std::vector< double > &data) throw (Exception) |
| Add vector of data, identified by obstypes (same as used in c'tor) at tt, Flag is set 'good' and lli=ssi=0. | |
| int | addData (const CommonTime tt, std::vector< std::string > &obstypes, std::vector< double > &data, std::vector< unsigned short > &lli, std::vector< unsigned short > &ssi, unsigned short flag=SatPass::OK) throw (Exception) |
| Add vector of data, identified by obstypes (same as used in c'tor) at tt, Flag, lli and ssi are set using input (parallel to data). | |
| int | addData (const RinexObsData &robs) throw () |
| Add data as found in RinexObsData. | |
| void | smooth (bool smoothPR, bool smoothPH, std::string &msg) throw (Exception) |
| Smooth pseudorange and debias phase. | |
| int & | status (void) throw () |
| Access the status; l-value may be assigned SP.status() = 1;. | |
| double & | data (unsigned int i, std::string type) throw (Exception) |
| Access the data for one obs type at one index, as either l-value or r-value. | |
| double & | timeoffset (unsigned int i) throw (Exception) |
| Access the time offset from the nominal time (i.e. | |
| unsigned short & | LLI (unsigned int i, std::string type) throw (Exception) |
| Access the LLI for one obs type at one index, as either l-value or r-value. | |
| unsigned short & | SSI (unsigned int i, std::string type) throw (Exception) |
| Access the ssi for one obs type at one index, as either l-value or r-value. | |
| void | setOutputFormat (std::string fmt) |
| set timetag output format | |
| void | setFlag (unsigned int i, unsigned short flag) throw (Exception) |
| set the flag at one index to flag - use the SatPass constants OK, etc. | |
| double | getMaxGap (void) const throw () |
| get the max. | |
| std::vector< std::string > | getObsTypes (void) throw () |
| get the list of obstypes | |
| unsigned short | getFlag (unsigned int i) throw (Exception) |
| get the flag at one index | |
| CommonTime | getFirstTime (void) const throw () |
| the earliest time in this SatPass data | |
| CommonTime | getLastTime (void) const throw () |
| the latest time in this SatPass data | |
| CommonTime | getFirstGoodTime (void) const throw () |
| the earliest time of good data in this SatPass data | |
| CommonTime | getLastGoodTime (void) const throw () |
| the latest time of good data in this SatPass data | |
| GSatID | getSat (void) const throw () |
| get the satellite of this SatPass | |
| double | getDT (void) const throw () |
| get the time interval of this SatPass | |
| int | getNgood (void) const throw () |
| get the number of good points in this SatPass | |
| unsigned int | size (void) const throw () |
| get the size of (the arrays in) this SatPass | |
| unsigned int | getCount (unsigned int i) const throw (Exception) |
| get one element of the count array of this SatPass | |
| void | clear (void) throw () |
| clear the data (but not the obs types) from the arrays | |
| CommonTime | time (unsigned int i) const throw (Exception) |
| compute the timetag associated with index i in the data array | |
| bool | includesTime (const CommonTime &tt) const throw () |
| return true if the given timetag is or could be part of this pass | |
| bool | split (int N, SatPass &newSP) |
| create a new SatPass from the given one, starting at count N. | |
| void | decimate (const int N, CommonTime refTime=CommonTime::BEGINNING_OF_TIME) throw (Exception) |
| Decimate the data in the SatPass by (integer) factor N, referencing refTime; that is keep only epochs that satisfy time=refTime+n*N*dt where n is also an integer, and dt is the current time spacing of the time spacing of the SatPass. | |
| void | dump (std::ostream &os, std::string msg1, std::string msg2=std::string()) throw () |
| Dump all the data in the pass, one line per timetag. | |
| bool | operator< (const SatPass &right) const |
| 'less than' is required for sort() and map<SatPass,...>.find(SatPass) | |
Static Public Member Functions | |
| double | setMaxGap (const double gap) |
| change the maximum time gap (in seconds) allowed within any SatPass | |
Static Public Attributes | |
| const unsigned short | BAD = 0 |
| flag indicating bad data | |
| const unsigned short | OK = 1 |
| flag indicating good data with no phase discontinuity NB test for 'good' data using (flag != SatPass::BAD), NOT (flag == SatPass::OK). | |
| const unsigned short | LL1 = 2 |
| flag indicating good data with phase discontinuity on L1 only. | |
| const unsigned short | LL2 = 4 |
| flag indicating good data with phase discontinuity on L2 only. | |
| const unsigned short | LL3 = 6 |
| flag indicating good data with phase discontinuity on both L1 and L2. | |
| double | maxGap = 1800 |
| size of maximum time gap, in seconds, allowed within SatPass data. | |
| std::string | outFormat = string("%4F %10.3g") |
| format string, as defined in class CommonTime, for output of times used by smooth (debug), dump and operator<< | |
Protected Member Functions | |
| int | countForTime (const CommonTime &tt) const throw (Exception) |
| compute the count associated with the time tt; return -1 if not within the time limits of the SatPass | |
| void | init (GSatID sat, double dt, std::vector< std::string > obstypes) throw () |
| called by constructors to initialize - see doc for them. | |
| int | push_back (const CommonTime tt, SatPassData &spd) throw () |
| add a complete SatPassData at time tt | |
| SatPassData | getData (unsigned int i) const throw (Exception) |
| get a complete SatPassData at count i | |
Protected Attributes | |
| int | Status |
| Status flag for use exclusively by the caller. | |
| double | dt |
| Nominal time spacing of the data; determined on input or by decimate(). | |
| GSatID | sat |
| Satellite identifier for this data. | |
| std::map< std::string, unsigned int > | indexForLabel |
| STL map relating strings identifying obs types with indexes in SatPassData. | |
| std::map< unsigned int, std::string > | labelForIndex |
| CommonTime | firstTime |
| timetags of the first and last data points. | |
| CommonTime | lastTime |
| timetags of the first and last data points. | |
| unsigned int | ngood |
| number of timetags with good data in the data arrays. | |
| std::vector< SatPassData > | spdvector |
| ALL data in the pass, stored in SatPassData objects, in time order. | |
Friends | |
| class | SatPassIterator |
| class SatPassIterator allows the caller to access all the data in a list of SatPass objects in time order. | |
| std::ostream & | operator<< (std::ostream &os, SatPass &sp) |
| Write a one-line summary of the object, consisting of total points, satellite, number of good points, status, start time, end time, time step (sec), and observation types. | |
| void | sort (std::vector< SatPass > &SPList) throw () |
| Sort a vector<SatPass> on time, using the firstTime member. | |
| int | SatPassFromRinexFiles (std::vector< std::string > &filenames, std::vector< std::string > &obstypes, double dt, std::vector< SatPass > &SPList, gpstk::CommonTime beginTime=gpstk::CommonTime::BEGINNING_OF_TIME, gpstk::CommonTime endTime=gpstk::CommonTime::END_OF_TIME) throw (Exception) |
| Read a set of RINEX observation files, filling a vector of SatPass objects. | |
| int | SatPassToRinexFile (std::string filename, RinexObsHeader &header, std::vector< SatPass > &SPList) throw (Exception) |
| Iterate over the input vector of SatPass objects (sorted to be in time order) and write them, with the given header, to a RINEX observation file of the given filename. | |
|
||||||||||||
|
Constructor for the given sat; default obs types are L1, L2, P1, P2, in that order; dt is the nominal time spacing of the data. NB. dt MUST be correct.
Definition at line 65 of file SatPass.cpp. Referenced by SatPass::split(). |
|
||||||||||||||||
|
Constructor from a list of strings <=> RINEX obs types to be read NB. The number of obstypes determines the size of the SatPass object; therefore objects with different numbers of obs types must not be combined together in things like STL containers, which assume a fixed size for all objects of one class. NB. dt MUST be correct.
|
|
|
Add data as found in RinexObsData. No action if this->sat is not found. Pull out time tag and all data in obs type list. All flags are set 'good'.
Definition at line 167 of file SatPass.cpp. |
|
||||||||||||||||||||||||||||
|
Add vector of data, identified by obstypes (same as used in c'tor) at tt, Flag, lli and ssi are set using input (parallel to data).
Definition at line 126 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. |
|
||||||||||||||||
|
Add vector of data, identified by obstypes (same as used in c'tor) at tt, Flag is set 'good' and lli=ssi=0.
Definition at line 115 of file SatPass.cpp. References GPSTK_RETHROW. Referenced by GDCPass::GDCPass(). |
|
|
clear the data (but not the obs types) from the arrays
Definition at line 269 of file SatPass.hpp. Referenced by GDCPass::GDCPass(). |
|
|
compute the count associated with the time tt; return -1 if not within the time limits of the SatPass
Definition at line 351 of file SatPass.hpp. Referenced by SatPass::split(). |
|
||||||||||||
|
Access the data for one obs type at one index, as either l-value or r-value.
Definition at line 305 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. Referenced by GDCPass::GDCPass(), and SatPass::SatPassData::operator=(). |
|
||||||||||||
|
Decimate the data in the SatPass by (integer) factor N, referencing refTime; that is keep only epochs that satisfy time=refTime+n*N*dt where n is also an integer, and dt is the current time spacing of the time spacing of the SatPass. This routine decimates the data, reduces the arrays, and may change the start and stop times and ngood; time offsets are not changed.
Definition at line 458 of file SatPass.cpp. References GPSTK_RETHROW. |
|
||||||||||||||||
|
Dump all the data in the pass, one line per timetag.
Definition at line 501 of file SatPass.cpp. References gpstk::printTime(). |
|
|
get one element of the count array of this SatPass
Definition at line 381 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. |
|
|
get a complete SatPassData at count i
Definition at line 580 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. |
|
|
get the time interval of this SatPass
Definition at line 250 of file SatPass.hpp. Referenced by GDCPass::GDCPass(). |
|
|
the earliest time of good data in this SatPass data
Definition at line 229 of file SatPass.hpp. |
|
|
the earliest time in this SatPass data
Definition at line 215 of file SatPass.hpp. |
|
|
get the flag at one index
Definition at line 371 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. Referenced by GDCPass::GDCPass(). |
|
|
the latest time of good data in this SatPass data
Definition at line 237 of file SatPass.hpp. |
|
|
the latest time in this SatPass data This should be necessary only when the timeoffset's have been altered...use with caution.
Definition at line 226 of file SatPass.hpp. |
|
|
get the max. gap limit size (seconds); for all SatPass objects
Definition at line 199 of file SatPass.hpp. |
|
|
get the number of good points in this SatPass
Definition at line 254 of file SatPass.hpp. |
|
|
get the list of obstypes
Definition at line 203 of file SatPass.hpp. Referenced by GDCPass::GDCPass(). |
|
|
get the satellite of this SatPass
Definition at line 246 of file SatPass.hpp. Referenced by GDCPass::GDCPass(). |
|
|
return true if the given timetag is or could be part of this pass
Definition at line 404 of file SatPass.cpp. |
|
||||||||||||||||
|
called by constructors to initialize - see doc for them.
|
|
||||||||||||
|
Access the LLI for one obs type at one index, as either l-value or r-value.
Definition at line 328 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. Referenced by GDCPass::GDCPass(). |
|
|
'less than' is required for sort() and map<SatPass,...>.find(SatPass)
Definition at line 306 of file SatPass.hpp. References SatPass::firstTime. |
|
|
Definition at line 96 of file SatPass.cpp. |
|
||||||||||||
|
add a complete SatPassData at time tt
Definition at line 552 of file SatPass.cpp. Referenced by GDCPass::GDCPass(), and SatPass::split(). |
|
||||||||||||
|
set the flag at one index to flag - use the SatPass constants OK, etc.
Definition at line 357 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. |
|
|
change the maximum time gap (in seconds) allowed within any SatPass
Definition at line 183 of file SatPass.hpp. |
|
|
set timetag output format
Definition at line 188 of file SatPass.hpp. |
|
|
get the size of (the arrays in) this SatPass
Definition at line 258 of file SatPass.hpp. Referenced by GDCPass::detectWLsmallSlips(), GDCPass::GDCPass(), gpstk::operator<<(), SatPass::SatPassData::operator=(), GDCPass::preprocess(), and GDCPass::WLconsistencyCheck(). |
|
||||||||||||||||
|
Smooth pseudorange and debias phase. This routine can be called only if dual frequency range and phase data (P1,P2,L1,L2) have been stored, and should be called only after all cycleslips have been removed.
Definition at line 204 of file SatPass.cpp. References Stats::Add(), Stats::Average(), F1, F2, GPSTK_THROW, Stats::Maximum(), Stats::Minimum(), Stats::N(), P1, P2, gpstk::printTime(), Stats::StdDev(), wl1, and wl2. |
|
||||||||||||
|
create a new SatPass from the given one, starting at count N. modify this SatPass to end just before N. return true if successful. Definition at line 418 of file SatPass.cpp. References SatPass::countForTime(), SatPass::dt, SatPass::firstTime, GPSTK_RETHROW, SatPass::indexForLabel, SatPass::labelForIndex, SatPass::lastTime, SatPass::ngood, SatPass::push_back(), SatPass::sat, SatPass::SatPass(), SatPass::spdvector, SatPass::Status, and SatPass::time(). |
|
||||||||||||
|
Access the ssi for one obs type at one index, as either l-value or r-value.
Definition at line 342 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. Referenced by GDCPass::GDCPass(). |
|
|
Access the status; l-value may be assigned SP.status() = 1;.
Definition at line 152 of file SatPass.hpp. Referenced by GDCPass::GDCPass(). |
|
|
compute the timetag associated with index i in the data array
Definition at line 392 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. Referenced by GDCPass::detectWLslips(), GDCPass::detectWLsmallSlips(), GDCPass::GDCPass(), GDCPass::preprocess(), SatPass::split(), and GDCPass::WLconsistencyCheck(). |
|
|
Access the time offset from the nominal time (i.e. timetag) at one index (epoch), as either l-value or r-value
Definition at line 319 of file SatPass.cpp. References gpstk::StringUtils::asString(), and GPSTK_THROW. |
|
||||||||||||
|
Write a one-line summary of the object, consisting of total points, satellite, number of good points, status, start time, end time, time step (sec), and observation types.
|
|
||||||||||||||||||||||||||||
|
Read a set of RINEX observation files, filling a vector of SatPass objects. Create the SatPass objects using the input list of observation types and timestep. If there are no obs types given (vector obstypes has size 0), then use the obs types in the header of the first file read. The files are sorted on their begin time before processing, and the resulting list of SatPass objects is in time order. Data before the begin time, and after the end time, is ignored. The list of SatPass objects need not be empty on input; however if not empty, then the list must be consistent with the input timestep and obs type list, and it will be sorted to be in time order. If a file cannot be opened, or it is not RINEX observations, simply skip it.
|
|
|
class SatPassIterator allows the caller to access all the data in a list of SatPass objects in time order.
Definition at line 493 of file SatPass.hpp. |
|
||||||||||||||||
|
Iterate over the input vector of SatPass objects (sorted to be in time order) and write them, with the given header, to a RINEX observation file of the given filename.
|
|
|
Sort a vector<SatPass> on time, using the firstTime member.
Referenced by SatPassIterator::SatPassIterator(). |
|
|
flag indicating bad data
Definition at line 57 of file SatPass.cpp. |
|
|
Nominal time spacing of the data; determined on input or by decimate().
Definition at line 413 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
|
|
timetags of the first and last data points.
Definition at line 425 of file SatPass.hpp. Referenced by SatPass::operator<(), gpstk::operator<<(), and SatPass::split(). |
|
|
STL map relating strings identifying obs types with indexes in SatPassData.
Definition at line 419 of file SatPass.hpp. Referenced by SatPass::split(). |
|
|
Definition at line 420 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
|
|
timetags of the first and last data points.
Definition at line 425 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
|
|
flag indicating good data with phase discontinuity on L1 only. if(flag & LL1) then there is an L1 discontinuity Definition at line 58 of file SatPass.cpp. |
|
|
flag indicating good data with phase discontinuity on L2 only. if(flag & LL2) then there is an L2 discontinuity Definition at line 59 of file SatPass.cpp. |
|
|
flag indicating good data with phase discontinuity on both L1 and L2. if(flag & LL3) then there are L1 and L2 discontinuities Definition at line 60 of file SatPass.cpp. |
|
|
size of maximum time gap, in seconds, allowed within SatPass data.
Definition at line 61 of file SatPass.cpp. |
|
|
number of timetags with good data in the data arrays.
Definition at line 428 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
|
|
flag indicating good data with no phase discontinuity NB test for 'good' data using (flag != SatPass::BAD), NOT (flag == SatPass::OK).
Definition at line 56 of file SatPass.cpp. |
|
|
format string, as defined in class CommonTime, for output of times used by smooth (debug), dump and operator<<
Definition at line 62 of file SatPass.cpp. |
|
|
Satellite identifier for this data.
Definition at line 416 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
|
|
ALL data in the pass, stored in SatPassData objects, in time order.
Definition at line 431 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
|
|
Status flag for use exclusively by the caller. It is set to 0 by the constructors, but otherwise ignored by class SatPass and class SatPassIterator. Definition at line 410 of file SatPass.hpp. Referenced by gpstk::operator<<(), and SatPass::split(). |
1.3.9.1