BLQDataReader.hpp
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 #ifndef GNSSTK_BLQDATAREADER_HPP
45 #define GNSSTK_BLQDATAREADER_HPP
46 
47 #include <string>
48 #include <map>
49 
50 #include "FFTextStream.hpp"
51 #include "StringUtils.hpp"
52 #include "Matrix.hpp"
53 
54 
55 namespace gnsstk
56 {
58 
59 
107  {
108  public:
109 
112  {};
113 
120  BLQDataReader(const char* fn)
121  : FFTextStream(fn, std::ios::in)
122  { loadData(); };
123 
124 
131  BLQDataReader(const std::string& fn)
132  : FFTextStream(fn.c_str(), std::ios::in)
133  { loadData(); };
134 
135 #pragma clang diagnostic push
136 #pragma clang diagnostic ignored "-Woverloaded-virtual"
137  virtual void open(const char* fn);
140 
141 
144  virtual void open(const std::string& fn);
145 
146 #pragma clang diagnostic pop
147  virtual BLQDataReader& clearData()
149  { OceanTidesData.clear(); return (*this); };
150 
151 
163  virtual Matrix<double> getTideHarmonics(const std::string& station);
164 
165 
167  virtual ~BLQDataReader() {};
168 
169 
170  private:
171 
172 
174  struct tideData
175  {
176  // Default constructor initializing the data in the structure
177  tideData() : harmonics(6,11,0.0) {};
178 
180  };
181 
182 
184  typedef std::map<std::string, tideData>::const_iterator tideDataIt;
185 
186 
188  std::map<std::string, tideData> OceanTidesData;
189 
190 
197  void setData( const std::string& stationName,
198  const tideData& data )
199  { OceanTidesData.insert(make_pair(stationName, data)); };
200 
201 
206  virtual void loadData(void);
207 
208 
209  }; // End of class 'BLQDataReader'
210 
211 
213 
214 } // End of namespace gnsstk
215 
216 #endif // GNSSTK_BLQDATAREADER_HPP
gnsstk::BLQDataReader::getTideHarmonics
virtual Matrix< double > getTideHarmonics(const std::string &station)
Definition: BLQDataReader.cpp:216
StringUtils.hpp
gnsstk::BLQDataReader::tideData
A structure used to store ocean tide harmonics data.
Definition: BLQDataReader.hpp:174
gnsstk::BLQDataReader::BLQDataReader
BLQDataReader()
Default constructor.
Definition: BLQDataReader.hpp:111
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::BLQDataReader::tideDataIt
std::map< std::string, tideData >::const_iterator tideDataIt
Handy iterator type.
Definition: BLQDataReader.hpp:184
gnsstk::BLQDataReader::~BLQDataReader
virtual ~BLQDataReader()
Destructor.
Definition: BLQDataReader.hpp:167
gnsstk::BLQDataReader::clearData
virtual BLQDataReader & clearData()
Method to clear all previously loaded ocean tide harmonics data.
Definition: BLQDataReader.hpp:148
gnsstk::BLQDataReader::tideData::tideData
tideData()
Definition: BLQDataReader.hpp:177
gnsstk::Matrix< double >
gnsstk::BLQDataReader::OceanTidesData
std::map< std::string, tideData > OceanTidesData
Map holding the information regarding ocean tide harmonics.
Definition: BLQDataReader.hpp:188
gnsstk::BLQDataReader::open
virtual void open(const char *fn)
Definition: BLQDataReader.cpp:173
FFTextStream.hpp
gnsstk::BLQDataReader::BLQDataReader
BLQDataReader(const char *fn)
Definition: BLQDataReader.hpp:120
example3.data
data
Definition: example3.py:22
gnsstk::BLQDataReader
Definition: BLQDataReader.hpp:106
std
Definition: Angle.hpp:142
gnsstk::BLQDataReader::tideData::harmonics
Matrix< double > harmonics
Tide harmonics data.
Definition: BLQDataReader.hpp:177
Matrix.hpp
example5.fn
string fn
Definition: example5.py:10
gnsstk::BLQDataReader::BLQDataReader
BLQDataReader(const std::string &fn)
Definition: BLQDataReader.hpp:131
gnsstk::FFTextStream
Definition: FFTextStream.hpp:63
gnsstk::BLQDataReader::setData
void setData(const std::string &stationName, const tideData &data)
Definition: BLQDataReader.hpp:197
gnsstk::BLQDataReader::loadData
virtual void loadData(void)
Definition: BLQDataReader.cpp:53


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