Class to determine fundamental information about a RINEX obs file, from both the header and by reading part or all of the file, and then load a requested subset of the data into a store. NB. more than one file can be given, but it is assumed these files are "congruent"
Definition at line 85 of file Rinex3ObsFileLoader.hpp.
#include <Rinex3ObsFileLoader.hpp>
Public Member Functions | |
std::string | asString () |
bool | dataSaved () |
void | dumpSatObsTable (std::ostream &s) const |
void | dumpStoreData (std::ostream &s) const |
void | dumpStoreEpoch (std::ostream &s, const gnsstk::Rinex3ObsData &rod) const |
void | excludeSat (SatID sat) |
void | excludeSats (std::vector< SatID > sats) |
void | files (std::vector< std::string > in_filenames) |
CommonTime | getDataBeginTime () const |
CommonTime | getDataEndTime () const |
double | getDT () |
Rinex3ObsHeader | getFullHeader (unsigned int i) const |
const std::vector< Rinex3ObsData > & | getStore () const |
const int | getStoreSize () const |
std::vector< int > | getTotalObsCounts () const |
std::vector< std::string > | getWantedObsTypes () const |
std::map< RinexSatID, std::vector< int > > | getWantedSatObsCountMap () const |
int | loadFiles (std::string &errmsg, std::string &msg) |
bool | loadObsID (std::string srot) |
void | nEpochsToRead (int n) |
void | reset () |
reset - called before reading another set of files, clears all info More... | |
void | reset (std::vector< std::string > in_filenames) |
Rinex3ObsFileLoader () | |
empty constructor More... | |
Rinex3ObsFileLoader (std::string in_filename) | |
Rinex3ObsFileLoader (std::vector< std::string > in_filenames) | |
void | saveTheData (bool b) |
void | setDecimation (double dt) |
void | setStartTime (const CommonTime &tt) |
void | setStopTime (const CommonTime &tt) |
void | setTimeFormat (std::string fmt) |
int | WriteSatPassList (const std::map< char, std::vector< std::string >> &obstypes, const std::map< char, std::vector< int >> &indexLoadOT, std::vector< SatPass > &SPList) |
Private Member Functions | |
void | init () |
initialization used by the constructors More... | |
Private Attributes | |
CommonTime | begDataTime |
std::vector< int > | countWantedObsTypes |
total counts per obs for wanted obs types (parallel to wantedObsTypes) More... | |
std::vector< Rinex3ObsData > | datastore |
vector of all input data - filled only if saveData is true. More... | |
double | dtdec |
decimate to this time step More... | |
CommonTime | endDataTime |
first and last times of data More... | |
std::vector< SatID > | exSats |
exclude satellites, incl. (-1,sys) More... | |
std::vector< std::string > | filenames |
input RINEX obs file names More... | |
std::vector< Rinex3ObsHeader > | headers |
headers from reading filenames More... | |
std::vector< std::string > | inputWantedObsTypes |
std::map< SatID, std::string > | mapSatStr |
MostCommonValue | mcv |
estimator of the raw time interval More... | |
int | nepochs |
number of epochs read More... | |
int | nepochsToRead |
number of epochs to read (default:all) More... | |
double | nominalDT |
nominal timestep (rawdt or dtdec) More... | |
std::vector< std::string > | obstypes |
RINEX obs types found in data. More... | |
CommonTime | prevtime |
used in reading loop for dt More... | |
double | rawdt |
best est. of time interval, no decimate More... | |
std::map< RinexSatID, std::vector< int > > | SatObsCountMap |
bool | saveData |
if true save the data (F) More... | |
CommonTime | startTime |
CommonTime | stopTime |
edit to start and stop times More... | |
std::string | timefmt |
format for time tags in output More... | |
std::vector< std::string > | wantedObsTypes |
list of wanted RinexObsIDs, without any "*", which appear in header(s) More... | |
Static Private Attributes | |
static const double | dttol |
tolerance in comparing times More... | |
|
inline |
empty constructor
Definition at line 153 of file Rinex3ObsFileLoader.hpp.
|
inline |
constructor with one file name
[in] | in_filename | RINEX obs file name to load |
Definition at line 159 of file Rinex3ObsFileLoader.hpp.
|
inline |
constructor with vector of file names
[in] | in_filenames | vector of RINEX obs file names to load |
Definition at line 171 of file Rinex3ObsFileLoader.hpp.
string gnsstk::Rinex3ObsFileLoader::asString | ( | ) |
write a summary of the entire loader configuration/output to a string
Definition at line 495 of file Rinex3ObsFileLoader.cpp.
|
inline |
access save data flag
Definition at line 272 of file Rinex3ObsFileLoader.hpp.
void gnsstk::Rinex3ObsFileLoader::dumpSatObsTable | ( | std::ostream & | s | ) | const |
Dump the SatObsCount table
s | to which to write the table |
Definition at line 687 of file Rinex3ObsFileLoader.cpp.
void gnsstk::Rinex3ObsFileLoader::dumpStoreData | ( | std::ostream & | s | ) | const |
Dump the stored data - NB setTimeFormat()
s | to which to write the data |
Definition at line 750 of file Rinex3ObsFileLoader.cpp.
void gnsstk::Rinex3ObsFileLoader::dumpStoreEpoch | ( | std::ostream & | s, |
const gnsstk::Rinex3ObsData & | rod | ||
) | const |
Dump the stored data for one epoch - NB setTimeFormat()
s | to which to write the data |
Definition at line 716 of file Rinex3ObsFileLoader.cpp.
|
inline |
satellites to be excluded; this may be SatID = (-1, system);
[in] | sat | satellite to be excluded [do not exclude system this way] |
Definition at line 305 of file Rinex3ObsFileLoader.hpp.
|
inline |
vector of satellites to be excluded
[in] | sats | vector of specific satellites to exclude |
Definition at line 311 of file Rinex3ObsFileLoader.hpp.
|
inline |
Define the files to be loaded
[in] | in_filenames | vector of RINEX obs file names to load |
Definition at line 221 of file Rinex3ObsFileLoader.hpp.
|
inline |
Definition at line 326 of file Rinex3ObsFileLoader.hpp.
|
inline |
Definition at line 329 of file Rinex3ObsFileLoader.hpp.
|
inline |
return the raw data interval, unless decimation has been done, then return the decimated interval.
Definition at line 365 of file Rinex3ObsFileLoader.hpp.
|
inline |
return a full Rinex3ObsHeader
[in] | i | index in input filenames vector |
Definition at line 372 of file Rinex3ObsFileLoader.hpp.
|
inline |
access the data store
Definition at line 387 of file Rinex3ObsFileLoader.hpp.
|
inline |
get the size of the data store
Definition at line 381 of file Rinex3ObsFileLoader.hpp.
|
inline |
access total Obs counts for list of wanted ObsIDs
Definition at line 355 of file Rinex3ObsFileLoader.hpp.
|
inline |
access final list of wanted ObsIDs (no "*")
Definition at line 335 of file Rinex3ObsFileLoader.hpp.
|
inline |
access Sat/Obs counts for list of wanted ObsIDs
Definition at line 346 of file Rinex3ObsFileLoader.hpp.
|
inlineprivate |
initialization used by the constructors
Definition at line 141 of file Rinex3ObsFileLoader.hpp.
int gnsstk::Rinex3ObsFileLoader::loadFiles | ( | std::string & | errmsg, |
std::string & | msg | ||
) |
Read the files already defined
[out] | errmsg | an error/warning message, blank for success |
[out] | msg | an informative message |
Definition at line 75 of file Rinex3ObsFileLoader.cpp.
|
inline |
Add to list of RINEX 3 ObsIDs (4-character) that are desired for output Must be a valid 4-char ObsID, must begin with system character, and must not be a duplicate. E.g. GC1* GC2* GL1* GL2* JS1Z RL2C
[in] | srot | string RINEX 3 ObsID to save, must be 4-char, can use '*' |
Definition at line 234 of file Rinex3ObsFileLoader.hpp.
|
inline |
limit the number of epochs to be read; set -1 (default) to read all
[in] | n | maximum number of epochs to read |
Definition at line 260 of file Rinex3ObsFileLoader.hpp.
|
inline |
reset - called before reading another set of files, clears all info
Definition at line 179 of file Rinex3ObsFileLoader.hpp.
|
inline |
reset with new filenames
[in] | in_filenames | vector of RINEX obs file names to load |
Definition at line 208 of file Rinex3ObsFileLoader.hpp.
|
inline |
set save data flag
b | if true, then save the data, otherwise just the headers |
Definition at line 266 of file Rinex3ObsFileLoader.hpp.
|
inline |
turn on decimation, to even seconds-of-week / this delta time
[in] | dt | decimate data to this time step (on even seconds-of-week) |
Definition at line 291 of file Rinex3ObsFileLoader.hpp.
|
inline |
set the start time
[in] | tt | start time, ignore data before this time |
Definition at line 278 of file Rinex3ObsFileLoader.hpp.
|
inline |
set the stop time
[in] | tt | stop time, ignore data after this time |
Definition at line 284 of file Rinex3ObsFileLoader.hpp.
|
inline |
set time format
[in] | fmt | format (cf. gnsstk::Epoch::printf) for time output in dumps |
Definition at line 298 of file Rinex3ObsFileLoader.hpp.
int gnsstk::Rinex3ObsFileLoader::WriteSatPassList | ( | const std::map< char, std::vector< std::string >> & | obstypes, |
const std::map< char, std::vector< int >> & | indexLoadOT, | ||
std::vector< SatPass > & | SPList | ||
) |
Write the stored data to a list of SatPass objects, given a vector of obstypes and (for each system) a parallel vector of indexes into the Loader's ObsIDs (getWantedObsTypes()), and a vector of SatPass to be written to. SPList need not be empty; however if not empty, obstypes must be identical to those of existing SatPasses.
[in] | obstypes | map of <sys,vector<ObsID>> for SatPass (2or3-char obsID) |
[in] | indexLoadOT | map<char,vector<int>> with key=system char, value=vector parallel to obstypes with elements equal to {index in loader's ObsIDs for each obstype, or -1 if not in loader} |
[in,out] | SPList | vector of SatPass to which data store is written |
Definition at line 535 of file Rinex3ObsFileLoader.cpp.
|
private |
Definition at line 133 of file Rinex3ObsFileLoader.hpp.
|
private |
total counts per obs for wanted obs types (parallel to wantedObsTypes)
Definition at line 116 of file Rinex3ObsFileLoader.hpp.
|
private |
vector of all input data - filled only if saveData is true.
Definition at line 138 of file Rinex3ObsFileLoader.hpp.
|
private |
decimate to this time step
Definition at line 96 of file Rinex3ObsFileLoader.hpp.
|
staticprivate |
tolerance in comparing times
Definition at line 88 of file Rinex3ObsFileLoader.hpp.
|
private |
first and last times of data
Definition at line 133 of file Rinex3ObsFileLoader.hpp.
|
private |
exclude satellites, incl. (-1,sys)
Definition at line 122 of file Rinex3ObsFileLoader.hpp.
|
private |
input RINEX obs file names
Definition at line 91 of file Rinex3ObsFileLoader.hpp.
|
private |
headers from reading filenames
Definition at line 135 of file Rinex3ObsFileLoader.hpp.
|
private |
input list of wanted ObsIDs, may include "*"-the "any" sys/type/band/trk-code thus when the header is read this list is expanded into wantedObsTypes
Definition at line 104 of file Rinex3ObsFileLoader.hpp.
|
private |
map[sat]=string containing space-separated obs types to be read into SatPass cf. cfgEditObsTypes()
Definition at line 128 of file Rinex3ObsFileLoader.hpp.
|
private |
estimator of the raw time interval
Definition at line 119 of file Rinex3ObsFileLoader.hpp.
|
private |
number of epochs read
Definition at line 131 of file Rinex3ObsFileLoader.hpp.
|
private |
number of epochs to read (default:all)
Definition at line 92 of file Rinex3ObsFileLoader.hpp.
|
private |
nominal timestep (rawdt or dtdec)
Definition at line 132 of file Rinex3ObsFileLoader.hpp.
|
private |
RINEX obs types found in data.
Definition at line 134 of file Rinex3ObsFileLoader.hpp.
|
private |
used in reading loop for dt
Definition at line 120 of file Rinex3ObsFileLoader.hpp.
|
private |
best est. of time interval, no decimate
Definition at line 121 of file Rinex3ObsFileLoader.hpp.
|
private |
count of prn/obs for wanted obs types NB the vector<int> is parallel to wantedObsTypes;
Definition at line 113 of file Rinex3ObsFileLoader.hpp.
|
private |
if true save the data (F)
Definition at line 93 of file Rinex3ObsFileLoader.hpp.
|
private |
Definition at line 97 of file Rinex3ObsFileLoader.hpp.
|
private |
edit to start and stop times
Definition at line 97 of file Rinex3ObsFileLoader.hpp.
|
private |
format for time tags in output
Definition at line 94 of file Rinex3ObsFileLoader.hpp.
|
private |
list of wanted RinexObsIDs, without any "*", which appear in header(s)
Definition at line 107 of file Rinex3ObsFileLoader.hpp.