Go to the documentation of this file.
84 FileMissingException e(
"File " + filename +
85 " could not be opened.");
95 FileMissingException e(
"File " + filename +
96 " could not be opened. Check again " +
97 "the path or the name provided!");
109 while ( strm >> iod && iod.
isValid() )
149 s <<
"IonexStore dump() function" << std::endl;
152 std::vector<std::string>::const_iterator f;
154 for (f = fileNames.begin(); f != fileNames.end(); f++)
156 s << *f << std::endl;
163 s <<
"Data stored for: " << std::endl;
164 s <<
" # " << fileNames.size() <<
" files." << std::endl;
165 s <<
" # " <<
inxMaps.size() <<
" epochs" << std::endl;
176 s <<
"--------------------" << std::endl;
178 << std::setw(21) <<
"TEC"
179 << std::setw(5) <<
"RMS"<< std::endl;
180 s <<
"--------------------" << std::endl;
182 int ntec(0), nrms(0);
184 IonexMap::const_iterator it;
188 s << it->first <<
" ";
213 s <<
"--------------------" << std::endl;
214 s <<
"Total epochs: "
215 << std::setw(5) << ntec
216 << std::setw(5) << nrms << std::endl;
217 s <<
"--------------------" << std::endl;
242 Triple tecval(0.0,0.0,0.0);
247 InvalidRequest e(
"Inadequate data before requested time");
253 InvalidRequest e(
"Inadequate data after requested time");
259 if (
pos.getSystemName() !=
"Geocentric" )
261 InvalidRequest e(
"Position object is not in GEOCENTRIC coordinates");
279 InvalidRequest e(
"Invalid interpolation stategy");
288 IonexMap::const_iterator itm =
inxMaps.find(t);
297 T[1] = (++itm)->first;
305 T[0] = (--itm)->first;
310 InvalidRequest e(
"IonexStore::getIonexValue() ... Invalid time!");
316 f[0] = (T[1]-t ) / (T[1]-T[0]);
317 f[1] = (t -T[0]) / (T[1]-T[0]);
333 for(
int imap = 0; imap < nmap; imap++)
346 double sec2deg( 4.16666666666667e-3 );
350 pos.theArray[1] =
pos.theArray[1] + ( t - T[imap] ) * sec2deg;
388 const std::string& ionoMapType )
const
392 InvalidParameter e(
"Invalid TEC parameter.");
396 if( ionoMapType !=
"NONE" && ionoMapType !=
"SLM" &&
397 ionoMapType !=
"MSLM" && ionoMapType !=
"ESM" )
399 InvalidParameter e(
"Invalid ionosphere mapping function.");
418 const std::string& ionoMapType )
const
422 InvalidParameter e(
"Invalid TEC parameter.");
426 if( ionoMapType !=
"NONE" && ionoMapType !=
"SLM" &&
427 ionoMapType !=
"MSLM" && ionoMapType !=
"ESM" )
429 InvalidParameter e(
"Invalid ionosphere mapping function.");
439 return (
C2_FACT / (freq * freq) * tecval
447 const std::string& ionoMapType )
const
454 double z0 = 90.0 - elevation;
456 if( ionoMapType ==
"SLM" )
462 double ionoHeight = 450.0;
465 double zipprad = std::asin(sinzipp);
469 else if( ionoMapType ==
"MSLM" )
475 double ionoHeight = 506.7;
476 double alfa = 0.9782;
478 double sinzipp = Re / (Re + ionoHeight)
480 double zipprad = std::asin(sinzipp);
485 else if( ionoMapType ==
"ESM" )
505 InvalidRequest e(
"Inadequate data before requested time");
511 InvalidRequest e(
"Inadequate data after requested time");
516 IonexDCBMap::const_iterator itm =
inxDCBMap.begin();
522 dt =
time - itm->first;
527 InvalidRequest e(
"Inadequate data after requested time: " +
536 IonexHeader::SatDCBMap::const_iterator iprn( satdcb.find(sat) );
539 if ( iprn == satdcb.end() )
541 InvalidRequest e(
"There is no DCB value for satellite " +
547 return iprn->second.bias;
CommonTime time
the time corresponding to the current data records
Triple getIonexValue(const CommonTime &t, const Position &RX, IonexStoreStrategy strategy=IonexStoreStrategy::ConsRot) const
@ Consecutive
Interpolate between two consecutive maps.
void addFile(const std::string &fn, IonexHeader &header)
double getIono(double elevation, double tecval, double freq, const std::string &ionoMapType) const
void clear()
Remove all data.
const Epoch BEGINNING_OF_TIME(CommonTime::BEGINNING_OF_TIME)
Earliest representable Epoch.
double ionoMappingFunction(double elevation, const std::string &ionoMapType) const
IonexDCBMap inxDCBMap
Map of DCB values (IonexHeader.firstEpoch, IonexHeader.svsmap)
std::vector< std::string > getFileNames() const
Get a list of all the file names in the store, as a vector<string>
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
double findDCB(const SatID &sat, const CommonTime &time) const
@ Rotated
Take nearest rotated map.
@ Nearest
Take nearest map.
static const GNSSTK_EXPORT CommonTime BEGINNING_OF_TIME
earliest representable CommonTime
std::valarray< double > theArray
double sin(gnsstk::Angle x)
std::map< IonexData::IonexValType, IonexData > IonexValTypeMap
The key to this map is IonexValType.
double getSTEC(double elevation, double tecval, const std::string &ionoMapType) const
static const GNSSTK_EXPORT IonexValType UN
static const GNSSTK_EXPORT CommonTime END_OF_TIME
latest representable CommonTime
IonexStore()
Default constructor.
void dump(std::ostream &s=std::cout, short detail=0) const
IonexMap inxMaps
Map of IONEX maps.
static const GNSSTK_EXPORT IonexValType RMS
A structure used to store IONEX Value Types.
IonexValType type
Type of data either TEC or RMS.
void addMap(const IonexData &iod)
Insert a new IonexData object into the store.
double cos(gnsstk::Angle x)
const Epoch END_OF_TIME(CommonTime::END_OF_TIME)
Latest Representable Epoch.
#define GNSSTK_RETHROW(exc)
virtual ~IonexStore()
destructor
static const GNSSTK_EXPORT IonexValType TEC
CommonTime getInitialTime() const
#define GNSSTK_THROW(exc)
@ ConsRot
Interpolate between two consecutive rotated maps.
double getValue(const Position &pos) const
virtual void loadFile(const std::string &filename)
virtual bool isValid() const
Am I an valid object?
IonexStoreStrategy
Enumeration used for IonexStore::getIonexValue().
static const double C2_FACT
CommonTime getFinalTime() const
static const double DEG_TO_RAD
Conversion Factor from degrees to radians (units: degrees^-1)
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39