OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
VcstPolarWanderItem.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: VcstPolarWanderItem.h
4  *
5  * DESCRIPTION: This class is derived from the AdlCmnInputItem class. It represents
6  * a HDF5 Polar Wander data item capable of converting an IDPS Polar Wander AUX
7  * file into a format that is compatible with the interface requirements of the
8  * common geolocation algorithm.
9  *
10  * It is adapted from a utility application developed by
11  *
12  * Author: Richard P. Cember
13  * Computational Physics, Inc. and Integrated Program Office
14  *
15  * Modified by: Paul E. Meade
16  *
17  * Description: A source file to convert the USNO polar motion "finals" file
18  * into the corresponding binary file that is read by the SDR processes,
19  * with shortName USNO-POLARWANDER-UT1 and fitting into struct type
20  * CMNGEO_POLAR_UT1_TYPE. This file is a highly modified version of
21  * Build 1.5.0.18's ING/MSD/EarthOrientation/src/IngMsdEarth-
22  * Orientation_Converter.cpp and its corresponding header (.h) file.
23  *
24  *******************************************************************************/
25 
26 #ifndef VcstPolarWanderItem_h
27 #define VcstPolarWanderItem_h
28 
29 #include <string>
30 #include <VcstCmnGeoStructs.h>
31 #include <VcstLutInputItem.h>
32 
39 public:
40 
51 
55  virtual ~VcstPolarWanderItem();
56 
61  return new VcstPolarWanderItem;
62  }
63 
69  virtual int getData();
70 
71 protected:
72 
77 
82 
87 
92 
96  int ReadH5PolarWanderFile(std::string filepath, char* bufPtr);
97 
102  int fillInternalBuffer(char* bufPtr);
103 
118  void extractField(std::stringstream &converter, unsigned char* source,
119  const unsigned int offset, const unsigned int length);
120 
125  struct finalsEntry {
129  int year;
130 
134  int month;
135 
139  int day;
140 
144  double modifiedJulianDate;
145 
149  char polarFlag;
150 
154  double x_wan;
155 
159  double x_err;
160 
164  double y_wan;
165 
169  double y_err;
170 
174  char diffFlag;
175 
179  double UT1mUTC;
180  };
181 
182  unsigned char* nativeBuffer_;
183  int nativeBufferSize_;
184 
185 };
186 
187 #endif
static VcstPolarWanderItem * getInstance()
VcstPolarWanderItem & operator=(const VcstPolarWanderItem &right)
int ReadAsciiPolarWanderFile(std::string filepath, char *bufPtr)
virtual int getData()
@ string
void extractField(std::stringstream &converter, unsigned char *source, const unsigned int offset, const unsigned int length)
unsigned char * nativeBuffer_
int ReadH5PolarWanderFile(std::string filepath, char *bufPtr)
int readMetadata(std::string filepath)
string filepath
Definition: color_dtdb.py:207
int fillInternalBuffer(char *bufPtr)
virtual ~VcstPolarWanderItem()
l2prod offset