CARMA C++
DelayLocation.h
Go to the documentation of this file.
1 #ifndef SZA_UTIL_DELAYLOCATION_H
2 #define SZA_UTIL_DELAYLOCATION_H
3 
11 #include "carma/szautil/Debug.h"
12 #include "carma/szautil/Delay.h"
13 #include "carma/szautil/Location.h"
14 #include "carma/szautil/Source.h"
15 
16 namespace sza {
17  namespace util {
18 
19  class DelayAntennaLocation;
20  class DelayManager;
21  class MonitorPoint;
22  class MonitorPointManager;
23 
24  class DelayLocation : public Location {
25  public:
26 
30  DelayLocation();
31 
35  virtual ~DelayLocation();
36 
40  void setFixedDelay(Delay delay);
41 
45  void setAdjustableDelay(Delay delay);
46 
50  inline Delay adjustableDelay() {
51  return referredAdjustableDelay_;
52  }
53 
57  inline Delay fixedDelay() {
58  return referredFixedDelay_;
59  }
60 
64  inline Location& location() {
65  return (Location&) *this;
66  }
67 
71  virtual void locationChanged(Location* loc);
72 
73  // Toggle using various delays
74 
75  void useAdjustableDelay(bool use);
76  void useFixedDelay(bool use);
77  void useGeometricDelay(bool use);
78  void useIonosphericDelay(bool use);
79  void useTroposphericDelay(bool use);
80  void useThermalDelay(bool use);
81 
85  Delay totalDelay(double mjd, sza::util::Source* src,
86  DelayAntennaLocation* refDLoc,
87  bool doMotionCorrection);
88 
92  Delay totalDelay(Angle az, Angle el,
93  DelayAntennaLocation* refDLoc);
94 
98  Delay geometricDelay(DelayAntennaLocation* refDLoc,
99  bool doMotionCorrection);
100 
104  Delay geometricDelay(Angle az, Angle el,
105  DelayAntennaLocation* refDLoc);
106 
110  Delay troposphericDelay(DelayAntennaLocation* refDLoc);
111 
115  inline bool discontinuity() {
116  return discontinuity_;
117  }
118 
122  void markAsDiscontinuous(bool disc) {
123  discontinuity_ = disc;
124  }
125 
126  protected:
127 
128  // DelayManager is a friend of this class
129 
130  friend class DelayManager;
131 
132  DelayManager* delayListener_;
133 
134  DelayManager* locationListener_;
135 
136  public:
137  // The physical location associated with this object
138 
139  Location location_;
140 
141  protected:
142  // A manager for monitor points
143 
144  MonitorPointManager* monitor_;
145 
146  MonitorPoint* monAdjustableDelay_;
147  MonitorPoint* monUseAdjustableDelay_;
148  MonitorPoint* monFixedDelay_;
149  MonitorPoint* monUseFixedDelay_;
150  MonitorPoint* monGeometricDelay_;
151  MonitorPoint* monUseGeometricDelay_;
152  MonitorPoint* monTroposphericDelay_;
153  MonitorPoint* monUseTroposphericDelay_;
154  MonitorPoint* monLocation_;
155 
156  // Update monitor points managed by this object in the register
157  // database
158 
159  virtual void updateMonitors();
160 
161  protected:
162 
163  // True if this location's parameters have changed
164 
165  bool discontinuity_;
166 
167  // The fixed delay relative to some fiducial point
168 
169  Delay fiducialFixedDelay_;
170 
171  // A user-adjustable delay relative to some fixed point
172 
173  Delay fiducialAdjustableDelay_;
174 
175  // The fixed delay relative to an arbitrary reference point
176 
177  Delay referredFixedDelay_;
178 
179  // A user-adjustable delay relative to an arbitrary reference point
180 
181  Delay referredAdjustableDelay_;
182 
183  // The last calculated geometric delay
184 
185  Delay lastGeometricDelay_;
186 
187  // The last calculated tropospheric delay
188 
189  Delay lastTroposphericDelay_;
190 
191  // Toggle using various delays
192 
193  bool useAdjustableDelay_;
194  bool useFixedDelay_;
195  bool useGeometricDelay_;
196  bool useIonosphericDelay_;
197  bool useTroposphericDelay_;
198  bool useThermalDelay_;
199 
205  void registerDelayCallback(DelayManager* delayListener);
206 
211  void registerLocationCallback(DelayManager* locationListener);
212 
216  void referFixedDelayTo(Delay delay);
217 
221  void referAdjustableDelayTo(Delay delay);
222 
226  inline Delay fiducialFixedDelay() {
227  return fiducialFixedDelay_;
228  }
229 
233  inline Delay fiducialAdjustableDelay() {
234  return fiducialAdjustableDelay_;
235  }
236 
237  // Update values in the register database
238 
239  void updateUseAdjustableDelay();
240  void updateUseFixedDelay();
241  void updateUseGeometricDelay();
242  void updateUseTroposphericDelay();
243 
244  void updateAdjustableDelay();
245  void updateFixedDelay();
246  void updateGeometricDelay();
247  void updateTroposphericDelay();
248 
249  void updateLocation();
250 
251  }; // End class DelayLocation
252 
253  } // End namespace util
254 } // End namespace sza
255 
256 
257 
258 #endif // End #ifndef SZA_UTIL_DELAYLOCATION_H
void registerLocationCallback(DelayLocation *delayLocation)
Register to be called back when this object's location is updated.
Started: Wed Jan 14 11:00:24 PST 2004.
Location()
Constructor.
The following class is used to record details about the current source trajectory.
Definition: Source.h:31