My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
Atmosphere.h
1 #ifndef GCP_UTIL_ATMOSPHERE_H
2 #define GCP_UTIL_ATMOSPHERE_H
3 
11 /*
12  * Set the temperature lapse rate, termination precision, and optical
13  * and radio wavelengths required by the slalib refraction function
14  * (slaRefco()). Note that for wavelengths longward of 100 microns
15  * slaRefco() uses a model that is currently independent of wavelength,
16  * so the accuracy of the chosen radio wavelength is not pertinent.
17  */
18 
19 #include "gcp/util/common/Angle.h"
20 #include "gcp/util/common/Frequency.h"
21 #include "gcp/util/common/Length.h"
22 #include "gcp/util/common/Percent.h"
23 #include "gcp/util/common/Pressure.h"
24 #include "gcp/util/common/Temperature.h"
25 #include "gcp/util/common/Wavelength.h"
26 
27 namespace gcp {
28  namespace util {
29 
30  class Atmosphere {
31  public:
32 
33  // As suggested by slalib documentation (deg K/meter)
34 
35  static const double tropoLapseRate_;
36 
37  // Refraction calculation will be done to 10 milli-arcseconds accuracy
38 
39  static Angle refracAccuracy_;
40 
41  // Near the center of the visible spectrum
42 
43  static Wavelength opticalWavelength_;
44 
48  Atmosphere();
49 
53  virtual ~Atmosphere();
54 
56  double a;
57  double b;
58  };
59 
65  Temperature airTemp,
66  Pressure pressure,
67  Percent humidity,
68  Wavelength wavelength,
69  Angle latitude,
70  double tropoLapseRate,
71  Angle accuracy);
72 
73  // Default methods using internal members
74 
77 
79  opticalRefractionCoefficients();
80 
81  // Set parameters we need for the refraction calc
82 
83  enum {
84  NONE = 0x0,
85  TEMP = 0x1,
86  PRESSURE = 0x2,
87  HUMIDITY = 0x4,
88  ALTITUDE = 0x8,
89  LATITUDE = 0x10,
90  WAVE = 0x20,
91  ALL = TEMP|PRESSURE|HUMIDITY|ALTITUDE|LATITUDE|WAVE,
92  ALLOPTICAL = TEMP|PRESSURE|HUMIDITY|ALTITUDE|LATITUDE,
93  };
94 
95  void setAirTemperature(Temperature airTemp);
96 
97  void setPressure(Pressure pressure);
98 
99  void setHumidity(Percent humidity);
100 
101  void setFrequency(Frequency frequency);
102 
103  void setAltitude(Length altitude);
104 
105  void setLatitude(Angle latitude);
106 
107  void setWavelength(Wavelength wavelength);
108 
109  bool canComputeRefraction();
110 
111  bool canComputeOpticalRefraction();
112 
113  protected:
114 
115  Temperature airTemperature_;
116  Length altitude_;
117  Angle latitude_;
118  Wavelength wavelength_;
119  Percent humidity_;
120  Pressure pressure_;
121 
122  unsigned lacking_;
123 
124  void initialize();
125 
126  }; // End class Atmosphere
127 
128  } // End namespace util
129 } // End namespace gcp
130 
131 
132 
133 #endif // End #ifndef GCP_UTIL_ATMOSPHERE_H
Definition: Wavelength.h:19
Definition: Temperature.h:17
Definition: Pressure.h:22
RefractionCoefficients refractionCoefficients()
Definition: Atmosphere.cc:74
Definition: Percent.h:20
Atmosphere()
Definition: Atmosphere.cc:21
Definition: Angle.h:20
Definition: Atmosphere.h:30
virtual ~Atmosphere()
Definition: Atmosphere.cc:34
Definition: Length.h:19
Definition: Frequency.h:21