OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
EnvsatMPH.h
Go to the documentation of this file.
1 /*
2  * File: EnvsatMPH.h
3  * Author: dshea
4  *
5  * Created on November 28, 2012, 1:11 PM
6  */
7 
8 #ifndef ENVSATMPH_H
9 #define ENVSATMPH_H
10 
11 class EnvsatFile;
12 class EnvsatSPH;
13 
14 #include <stdint.h>
15 #include <string>
16 
17 class EnvsatMPH {
18 public:
19 
20  // Product type constants
24 
25  //EnvsatMPH();
26  EnvsatMPH(const EnvsatMPH& orig);
28  virtual ~EnvsatMPH();
29 
30  virtual EnvsatMPH& operator=(const EnvsatMPH& src);
31 
33  return envsatFile;
34  }
35 
36  virtual int readHeader(int fin);
37  virtual int writeHeader(int fout);
38 
39  // function to create the correct SPH object
40  virtual EnvsatSPH* createSPH();
41 
42  virtual int getMPHSize() {
43  return MPH_LENGTH;
44  }
45 
46  virtual std::string& getProductName();
47  virtual void setProductName(const std::string& name);
48 
53  virtual std::string& getProductType();
54 
55  virtual bool getObpgExtract();
56  virtual void setObpgExtract(bool val);
57 
58  virtual int getStartPixel();
59  virtual void setStartPixel(int pix);
60  virtual int getEndPixel();
61  virtual void setEndPixel(int pix);
62 
63  virtual double getSensingStart();
64  virtual void setSensingStart(double unixTime);
65  virtual double getSensingStop();
66  virtual void setSensingStop(double unixTime);
67 
69  virtual int64_t getTotalSize();
70  virtual void setTotalSize(int64_t size);
71 
72  virtual int getSPHSize();
73  virtual void setSPHSize(int size);
74 
75  virtual int getNumDSDs();
76  virtual void setNumDSDs(int num);
77  virtual int getDSDSize();
78  virtual void setDSDSize(int size);
79 
80  virtual int getNumDSs();
81  virtual void setNumDSs(int num);
82 
83  virtual void print();
84  virtual void printRecursive();
85 
86 protected:
87 
88 private:
89  // constants needed to index into the buffer
90  static const unsigned int MPH_LENGTH = 1247;
91 
92  static const unsigned int PRODUCTNAME_OFFSET = 9;
93  static const unsigned int PRODUCTNAME_LENGTH = 62;
94  static const unsigned int PRODUCT_TYPE_LENGTH = 10;
95 
96  static const unsigned int OBPG_EXTRACT_OFFSET = 120;
97  static const unsigned int OBPG_EXTRACT_LENGTH = 14;
98  static const std::string OBPG_EXTRACT_STRING;
99 
100  static const unsigned int SOFTWARE_VER_OFFSET = 279;
101  static const unsigned int SOFTWARE_VER_LENGTH = 14;
102 
103  // begin 296
104  // START_PIXEL=+1234567890
105  static const unsigned int START_PIXEL_LABEL_OFFSET = 295;
106  static const std::string START_PIXEL_LABEL_STRING;
107  static const std::string PIXEL_UNITS_STRING;
108  static const unsigned int START_PIXEL_LENGTH = 11;
109 
110  static const unsigned int SENSING_START_OFFSET = 351;
111  static const unsigned int SENSING_STOP_OFFSET = 394;
112 
113  // begin 424
114  // END_PIXEL=+1234567890
115  static const unsigned int END_PIXEL_LABEL_OFFSET = 423;
116  static const std::string END_PIXEL_LABEL_STRING;
117  static const unsigned int END_PIXEL_LENGTH = 11;
118 
119  static const unsigned int TOT_SIZE_OFFSET = 1075;
120  static const unsigned int TOT_SIZE_LENGTH = 21;
121 
122  static const unsigned int SPH_SIZE_OFFSET = 1113;
123  static const unsigned int SPH_SIZE_LENGTH = 11;
124 
125  static const unsigned int NUM_DSD_OFFSET = 1140;
126  static const unsigned int NUM_DSD_LENGTH = 11;
127 
128  static const unsigned int DSD_SIZE_OFFSET = 1161;
129  static const unsigned int DSD_SIZE_LENGTH = 11;
130 
131  static const unsigned int NUM_DS_OFFSET = 1194;
132  static const unsigned int NUM_DS_LENGTH = 11;
133 
134  // init all of the standard internal structures
135  void init(EnvsatFile* file);
136 
137  // member variables
138  EnvsatFile* envsatFile;
139  char* buffer;
140 
141 };
142 
143 #endif /* ENVSATMPH_H */
144 
virtual double getSensingStart()
Definition: EnvsatMPH.cpp:188
virtual int getMPHSize()
Definition: EnvsatMPH.h:42
virtual int getDSDSize()
Definition: EnvsatMPH.cpp:234
virtual int64_t getTotalSize()
Definition: EnvsatMPH.cpp:210
virtual void setNumDSs(int num)
Definition: EnvsatMPH.cpp:246
virtual EnvsatMPH & operator=(const EnvsatMPH &src)
Definition: EnvsatMPH.cpp:51
virtual std::string & getProductType()
Definition: EnvsatMPH.cpp:104
virtual EnvsatSPH * createSPH()
Definition: EnvsatMPH.cpp:84
virtual void setNumDSDs(int num)
Definition: EnvsatMPH.cpp:230
virtual double getSensingStop()
Definition: EnvsatMPH.cpp:199
virtual bool getObpgExtract()
Definition: EnvsatMPH.cpp:110
virtual int getNumDSs()
Definition: EnvsatMPH.cpp:242
@ string
virtual void setDSDSize(int size)
Definition: EnvsatMPH.cpp:238
virtual EnvsatFile * getEnvsatFile()
Definition: EnvsatMPH.h:32
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed file
Definition: HISTORY.txt:413
virtual ~EnvsatMPH()
Definition: EnvsatMPH.cpp:40
virtual int getStartPixel()
Definition: EnvsatMPH.cpp:131
virtual void setEndPixel(int pix)
Definition: EnvsatMPH.cpp:176
virtual std::string & getProductName()
Definition: EnvsatMPH.cpp:94
static const std::string TYPE_MERIS_FR_L1
Definition: EnvsatMPH.h:22
virtual void print()
Definition: EnvsatMPH.cpp:250
virtual void setTotalSize(int64_t size)
Definition: EnvsatMPH.cpp:214
static const std::string TYPE_MERIS_RR_L1
Definition: EnvsatMPH.h:21
virtual void setStartPixel(int pix)
Definition: EnvsatMPH.cpp:145
virtual void printRecursive()
Definition: EnvsatMPH.cpp:273
virtual void setProductName(const std::string &name)
Definition: EnvsatMPH.cpp:100
virtual void setObpgExtract(bool val)
Definition: EnvsatMPH.cpp:119
virtual int readHeader(int fin)
Definition: EnvsatMPH.cpp:56
virtual void setSensingStop(double unixTime)
Definition: EnvsatMPH.cpp:205
virtual int writeHeader(int fout)
Definition: EnvsatMPH.cpp:70
virtual int getEndPixel()
Definition: EnvsatMPH.cpp:162
virtual int getNumDSDs()
Definition: EnvsatMPH.cpp:226
virtual void setSPHSize(int size)
Definition: EnvsatMPH.cpp:222
virtual int getSPHSize()
Definition: EnvsatMPH.cpp:218
EnvsatMPH(const EnvsatMPH &orig)
Definition: EnvsatMPH.cpp:35
msiBandIdx val
Definition: l1c_msi.cpp:34
static const std::string TYPE_MERIS_FRS_L1
Definition: EnvsatMPH.h:23
virtual void setSensingStart(double unixTime)
Definition: EnvsatMPH.cpp:194