IonexData.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
44 #include <cmath>
45 
46 #include "StringUtils.hpp"
47 #include "IonexData.hpp"
48 #include "CivilTime.hpp"
49 
50 
51 using namespace std;
52 using namespace gnsstk::StringUtils;
53 
54 
55 namespace gnsstk
56 {
57  const string IonexData::startTecMapString = "START OF TEC MAP";
58  const string IonexData::startRmsMapString = "START OF RMS MAP";
59  const string IonexData::startHgtMapString = "START OF HEIGHT MAP";
60  const string IonexData::currentEpochString = "EPOCH OF CURRENT MAP";
61  const string IonexData::dataBlockString = "LAT/LON1/LON2/DLON/H";
62  const string IonexData::endTecMapString = "END OF TEC MAP";
63  const string IonexData::endRmsMapString = "END OF RMS MAP";
64  const string IonexData::endHgtMapString = "END OF HEIGHT MAP";
65  const string IonexData::endOfFile = "END OF FILE";
66 
67  const IonexData::IonexValType IonexData::UN( "UN",
68  "Unknown or Invalid",
69  "unknown" );
70 
71  const IonexData::IonexValType IonexData::TEC( "TEC",
72  "Total Electron Content map",
73  "TECU" );
74 
75  const IonexData::IonexValType IonexData::RMS( "RMS",
76  "Root Mean Square error",
77  "TECU" );
78 
79 
80  IonexData::IonexValType ::
81  IonexValType()
82  : type( std::string("UN") ),
83  description( std::string("Unknown or Invalid") ),
84  units( std::string("") )
85  {
86  }
87 
88 
90  IonexValType(const std::string& t, const std::string& d,
91  const std::string& u)
92  : type(t), description(d), units(u)
93  {
94  }
95 
96 
100  {
101  }
102 
103 
106  {
107  }
108 
109 
110  //--------------------------------------------------------------------
111  //--------------------------------------------------------------------
113  {
114  // is there anything to write?
115  if ( !valid || data.empty() )
116  return;
117 
118  IonexStream& strm = dynamic_cast<IonexStream&>(ffs);
119  string line;
120 
121  // write record opening TEC/RMS map
122  line.clear();
123  line += rightJustify( asString(mapID), 6 );
124  line += string(54, ' ');
125 
126  if (type == IonexData::TEC)
127  {
128  line += startTecMapString;
129  }
130  else if (type == IonexData::RMS)
131  {
132  line += startRmsMapString;
133  }
134  else
135  {
136  FFStreamError err("This isn't a valid standard IONEX value type: " +
138  GNSSTK_THROW(err);
139  }
140  strm << line << endl;
141  strm.lineNumber++;
142 
143  // write epoch of current TEC/RMS map
144  line.clear();
145  line += writeTime(time);
146  line += string(24, ' ');
147  line += currentEpochString;
148  strm << line << endl;
149  strm.lineNumber++;
150 
151  // write TEC/RMS data sequence
152  int nlat(dim[0]), nlon(dim[1]);
153 
154  for (int ilat = 0; ilat < nlat; ilat++)
155  {
156  // write record initializing a new TEC/RMS
157  // data block for latitude 'currLat'
158  double currLat = lat[0] + ilat*lat[2];
159 
160  line.clear();
161  line += string(2, ' ');
162  line += rightJustify( asString(currLat,1), 6 );
163  line += rightJustify( asString(lon[0],1), 6 );
164  line += rightJustify( asString(lon[1],1), 6 );
165  line += rightJustify( asString(lon[2],1), 6 );
166  line += rightJustify( asString(hgt[0],1), 6 );
167  line += string(28, ' ');
168  line += dataBlockString;
169  strm << line << endl;
170  strm.lineNumber++;
171 
172  // write single TEC/RMS data block
173  line.clear();
174  for (int ilon = 0; ilon < nlon; ilon++)
175  {
176  int index = ilat*dim[1]+ilon;
177 
178  double val = (data[index] != 999.9) ?
179  std::pow(10.0,-exponent)*data[index] : 9999.0;
180 
181  // we need to put there an integer, i.e., the neareast integer
182  int valint = (val > 0.0) ?
183  static_cast<int>(val+0.5) : static_cast<int>(val-0.5);
184  line += rightJustify( asString<short>(valint), 5 );
185 
186  if (line.size() == 80) // maximum 16 values per record
187  {
188  strm << line << endl;
189  strm.lineNumber++;
190  line.clear();
191  }
192  else if (ilon == nlon-1) // last longitude
193  {
194  strm << line << endl;
195  strm.lineNumber++;
196  line.clear();
197  }
198 
199  } // End of 'for (int ilon = 0; ilon < nlon; ilon++)'
200 
201  } // End of 'for (int ilat = 0; ilat < nlat; ilat++)'
202 
203  // write closing TEC/RMS map
204  line.clear();
205  line += rightJustify( asString(mapID), 6 );
206  line += string(54, ' ');
207 
208  if (type == IonexData::TEC)
209  {
210  line += endTecMapString;
211  }
212  else if (type == IonexData::RMS)
213  {
214  line += endRmsMapString;
215  }
216  else
217  {
218  FFStreamError err("This isn't a valid standard IONEX value type: " +
220  GNSSTK_THROW(err);
221  }
222  strm << line << endl;
223  strm.lineNumber++;
224  } // End of method 'IonexData::reallyPutRecord()'
225 
226 
228  {
229  IonexStream& strm = dynamic_cast<IonexStream&>(ffs);
230 
231  // If the header has not been read, read it
232  if(!strm.headerRead)
233  {
234  strm >> strm.header;
235  }
236 
237  // Clear out this object
238  IonexHeader& hdr = strm.header;
239 
240  // Let's be sure that nothing is set yet
241  IonexData iod;
242  *this = iod;
243 
244  // let's get some useful values from the header
245  exponent = hdr.exponent;
246  for (int i = 0; i < 3; i++)
247  {
248  lat[i] = hdr.lat[i];
249  lon[i] = hdr.lon[i];
250  hgt[i] = hdr.hgt[i];
251  }
252 
253  string line;
254 
255  // some initializations before looping
256  // ityp may be -1(initialize), 0(unknown), 1(TEC), 2(RMS), 3(HGT)
257  int ityp(-1);
258 
259  // index for latitude
260  int ilat(0);
261 
262  while (ityp != 0)
263  {
264 
265  strm.formattedGetLine(line,true);
267 
268  if (line.size() > 80)
269  {
270  FFStreamError e("Bad epoch line");
271  GNSSTK_THROW(e);
272  }
273 
274  // skip empty lines
275  if (line.length() == 0)
276  {
277  continue;
278  }
279 
280  string label(line, 60, 20);
281 
282  if (label == startTecMapString)
283  {
285  ityp = 1;
286  mapID = asInt(line.substr(0,6));
287  ilat = 0;
288  }
289  else if (label == startRmsMapString)
290  {
292  ityp = 2;
293  mapID = asInt(line.substr(0,6));
294  ilat = 0;
295  }
296  else if (label == startHgtMapString)
297  {
298  ityp = 3;
299  mapID = asInt(line.substr(0,6));
300  ilat = 0;
301  }
302  else if (label == currentEpochString)
303  {
304  time = parseTime(line);
305 
306  // Get grid dimensions to know how much memory has to be
307  // allocated for 'data' member of the object, and then
308  // initialize all elements of the object member with dummy
309  // values, i.e., 999.9
310  dim[0] = static_cast<int>( ( hdr.lat[1] - hdr.lat[0] )
311  / hdr.lat[2] + 1 ); // consider Equator as well
312 
313  dim[1] = static_cast<int>( ( hdr.lon[1] - hdr.lon[0] )
314  / hdr.lon[2] + 1 ); // consider Greenwich meridian
315 
316  dim[2] = (hdr.hgt[2] == 0) ?
317  1 : static_cast<int>( (hdr.hgt[1]-hdr.hgt[0])
318  / hdr.hgt[2]+1 );
319 
320  data.resize( dim[0]*dim[1]*dim[2], 999.9 );
321  }
322  else if (label == dataBlockString)
323  {
324  if (ityp == 0)
325  {
326  FFStreamError e(string("Map type undefined: " + line) );
327  GNSSTK_THROW(e);
328  }
329 
330 #ifdef GNSSTK_IONEX_UNUSED
331  const double lat0 = asDouble(line.substr( 2,6)),
332  lon1 = asDouble(line.substr( 8,6)),
333  lon2 = asDouble(line.substr(14,6)),
334  dlon = asDouble(line.substr(20,6)),
335  hgt = asDouble(line.substr(26,6));
336 #endif // GNSSTK_IONEX_UNUSED
337 
338  //read single data block
339  for (int ival = 0,line_ndx = 0; ival < dim[1]; ival++, line_ndx++)
340  {
341  // only 16 values per line - same as (line_ndx % 16 == 0)
342  if (!(line_ndx % 16))
343  {
344  // Get new line
345  strm.formattedGetLine(line);
346 
347  // Set to zero again. There are only 16 values per line
348  line_ndx = 0;
349 
350  if (line.size() > 80)
351  {
352  FFStreamError e(
353  "Error reading IONEX data. Bad epoch line");
354  GNSSTK_THROW(e);
355  }
356 
357  // skip empty lines if any
358  if (line.size() == 0)
359  {
360  continue;
361  }
362  } // End of 'if (!(line_ndx % 16))...'
363 
364 
365  // the 5th line doesn't have 80 characters, thus fill it
366  line.resize(80, ' ');
367 
368  // extract value
369  int val = asInt(line.substr(line_ndx*5,5));
370 
371  // add value
372  data[ilat*dim[1]+ival] = (val != 9999) ?
373  std::pow(10.0,exponent)*val : 999.9;
374  } // End of 'for (int ival = 0,line_ndx = 0; ival < dim[1];...'
375  // next latitude
376  ilat++;
377  } // End of 'if (label == dataBlockString)...'
378  else if (label == endTecMapString)
379  {
380  ityp = 0;
381  valid = true;
382  }
383  else if (label == endRmsMapString)
384  {
385  ityp = 0;
386  valid = true;
387  }
388  else if (label == endOfFile)
389  {
390  // Remember that there is one more line in Ionex
391  // definition before EOF. The IonexData object has been
392  // initialized already but we mark the flag 'valid' as
393  // false. This helps when we shall store this data into
394  // an IonexStore object.
395  ityp = 0;
396  valid = false;
397  }
398  else
399  {
400  FFStreamError e(string("Unidentified Ionex Data record " + line) );
401  GNSSTK_THROW(e);
402  }
403  } // end of 'while (ityp != 0)' loop
404  } // End of method 'IonexData::reallyGetRecord()'
405 
406 
407 
408  // A debug output function.
409  void IonexData::dump(std::ostream& os) const
410  {
411  os << endl;
412  os << "IonexData dump() function" << std::endl;
413  os << "Epoch : " << time << std::endl;
414  os << "Map index : " << mapID << std::endl;
415  os << "Data type : " << type.type
416  << " (" << type.units << ")" << std::endl;
417  os << "Grid size (lat x lon x hgt) : " << dim[0]
418  << " x " << dim[1]
419  << " x " << dim[2] << std::endl;
420  os << "Number of values : " << data.size()
421  << " values." << std::endl;
422  os << "Valid object? : " << isValid() << endl;
423  } // End of method 'IonexData::dump()'
424 
425 
426 
427  int IonexData::getIndex( const Triple& in,
428  int igp,
429  Triple& ABC ) const
430  {
431  // grid dimensions
432  int nlat = dim[0];
433  int nlon = dim[1];
434  int nhgt = dim[2];
435 
436  // useful variables
437  int ilat, ilon, ihgt, ncyc;
438  double xlat, xlon, xhgt;
439 
440  // latitude
441  xlat = (in[0] - lat[0]) / lat[2] + 1.0;
442 
443  ilat = (igp == 1) ?
444  static_cast<int>(xlat+0.5) : static_cast<int>(xlat);
445 
446  if (ilat >= 1 && ilat <= nlat)
447  {
448  ABC[0] = lat[0] + (ilat-1)*lat[2];
449  }
450  else
451  {
452  InvalidRequest e( "Irregular latitude. Latitude "
453  + asString(in[0]) + " DEG" );
454  GNSSTK_THROW(e);
455  }
456 
457  // longitude
458  xlon = (in[1] - lon[0]) / lon[2] + 1.0;
459 
460  ilon = (igp == 1) ?
461  static_cast<int>(xlon + 0.5) : static_cast<int>(xlon);
462 
463  // Round to neareast integer
464  ncyc = static_cast<int>( ( 360.0 / std::abs(lon[2]) ) + 0.5 );
465 
466  if (ilon < 1)
467  {
468  ilon = ilon + ncyc;
469  }
470  else if (ilon > nlon)
471  {
472  ilon = ilon - ncyc;
473  }
474 
475 
476  if ( (ilon >= 1) && (ilon <= nlon) )
477  {
478  ABC[1] = lon[0] + (ilon-1) * lon[2];
479  }
480  else
481  {
482  InvalidRequest e( "Irregular longitude. Longitude: "
483  + asString(in[1]) + " DEG" );
484  GNSSTK_THROW(e);
485  }
486 
487  // height
488  if (hgt[2] == 0)
489  {
490  ihgt = 1;
491  ABC[2] = hgt[0];
492  }
493  else
494  {
495  xhgt = (in[2]/1000.0 - hgt[0]) / hgt[2] + 1.0;
496 
497  ihgt = (igp == 1) ?
498  static_cast<int>(xhgt + 0.5) : static_cast<int>(xhgt);
499 
500  if ( (ihgt >= 1) && (ihgt <= nhgt) )
501  {
502  ABC[2] = ( hgt[0] + (ihgt-1) * hgt[2] ) * 1000.0; //meters
503  }
504  else
505  {
506  InvalidRequest e( "Irregular height. Height: "
507  + asString( in[2]/1000.0 ) + " km.");
508  GNSSTK_THROW(e);
509  } // End of 'if ( (ihgt >= 1) && (ihgt <= nhgt) )...'
510 
511  } // End of 'if (hgt[2] == 0)...'
512 
513 
514  return ( (ilon-1) + (ilat-1)*nlon + (ihgt-1)*nlon*nlat );
515 
516  } // End of method 'IonexData::getIndex()'
517 
518 
519  double IonexData::getValue( const Position& p ) const
520  {
521  // this never should happen but just in case
522  Position pos(p);
523  if ( pos.getCoordinateSystem() != Position::Geocentric )
524  {
525  InvalidRequest e( "Position object is not in GEOCENTRIC coordinates");
526  GNSSTK_THROW(e);
527  }
528 
529  // some useful declarations
530  Triple ABC[4], inarg;
531  int e[4];
532  double xsum = 0.0;
533 
534  // the object is required for AEarth to be consistent with
535  // Position::getIonosphericPiercePoint()
537 
538  // let's fetch the data
539  double beta = p.theArray[0];
540  double lambda = p.theArray[1];
541  double height = p.theArray[2]-WGS84.a();
542 
543  // we need this step because in the Position object the longitude is
544  // expressed in degrees E (i.e., [0 +360]), while in IONEX files
545  // longitude takes values within [-180 180]) (see IONEX manual)
546  if (lambda > 180.0)
547  {
548  lambda = lambda - 360.0;
549  }
550 
551  // get position of lower left hand grid point E00
552  inarg = Triple( beta, lambda, height);
553  e[0] = getIndex( inarg, 2, ABC[0] );
554 
555 
556  // compute factors P and Q
557  double xp( (inarg[1] - ABC[0][1]) / lon[2] );
558  double xq( (inarg[0] - ABC[0][0]) / lat[2] );
559 
560  // this never should happen but just in case
561  if ( (xp < 0) || (xp > 1) || (xq < 0) || (xq > 1) )
562  {
563 
564  Exception exc("IonexData::getValue(): Wrong xp and xq factors!");
565  GNSSTK_THROW(exc);
566 
567  }
568 
569  // get E10's position index
570  inarg = Triple( ABC[0][0], ABC[0][1]+lon[2], ABC[0][2] );
571  e[1] = getIndex( inarg, 1, ABC[1] );
572 
573  // get E01's position index
574  inarg = Triple( ABC[0][0]+lat[2], ABC[0][1], ABC[0][2] );
575  e[2] = getIndex( inarg, 1, ABC[2] );
576 
577  // get E11's position index
578  inarg = Triple( ABC[0][0]+lat[2], ABC[0][1]+lon[2], ABC[0][2] );
579  e[3] = getIndex( inarg, 1, ABC[3] );
580 
581  // let's fetch the values
582  double pntval[4];
583  for (int i = 0; i < 4; i++)
584  {
585  double xval( data[e[i]] );
586 
587  if (xval != 999.9)
588  {
589  pntval[i] = xval;
590  }
591  else
592  {
593  FFStreamError e("Undefined TEC/RMS value(s).");
594  GNSSTK_THROW(e);
595  }
596  } // End of 'for (int i = 0; i < 4; i++)...'
597 
598  // bivariate interpolation (pag.3, IONEX manual)
599  xsum = (1.0-xp) * (1.0-xq) * pntval[0] +
600  xp * (1.0-xq) * pntval[1] +
601  (1.0-xp) * xq * pntval[2] +
602  xp * xq * pntval[3];
603 
604  return xsum;
605  } // End of method 'IonexData::getValue()'
606 
607 
608  CommonTime IonexData::parseTime( const std::string& line ) const
609  {
610  int year, month, day, hour, min, sec;
611 
612  year = asInt(line.substr( 0,6));
613  month = asInt(line.substr( 6,6));
614  day = asInt(line.substr(12,6));
615  hour = asInt(line.substr(18,6));
616  min = asInt(line.substr(24,6));
617  sec = asInt(line.substr(30,6));
618 
619  return CivilTime( year, month, day, hour, min, (double)sec );
620  } // End of method 'IonexData::parseTime()'
621 
622 
623  string IonexData::writeTime(const CommonTime& dt) const
624  {
626  {
627  return string(36, ' ');
628  }
629 
630  string line;
631  line = rightJustify(asString<short>(static_cast<CivilTime>(dt).year), 6);
632  line += rightJustify(asString<short>(static_cast<CivilTime>(dt).month),
633  6);
634  line += rightJustify(asString<short>(static_cast<CivilTime>(dt).day), 6);
635  line += rightJustify(asString<short>(static_cast<CivilTime>(dt).hour), 6);
636  line += rightJustify(asString<short>(static_cast<CivilTime>(dt).minute),
637  6);
638  line += rightJustify(
639  asString(static_cast<int>(static_cast<CivilTime>(dt).second)), 6);
640 
641  return line;
642  } // End of method 'IonexData::writeTime()'
643 
644 
645 
646 } // End of namespace gnsstk
gnsstk::IonexData::time
CommonTime time
the time corresponding to the current data records
Definition: IonexData.hpp:133
gnsstk::IonexHeader::lon
double lon[3]
Definition: IonexHeader.hpp:222
gnsstk::StringUtils::asInt
long asInt(const std::string &s)
Definition: StringUtils.hpp:713
gnsstk::IonexHeader
Definition: IonexHeader.hpp:70
gnsstk::IonexStream::header
IonexHeader header
The header for this file.
Definition: IonexStream.hpp:94
gnsstk::IonexData::reallyGetRecord
void reallyGetRecord(FFStream &s) override
Definition: IonexData.cpp:227
gnsstk::IonexData::IonexValType::units
std::string units
units (optional). E.g. "meters"
Definition: IonexData.hpp:110
example6.day
day
Definition: example6.py:66
gnsstk::FFStream
Definition: FFStream.hpp:119
gnsstk::IonexData::lat
double lat[3]
Definition of a grid in latitude.
Definition: IonexData.hpp:141
gnsstk::IonexData::endRmsMapString
static const GNSSTK_EXPORT std::string endRmsMapString
"END OF RMS MAP"
Definition: IonexData.hpp:92
gnsstk::BEGINNING_OF_TIME
const Epoch BEGINNING_OF_TIME(CommonTime::BEGINNING_OF_TIME)
Earliest representable Epoch.
StringUtils.hpp
gnsstk::IonexData::dataBlockString
static const GNSSTK_EXPORT std::string dataBlockString
"LAT/LON1/LON2/DLON/H"
Definition: IonexData.hpp:88
example6.year
year
Definition: example6.py:64
IonexData.hpp
gnsstk::IonexData::currentEpochString
static const GNSSTK_EXPORT std::string currentEpochString
"EPOCH OF CURRENT MAP"
Definition: IonexData.hpp:86
gnsstk::FFTextStream::formattedGetLine
void formattedGetLine(std::string &line, const bool expectEOF=false)
Definition: FFTextStream.cpp:149
gnsstk::FFTextStream::lineNumber
unsigned int lineNumber
Definition: FFTextStream.hpp:98
gnsstk::IonexData::data
Vector< double > data
TEC or RMS data.
Definition: IonexData.hpp:136
example6.hour
hour
Definition: example6.py:67
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::IonexData::IonexValType::IonexValType
IonexValType()
Definition: IonexData.cpp:81
gnsstk::CommonTime::BEGINNING_OF_TIME
static const GNSSTK_EXPORT CommonTime BEGINNING_OF_TIME
earliest representable CommonTime
Definition: CommonTime.hpp:102
example6.minute
minute
Definition: example6.py:68
gnsstk::IonexData::writeTime
std::string writeTime(const CommonTime &dt) const
Definition: IonexData.cpp:623
gnsstk::Triple::theArray
std::valarray< double > theArray
Definition: Triple.hpp:251
gnsstk::Triple
Definition: Triple.hpp:68
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexData::parseTime
CommonTime parseTime(const std::string &line) const
Definition: IonexData.cpp:608
gnsstk::Vector::resize
Vector & resize(const size_t index)
Definition: Vector.hpp:262
gnsstk::WGS84Ellipsoid
Definition: WGS84Ellipsoid.hpp:56
gnsstk::Exception
Definition: Exception.hpp:151
gnsstk::StringUtils::stripTrailing
std::string & stripTrailing(std::string &s, const std::string &aString, std::string::size_type num=std::string::npos)
Definition: StringUtils.hpp:1453
gnsstk::IonexData::IonexValType::type
std::string type
type e.g. TEC, RMS
Definition: IonexData.hpp:108
example6.second
second
Definition: example6.py:69
gnsstk::IonexStream
Definition: IonexStream.hpp:61
gnsstk::IonexData::hgt
double hgt[3]
Definition of a grid in height.
Definition: IonexData.hpp:143
gnsstk::IonexData::mapID
int mapID
denote the internal number of the current map
Definition: IonexData.hpp:131
gnsstk::IonexData::RMS
static const GNSSTK_EXPORT IonexValType RMS
Definition: IonexData.hpp:123
gnsstk::Position::Geocentric
@ Geocentric
geocentric (regular spherical coordinates)
Definition: Position.hpp:146
gnsstk::IonexData::startRmsMapString
static const GNSSTK_EXPORT std::string startRmsMapString
"START OF RMS MAP"
Definition: IonexData.hpp:82
example4.err
err
Definition: example4.py:126
gnsstk::IonexData::IonexData
IonexData()
Default constructor.
Definition: IonexData.cpp:98
gnsstk::IonexData
Definition: IonexData.hpp:70
gnsstk::IonexData::type
IonexValType type
Type of data either TEC or RMS.
Definition: IonexData.hpp:135
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::RefFrameSys::WGS84
@ WGS84
The reference frame used by GPS.
gnsstk::min
T min(const SparseMatrix< T > &SM)
Maximum element - return 0 if empty.
Definition: SparseMatrix.hpp:858
CivilTime.hpp
gnsstk::IonexData::lon
double lon[3]
Definition of a grid in longitude.
Definition: IonexData.hpp:142
gnsstk::IonexData::getIndex
int getIndex(const Triple &in, int igp, Triple &out) const
Definition: IonexData.cpp:427
gnsstk::beta
double beta(double x, double y)
Definition: SpecialFuncs.cpp:204
gnsstk::StringUtils::asDouble
double asDouble(const std::string &s)
Definition: StringUtils.hpp:705
gnsstk::IonexData::endOfFile
static const GNSSTK_EXPORT std::string endOfFile
"END OF FILE"
Definition: IonexData.hpp:96
example4.pos
pos
Definition: example4.py:125
gnsstk::IonexHeader::hgt
double hgt[3]
Definition: IonexHeader.hpp:217
gnsstk::IonexHeader::lat
double lat[3]
Definition: IonexHeader.hpp:220
gnsstk::IonexData::dim
int dim[3]
How many values are along latitude, longitude, height.
Definition: IonexData.hpp:132
gnsstk::IonexData::endTecMapString
static const GNSSTK_EXPORT std::string endTecMapString
"END OF TEC MAP"
Definition: IonexData.hpp:90
gnsstk::IonexData::valid
bool valid
Validity flag.
Definition: IonexData.hpp:145
gnsstk::Vector::empty
bool empty() const
STL empty.
Definition: Vector.hpp:205
gnsstk::CivilTime
Definition: CivilTime.hpp:55
gnsstk::IonexData::~IonexData
virtual ~IonexData()
Destructor.
Definition: IonexData.cpp:105
gnsstk::StringUtils
Definition: IonexStoreStrategy.cpp:44
gnsstk::StringUtils::rightJustify
std::string & rightJustify(std::string &s, const std::string::size_type length, const char pad=' ')
Definition: StringUtils.hpp:1557
gnsstk::IonexData::TEC
static const GNSSTK_EXPORT IonexValType TEC
Definition: IonexData.hpp:121
gnsstk::Vector::size
size_t size() const
STL size.
Definition: Vector.hpp:207
std
Definition: Angle.hpp:142
gnsstk::IonexData::startTecMapString
static const GNSSTK_EXPORT std::string startTecMapString
"START OF TEC MAP"
Definition: IonexData.hpp:80
gnsstk::IonexData::reallyPutRecord
void reallyPutRecord(FFStream &s) const override
Definition: IonexData.cpp:112
gnsstk::Position
Definition: Position.hpp:136
gnsstk::IonexStream::headerRead
bool headerRead
Whether or not the IonexHeader has been read.
Definition: IonexStream.hpp:91
gnsstk::IonexData::exponent
int exponent
Exponent defining the unit of the values.
Definition: IonexData.hpp:139
GNSSTK_THROW
#define GNSSTK_THROW(exc)
Definition: Exception.hpp:366
gnsstk::IonexData::getValue
double getValue(const Position &pos) const
Definition: IonexData.cpp:519
example6.month
month
Definition: example6.py:65
gnsstk::IonexData::startHgtMapString
static const GNSSTK_EXPORT std::string startHgtMapString
"START OF HEIGHT MAP"
Definition: IonexData.hpp:84
gnsstk::IonexHeader::exponent
int exponent
Exponent defining the unit of the values (optional)
Definition: IonexHeader.hpp:225
gnsstk::IonexData::isValid
virtual bool isValid() const
Am I an valid object?
Definition: IonexData.hpp:160
gnsstk::RMS
T RMS(const ConstVectorBase< T, BaseClass > &l)
Definition: VectorOperators.hpp:197
gnsstk::IonexData::IonexValType::description
std::string description
Description (optional)
Definition: IonexData.hpp:109
gnsstk::IonexData::dump
virtual void dump(std::ostream &s=std::cout) const
A debug output function.
Definition: IonexData.cpp:409


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39