CARMA C++
Source.h
1 #ifndef SZA_UTIL_SOURCE_H
2 #define SZA_UTIL_SOURCE_H
3 
11 #include "carma/szautil/Axis.h"
12 #include "carma/szautil/Angle.h"
13 #include "carma/szautil/DecAngle.h"
14 #include "carma/szautil/HourAngle.h"
15 #include "carma/szautil/QuadraticInterpolatorNormal.h"
16 #include "carma/szautil/QuadraticInterpolatorPositiveAngle.h"
17 #include "carma/szautil/QuadraticInterpolatorSignedAngle.h"
18 
19 // Needed for SRC_LEN
20 
21 #include "carma/szaarrayutils/szaregs.h"
22 #include "carma/szaarrayutils/source.h"
23 
24 namespace sza {
25  namespace util {
26 
31  class Source {
32 
33  public:
34 
40  Source();
41 
45  ~Source();
46 
50  void reset();
51 
55  void setName(char* name);
56 
60  void setAxis(sza::util::Axis::Type axisType, Angle az, Angle el,
61  Angle pa);
62 
66  char* getName();
67 
73  void extend(double mjd, HourAngle ra, DecAngle dec, double dist);
74 
78  Angle getAz();
79 
83  Angle getEl();
84 
88  HourAngle getRa(double tt);
89 
93  DecAngle getDec(double tt);
94 
98  double getDist(double tt);
99 
103  HourAngle getGradRa(double tt);
104 
108  DecAngle getGradDec(double tt);
109 
113  inline void setType(sza::array::SourceType type) {
114  type_ = type;
115  }
116 
120  inline sza::array::SourceType getType() {
121  return type_;
122  }
123 
127  bool isJ2000();
128 
132  bool isEphem();
133 
137  bool isRaDec();
138 
142  bool isAzEl();
143 
147  bool canBracket(double mjd);
148 
149  private:
150 
154  sza::array::SourceType type_;
155 
159  char name_[SRC_LEN];
160 
164  QuadraticInterpolator* ra_;
165 
169  QuadraticInterpolator* dec_;
170 
174  QuadraticInterpolator* dist_;
175 
179  Angle az_;
180  Angle el_;
181  Angle pa_;
182 
183  }; // End class Source
184 
185  }; // End namespace util
186 }; // End namespace sza
187 
188 #endif // End #ifndef
void setType(sza::array::SourceType type)
Set the type of source.
Definition: Source.h:113
bool isRaDec()
True if this source is an RaDec source.
Angle getEl()
Return the El of this source.
~Source()
Destructor.
Source()
Constructor function.
sza::array::SourceType getType()
Get the type of this source.
Definition: Source.h:120
Type
An enumerator to identify a valid axis.
Definition: Axis.h:24
Angle getAz()
Return the Az of this source.
bool isEphem()
True if this source is an ephemeris source.
bool isJ2000()
True if this source is a J2000 source.
char * getName()
Return the name of this source.
The following class is used to record details about the current source trajectory.
Definition: Source.h:31
void reset()
Reset this object's data.
bool isAzEl()
True if this source is an Az/El source.
DecAngle getGradDec(double tt)
Return the gradient for the DEC.
HourAngle getRa(double tt)
Return the interpolated ra of this source.
void setName(char *name)
Set the name of this source.
void setAxis(sza::util::Axis::Type axisType, Angle az, Angle el, Angle pa)
Set axis values for this source.
The QuadraticInterpolator class is used to perform quadrature interpolation of arbitrary continuous f...
DecAngle getDec(double tt)
Return the interpolated dec of this source.
bool canBracket(double mjd)
True if we can calculate source parameters for this timestamp.
double getDist(double tt)
Return the interpolated distance of this source.
HourAngle getGradRa(double tt)
Return the gradient for the RA.
void extend(double mjd, HourAngle ra, DecAngle dec, double dist)
Extend the track of this source.