GCATTropModel.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 
39 
40 #include "GCATTropModel.hpp"
41 
42 namespace gnsstk
43 {
44  GCATTropModel::GCATTropModel(const double& ht)
45  {
47  valid = true;
48  }
49 
50 
51  double GCATTropModel::correction(double elevation) const
52  {
54 
55  if(elevation < 5.0) return 0.0;
56 
57  return ( (dry_zenith_delay() + wet_zenith_delay()) *
58  mapping_function(elevation));
59  }
60 
61 
63  const Position& SV )
64  {
65 
66  try
67  {
69  }
70  catch(GeometryException& e)
71  {
72  valid = false;
73  }
74 
75  if(!valid) throw InvalidTropModel("Invalid model");
76 
77  double c;
78  try
79  {
80  c = correction(RX.elevationGeodetic(SV));
81  }
82  catch(InvalidTropModel& e)
83  {
84  GNSSTK_RETHROW(e);
85  }
86 
87  return c;
88 
89  }
90 
91 
92  double GCATTropModel::correction( const Xvt& RX,
93  const Xvt& SV,
94  const CommonTime& tt )
95  {
96 
97  Position R(RX),S(SV);
98 
99  return GCATTropModel::correction(R,S);
100  }
101 
102 
104  {
106 
107  double ddry(2.29951*std::exp((-0.000116 * gcatHeight) ));
108 
109  return ddry;
110  }
111 
112 
113  double GCATTropModel::mapping_function(double elevation) const
114  {
116 
117  if(elevation < 5.0) return 0.0;
118 
119  double d = std::sin(elevation*DEG_TO_RAD);
120  d = SQRT(0.002001+(d*d));
121 
122  return (1.001/d);
123  }
124 
125 
126  void GCATTropModel::setReceiverHeight(const double& ht)
127  {
128  gcatHeight = ht;
129  valid = true;
130  }
131 
132 }
gnsstk::GCATTropModel::gcatHeight
double gcatHeight
Receiver height.
Definition: GCATTropModel.hpp:207
SQRT
#define SQRT(x)
Definition: MathBase.hpp:74
gnsstk::GCATTropModel::setReceiverHeight
virtual void setReceiverHeight(const double &ht)
Definition: GCATTropModel.cpp:126
gnsstk::GCATTropModel::mapping_function
virtual double mapping_function(double elevation) const
Definition: GCATTropModel.cpp:113
gnsstk::Position::getAltitude
double getAltitude() const noexcept
return height above ellipsoid (meters)
Definition: Position.hpp:469
THROW_IF_INVALID
#define THROW_IF_INVALID()
Definition: TropModel.hpp:57
GCATTropModel.hpp
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
std::sin
double sin(gnsstk::Angle x)
Definition: Angle.hpp:144
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::GCATTropModel::correction
virtual double correction(double elevation) const
Definition: GCATTropModel.cpp:51
gnsstk::GCATTropModel::wet_zenith_delay
virtual double wet_zenith_delay() const
Definition: GCATTropModel.hpp:158
gnsstk::Xvt
Definition: Xvt.hpp:60
gnsstk::TropModel::valid
bool valid
true only if current model parameters are valid
Definition: TropModel.hpp:279
GNSSTK_RETHROW
#define GNSSTK_RETHROW(exc)
Definition: Exception.hpp:369
gnsstk::GCATTropModel::GCATTropModel
GCATTropModel()
Empty constructor.
Definition: GCATTropModel.hpp:91
gnsstk::GCATTropModel::dry_zenith_delay
virtual double dry_zenith_delay() const
Definition: GCATTropModel.cpp:103
gnsstk::Position
Definition: Position.hpp:136
gnsstk::Position::elevationGeodetic
double elevationGeodetic(const Position &Target) const
Definition: Position.cpp:1331
gnsstk::DEG_TO_RAD
static const double DEG_TO_RAD
Conversion Factor from degrees to radians (units: degrees^-1)
Definition: GNSSconstants.hpp:76


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