OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
TiepointDSR.cpp
Go to the documentation of this file.
1 /*
2  * EnvsatTiepoint.cpp
3  *
4  * Created on: Jan 4, 2013
5  * Author: dshea
6  */
7 
8 #include "TiepointDSR.h"
9 
10 #include "EnvsatUtil.h"
11 #include <stdlib.h>
12 #include <stdio.h>
13 
14 #include <timeutils.h>
15 
17 EnvsatDSR(size) {
18 
19  // 12 bytes for time
20  // 1 byte for attachment flag
21  // 50 bytes need for each pixel
22  numPixels = (size - 13) / (50);
23  if (numPixels * 50 + 13 != size) {
24  printf("Error %s:%s:%d size does not divide evenly into pixels\n",
25  __FILE__, __func__, __LINE__);
26  exit(1);
27  }
28 }
29 
31 
32 }
33 
36  printf("\nTiepointDSR-----\n");
37  printf("numPixels = %d\n", numPixels);
38  printf("startTime = %s\n", unix2merisTime(getStartTime()).c_str());
39 }
40 
42  return getMJD(getBuffer(), 0);
43 }
44 
46  int offset = 13 + 4 * pixel;
47  return getRawInt32(getBuffer(), offset) * 1e-6;
48 }
49 
51  int offset = 13 + 4 * numPixels + 4 * pixel;
52  return getRawInt32(getBuffer(), offset) * 1e-6;
53 }
virtual ~TiepointDSR()
Definition: TiepointDSR.cpp:30
virtual char * getBuffer()
Definition: EnvsatDSR.h:24
int getRawInt32(const char *buffer, unsigned int offset)
Definition: EnvsatUtil.cpp:101
double getMJD(const char *buffer, unsigned int offset)
Definition: EnvsatUtil.cpp:114
virtual double getLon(int pixel)
Definition: TiepointDSR.cpp:50
virtual void print()
Definition: TiepointDSR.cpp:34
virtual double getLat(int pixel)
Definition: TiepointDSR.cpp:45
virtual double getStartTime()
Definition: TiepointDSR.cpp:41
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution pixel
Definition: HISTORY.txt:192
const string & unix2merisTime(double unixTime)
Definition: EnvsatUtil.cpp:160
l2prod offset
TiepointDSR(int size)
Definition: TiepointDSR.cpp:16
virtual void print()
Definition: EnvsatDSR.cpp:40