WxObsMap.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_WXOBSMAP_HPP
45 #define GNSSTK_WXOBSMAP_HPP
46 
47 #include <map>
48 #include <iostream>
49 
50 #include "CommonTime.hpp"
51 
52 namespace gnsstk
53 {
56  {
58  WxObservation() noexcept
61  {}
62 
70  float temp,
71  float pres,
72  float humid)
73  noexcept
74  :t(t),
75  temperature(temp), pressure(pres),
78  {}
79 
80 
82  float temperature;
83  float pressure;
84  float humidity;
85 
87  enum EWxSrc
88  {
89  noWx,
92  };
93 
97 
101  bool isAllValid() const noexcept;
102 
108  friend std::ostream& operator<<(std::ostream& s,
109  const WxObservation& obs) noexcept;
110  };
111 
112 
116 
118  struct WxObsData
119  {
121  WxObsData() noexcept
122  :firstTime(CommonTime::END_OF_TIME),
123  lastTime(CommonTime::BEGINNING_OF_TIME) {}
124 
125  // First and last time of any data in this object
128 
130  unsigned rxId;
131 
134 
138  WxObservation getMostRecent(const CommonTime& t) const noexcept;
139 
143  void insertObservation(const WxObservation& obs) noexcept;
144 
149  void flush(const CommonTime& t) noexcept;
150 
167  WxObservation getWxObservation(const CommonTime& t,
168  unsigned iv = 3600,
169  bool interpolate = true) const;
170  };
171 } // namespace
172 #endif
gnsstk::WxObservation::WxObservation
WxObservation() noexcept
Default Constructor.
Definition: WxObsMap.hpp:58
gnsstk::WxObservation::EWxSrc
EWxSrc
An enumeration of the various weather sources.
Definition: WxObsMap.hpp:87
gnsstk::WxObservation::WxObservation
WxObservation(const CommonTime &t, float temp, float pres, float humid) noexcept
Definition: WxObsMap.hpp:69
gnsstk::BEGINNING_OF_TIME
const Epoch BEGINNING_OF_TIME(CommonTime::BEGINNING_OF_TIME)
Earliest representable Epoch.
const
#define const
Definition: getopt.c:43
gnsstk::WxObservation::temperature
float temperature
degrees Centigrade
Definition: WxObsMap.hpp:82
gnsstk::WxObservation
A Single Weather Observation.
Definition: WxObsMap.hpp:55
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
example4.temp
temp
Definition: example4.py:35
gnsstk::WxObservation::pressure
float pressure
millibars
Definition: WxObsMap.hpp:83
gnsstk::WxObservation::humiditySource
enum EWxSrc humiditySource
source of the humidity meas.
Definition: WxObsMap.hpp:96
gnsstk::WxObservation::noWx
@ noWx
No weather measurements were available.
Definition: WxObsMap.hpp:89
gnsstk::WxObsData::rxId
unsigned rxId
This is the identifier of the site.
Definition: WxObsMap.hpp:130
gnsstk::WxObservation::isAllValid
bool isAllValid() const noexcept
Definition: WxObsMap.cpp:75
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::WxObsData::obs
WxObsMap obs
The actual data.
Definition: WxObsMap.hpp:133
gnsstk::WxObsData::firstTime
CommonTime firstTime
Time of the oldest data in this object.
Definition: WxObsMap.hpp:126
gnsstk::END_OF_TIME
const Epoch END_OF_TIME(CommonTime::END_OF_TIME)
Latest Representable Epoch.
gnsstk::WxObservation::defWx
@ defWx
Default weather was used.
Definition: WxObsMap.hpp:90
gnsstk::WxObsMap
std::map< CommonTime, WxObservation > WxObsMap
Definition: WxObsMap.hpp:115
gnsstk::WxObservation::temperatureSource
enum EWxSrc temperatureSource
source of the temperature meas.
Definition: WxObsMap.hpp:94
gnsstk::WxObservation::t
CommonTime t
Time that this data was collected, in Rx GPS time.
Definition: WxObsMap.hpp:81
CommonTime.hpp
std
Definition: Angle.hpp:142
gnsstk::WxObservation::obsWx
@ obsWx
The Observed Weather was used.
Definition: WxObsMap.hpp:91
gnsstk::WxObservation::humidity
float humidity
percent
Definition: WxObsMap.hpp:84
gnsstk::WxObsData::lastTime
CommonTime lastTime
Time of the youngest data in this object.
Definition: WxObsMap.hpp:127
gnsstk::WxObsData
This is a time history weather data from a single site.
Definition: WxObsMap.hpp:118
gnsstk::WxObservation::pressureSource
enum EWxSrc pressureSource
source of the pressure meas.
Definition: WxObsMap.hpp:95
gnsstk::WxObsData::WxObsData
WxObsData() noexcept
Constructor.
Definition: WxObsMap.hpp:121


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