CARMA C++
QuadPath.h
Go to the documentation of this file.
1 #ifndef SZA_UTIL_QUADPATH_H
2 #define SZA_UTIL_QUADPATH_H
3 
11 // Include the C-style struct and method definitions this class is
12 // based on.
13 
14 #include "carma/szaarrayutils/quad.h"
15 #include "carma/szaarrayutils/szaconst.h" // pi and twopi
16 
17 namespace sza {
18  namespace util {
19 
27  class QuadPath {
28 
29  public:
30 
34  enum QuadType {
39 
44 
49  };
50 
55  struct QuadData {
56 
60  sza::array::QuadData quaddata_;
61 
66  void init();
67  };
68 
79  QuadPath(double empty_value, QuadType type);
80 
84  ~QuadPath();
85 
91  void get(QuadData* data);
92 
111  void set(QuadData* data);
112 
122  void empty();
123 
159  void extend(double x, double y);
160 
164  double eval(double x);
165 
169  double grad(double x);
170 
171  private:
172 
177  sza::array::QuadPath* quadpath_;
178 
179  // Private methods
180 
185  double extendAngle(double a, double b);
186 
190  QP_ANGLE_FN(angle_around_zero);
191 
195  QP_ANGLE_FN(angle_around_pi);
196 
197  }; // End class QuadPath
198 
199  }; // End namespace util
200 }; // End namespace sza
201 
202 #endif
A class to handle quadrature interpolation of ephemerides received from the control program...
Definition: QuadPath.h:27
void extend(double x, double y)
Append or prepend an x,y coordinate pair to the three-entry circular table of a quadratic interpolati...
void init()
Empty a QuadData object and set all of its sample values to 0.
sza::array::QuadData quaddata_
The C-struct this is based on.
Definition: QuadPath.h:60
QuadPath(double empty_value, QuadType type)
Constructor function.
~QuadPath()
Destructor.
A continuous function.
Definition: QuadPath.h:38
The following object type is used to query or replace the current contents of a QuadPath object...
Definition: QuadPath.h:55
double grad(double x)
Return the gradient of the quadratic equation at x.
double eval(double x)
Return the value of the quadratic equation at x.
Angles defined modulo 2.pi between -pi <= v < pi.
Definition: QuadPath.h:43
QuadType
Enumerate the various types of ephemeris types we might handle.
Definition: QuadPath.h:34
void set(QuadData *data)
Set the contents of a QuadPath object.
void empty()
Empty the coordinate table of a QuadPath object.
Angles defined modulo 2.pi between 0 <= v < 2.pi.
Definition: QuadPath.h:48