OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1agen_hawkeye.h
Go to the documentation of this file.
1 
2 
3 using namespace std;
4 
5 class l1aFile {
6 
7  int ngrps;
8 
9  int ndims;
10  int dimid[1000];
11 
12  uint32_t SC_records_val;
13 
14  public:
15  l1aFile();
16  ~l1aFile();
17 
18  int ncid;
19  int gid[10];
20 
21  int createl1( char* l1_filename, uint32_t nSC,
22  uint32_t imgWidth, uint32_t imgHeight,
23  uint32_t fndWidth, uint32_t fndHeight);
24 
25  int parseDims( string dimString, int *numDims, int *varDims);
26 
27  int close();
28 };
29 
31  ncid = -1;
32  SC_records_val = 0;
33 }
34 
35 
37 
38 }
39 
40 typedef struct {
41  int16_t iyr;
42  int16_t iday;
43  double sec;
44  uint8_t bus_telemetry[27];
45 } sensor_t;
46 
47 typedef struct {
48  int16_t iyr;
49  int16_t iday;
50  double sec;
51  float gyro[3];
52  float mag1[3];
53  float mag2[3];
54  float rwheels[3];
55  float sunb[3];
56 } psensor_t;
57 
58 typedef struct {
59  int16_t iyr;
60  int16_t iday;
61  double sec;
62  float quat[4];
63 } attitude_t;
64 
65 typedef struct {
66  int16_t iyr;
67  int16_t iday;
68  double sec;
69  float pos[3];
70  float vel[3];
71 } propagator_t;
72 
73 
74 int createNCDF( int ncid, const char *sname, const char *lname,
75  const char *standard_name, const char *units,
76  void *fill_value,
77  const char *flag_values, const char *flag_meanings,
78  double low, double high, int nt,
79  int rank, int *dimids);
80 
81 int unpack_seahawk_adcs( uint8_t *apkt, double startHWKTime, double stopHWKTime,
82  sensor_t *sensor, psensor_t *psensor,
83  attitude_t *attitude, propagator_t *propagator);
84 
85 #define MAXNPACKETS 3000
86 
87 #define MAXIMGHEIGHT 6000
88 
89 
90 #define SWAP_2(x) ( (((x) & 0xff) << 8) | ((unsigned short)(x) >> 8) )
91 
93 
94 /*
95 inline
96 int expandEnvVar( string *sValue) {
97  if ( (*sValue).find_first_of( "$" ) == string::npos) return 0;
98  string::size_type posEndIdx = (*sValue).find_first_of( "/" );
99  if ( posEndIdx == string::npos) return 0;
100  char *envVar_str = getenv((*sValue).substr( 1, posEndIdx-1 ).c_str());
101  if (envVar_str == 0x0) {
102  printf("Environment variable: %s not defined.\n", envVar_str);
103  exit(1);
104  }
105  *sValue = envVar_str + (*sValue).substr( posEndIdx);
106 
107  return 0;
108 }
109 */
a context in which it is NOT documented to do so subscript which cannot be easily calculated when extracting TONS attitude data from the Terra L0 files Corrected several defects in extraction of entrained ephemeris and attitude
Definition: HISTORY.txt:61
int16_t iyr
float32 * pos
Definition: l1_czcs_hdf.c:35
int unpack_seahawk_adcs(uint8_t *apkt, double startHWKTime, double stopHWKTime, sensor_t *sensor, psensor_t *psensor, attitude_t *attitude, propagator_t *propagator)
@ PSENSOR
double sec
int parseDims(int ncid, int ndims, string dimString, int *numDims, int *dimid, int *varDims)
double sec
@ PROPAGATOR
int createNCDF(int ncid, const char *sname, const char *lname, const char *standard_name, const char *units, void *fill_value, const char *flag_values, const char *flag_meanings, double low, double high, int nt, int rank, int *dimids)
Definition: l1aFile.cpp:2137
@ ATTITUDE
Extra metadata that will be written to the HDF4 file l2prod rank
int16_t iyr
int16_t iday
int16_t iday
These two strings are used for the product XML output If product_id is not set then prefix is used If the last char of the name_prefix is _ then it is removed If algorithm_id is not set then name_suffix is used If the first char is _ then it is removed l2prod standard_name[0]
int16_t iday
@ SENSOR
int16_t iyr