OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
VcstGeoRctngl.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * NAME: VcstGeoRctngl
4  *
5  * DESCRIPTION: Defines functions to interpolate geolocation data
6  *
7  *
8  ******************************************************************************/
9 
10 #ifndef VCST_GEO_RCTNGL_H
11 #define VCST_GEO_RCTNGL_H
12 
13 #include <VcstViirsGeo.h>
14 #include <VcstGeoDataStructs.h>
16 #include <VcstGeoRctnglStruct.h>
17 #include <VcstGeoParameters.h>
18 
19 class VcstCmnGeo;
20 
21 // Geolocates the decimated rectangle pointes
23  viirsSdrGeoPtrs* inPtrs,
24  VcstCmnGeo *geoPtr,
25  ViirsGeoDecimType* outDecim);
26 
27 // Geolocates all points in the granule by interpolating to the full
28 // strucure using the decimated geolocation data
30  ViirsGeoRctnglType* inRec,
31  viirsSdrGeoPtrs* inPtrs,
32  ViirsGeoDecimType* inDecim,
33  VcstCmnGeo* geoPtr,
34  ViirsGeoFullType* outFull,
35  int extractPixelLimits[2]);
36 
37 // Interpolates grow/gcol and lat/lon values for full locations using
38 // the decimated geolocation data
39 int interpLocations(int iscan,
40  ViirsGeoRctnglType* inRec,
41  viirsSdrGeoPtrs* inPtrs,
42  ViirsGeoDecimType* inDecim,
44  ViirsGeoFullType* outFull,
45  int extractPixelLimits[2]);
46 
47 // Interpolates satellite, sun, and moon angles for full locations using
48 // the decimated geolocation data
49 void interpAngles(int iscan,
50  ViirsGeoRctnglType* inRec,
51  viirsSdrGeoPtrs* inPtrs,
52  ViirsGeoDecimType* inDecim,
53  ViirsGeoFullType* outFull,
54  int extractPixelLimits[2]);
55 
56 // Performs quadratic interpolation of the decimated data to the full
57 // data structure
58 void quadInterp(const double* Yval_in,
59  double Xmid,
60  double Xend,
61  int idxlim,
62  double* Yval_out);
63 
64 // Improves the satellite angles near nadir
65 int fixNadirSatAngles(int iscan,
66  viirsSdrGeoPtrs* inPtrs,
67  VcstCmnGeo *geoPtr,
68  ViirsGeoFullType* outFull,
69  int extractPixelLimits[2]);
70 
71 // Improves the satellite angles near the pole
72 int fixPoleSatAngles(int iscan,
73  viirsSdrGeoPtrs* inPtrs,
74  ViirsGeoRctnglType* inRec,
75  VcstCmnGeo *geoPtr,
76  ViirsGeoFullType* outFull,
77  int extractPixelLimits[2]);
78 
79 #endif
80 
int fixPoleSatAngles(int iscan, viirsSdrGeoPtrs *inPtrs, ViirsGeoRctnglType *inRec, VcstCmnGeo *geoPtr, ViirsGeoFullType *outFull, int extractPixelLimits[2])
int interpLocations(int iscan, ViirsGeoRctnglType *inRec, viirsSdrGeoPtrs *inPtrs, ViirsGeoDecimType *inDecim, VcstPolarStereographicDataSet *psds, ViirsGeoFullType *outFull, int extractPixelLimits[2])
int geolocateFullFromDecim(int iscan, ViirsGeoRctnglType *inRec, viirsSdrGeoPtrs *inPtrs, ViirsGeoDecimType *inDecim, VcstCmnGeo *geoPtr, ViirsGeoFullType *outFull, int extractPixelLimits[2])
void quadInterp(const double *Yval_in, double Xmid, double Xend, int idxlim, double *Yval_out)
int fixNadirSatAngles(int iscan, viirsSdrGeoPtrs *inPtrs, VcstCmnGeo *geoPtr, ViirsGeoFullType *outFull, int extractPixelLimits[2])
void geolocateDecim(ViirsGeoRctnglType *inRec, viirsSdrGeoPtrs *inPtrs, VcstCmnGeo *geoPtr, ViirsGeoDecimType *outDecim)
int32_t iscan
void interpAngles(int iscan, ViirsGeoRctnglType *inRec, viirsSdrGeoPtrs *inPtrs, ViirsGeoDecimType *inDecim, ViirsGeoFullType *outFull, int extractPixelLimits[2])