-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlvis_release_structures.h
509 lines (471 loc) · 18.1 KB
/
lvis_release_structures.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
#ifndef __LVIS_RELEASE_STRUCTURE_H
#define __LVIS_RELEASE_STRUCTURE_H
// Begun: 2004/08/19
// David Lloyd Rabine
// NASA GSFC Code 694.0 Laser Remote Sensing Branch
// 301-614-6771
// http://lvis.gsfc.nasa.gov
//
// Revision History:
// 2005/10/28 - dlr
// added the lfid and shotnumber to all structures
// 2006/04/18 - dlr
// added the time field to all structures (seconds of the day)
// 2008/11/20 - dlr
// adding all structure versions to the code
// additionally, adding header defintion strings
// moved the LCE from 01 to 00 to match the detection routine return
// 2011/12/13 - dlr
// modifying this code to use stdint.h so sizes are consistent on any platform
#include <stdint.h>
#define LVIS_RELEASE_FILETYPE_LCE 0x00
#define LVIS_RELEASE_FILETYPE_LGE 0x01
#define LVIS_RELEASE_FILETYPE_LGW 0x02
#define LVIS_RELEASE_STRUCTURE_DATE 20111213
#define LVIS_RELEASE_STRUCTURE_VERSION 1.04
//
// Data Notes:
// All latitude, longitude and elevations are relative to
// the WGS-84 reference system
//
// Digitizer is a Signatec PDA500 recording at 8bits and 500MHz sampling rate
// disciplined by an rubidium oscillator
// LFID description IIMMMMMNNNN
// =====================================
// II = Instrument identifier (0->32)
// MMMMM = modified julian day
// NNNN = file number for that day
// pack the bytes (no padding allowed)
//
#pragma pack(1)
struct lvis_lce_v1_00 // LVIS Canopy Elevation v1.00
{
double tlon; // longitude of the highest detected return (degrees east)
double tlat; // latitude of the highest detected return (degrees north)
float zt; // elevation of the highest detected return (m) (i.e., rh100, see below)
};
#pragma pack(0)
typedef struct lce_v1_00 * ptr_lce_v1_00;
#pragma pack(1)
struct lvis_lce_v1_01 // LVIS Canopy Elevation v1.01
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
double tlon; // longitude of the highest detected return (degrees east)
double tlat; // latitude of the highest detected return (degrees north)
float zt; // elevation of the highest detected return (m) (i.e., rh100, see below)
};
#pragma pack(0)
typedef struct lce_v1_01 * ptr_lce_v1_01;
#pragma pack(1)
struct lvis_lce_v1_02 // LVIS Canopy Elevation v1.02
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double tlon; // longitude of the highest detected return (degrees east)
double tlat; // latitude of the highest detected return (degrees north)
float zt; // elevation of the highest detected return (m) (i.e., rh100, see below)
};
#pragma pack(0)
typedef struct lce_v1_02 * ptr_lce_v1_02;
#pragma pack(1)
struct lvis_lce_v1_03 // LVIS Canopy Elevation v1.03
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
float azimuth; // true heading from the aircraft to the ground (degrees)
float incidentangle; // off nadir angle (degrees)
float range; // range from the aircraft to the ground (meters)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double tlon; // longitude of the highest detected return (degrees east)
double tlat; // latitude of the highest detected return (degrees north)
float zt; // elevation of the highest detected return (m) (i.e., rh100, see below)
};
#pragma pack(0)
typedef struct lce_v1_03 * ptr_lce_v1_03;
#pragma pack(1)
struct lvis_lce_v1_04 // LVIS Canopy Elevation v1.04
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
float azimuth; // true heading from the aircraft to the ground (degrees)
float incidentangle; // off nadir angle (degrees)
float range; // range from the aircraft to the ground (meters)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double tlon; // longitude of the highest detected return (degrees east)
double tlat; // latitude of the highest detected return (degrees north)
float zt; // elevation of the highest detected return (m) (i.e., rh100, see below)
};
#pragma pack(0)
typedef struct lce_v1_04 * ptr_lce_v1_04;
#pragma pack(1)
struct lvis_lge_v1_00 // LVIS Ground Elevation v1.00
{
double glon; // longitude of the lowest detected mode within the waveform (degrees east)
double glat; // latitude of the lowest detected mode within the waveform (degrees north)
float zg; // mean elevation of the lowest detected mode within the waveform (m)
float rh25; // height (relative to zg) at which 25% of the waveform energy occurs (m)
float rh50; // height (relative to zg) at which 50% of the waveform energy occurs (m)
float rh75; // height (relative to zg) at which 75% of the waveform energy occurs (m)
float rh100; // height (relative to zg) at which 100% of the waveform energy occurs (m)
};
#pragma pack(0)
typedef struct lge_v1_00 * ptr_lge_v1_00;
#pragma pack(1)
struct lvis_lge_v1_01 // LVIS Ground Elevation v1.01
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
double glon; // longitude of the lowest detected mode within the waveform (degrees east)
double glat; // latitude of the lowest detected mode within the waveform (degrees north)
float zg; // mean elevation of the lowest detected mode within the waveform (m)
float rh25; // height (relative to zg) at which 25% of the waveform energy occurs (m)
float rh50; // height (relative to zg) at which 50% of the waveform energy occurs (m)
float rh75; // height (relative to zg) at which 75% of the waveform energy occurs (m)
float rh100; // height (relative to zg) at which 100% of the waveform energy occurs (m)
};
#pragma pack(0)
typedef struct lge_v1_01 * ptr_lge_v1_01;
#pragma pack(1)
struct lvis_lge_v1_02 // LVIS Ground Elevation v1.02
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double glon; // longitude of the lowest detected mode within the waveform (degrees east)
double glat; // latitude of the lowest detected mode within the waveform (degrees north)
float zg; // mean elevation of the lowest detected mode within the waveform (m)
float rh25; // height (relative to zg) at which 25% of the waveform energy occurs (m)
float rh50; // height (relative to zg) at which 50% of the waveform energy occurs (m)
float rh75; // height (relative to zg) at which 75% of the waveform energy occurs (m)
float rh100; // height (relative to zg) at which 100% of the waveform energy occurs (m)
};
#pragma pack(0)
typedef struct lge_v1_02 * ptr_lge_v1_02;
#pragma pack(1)
struct lvis_lge_v1_03 // LVIS Ground Elevation v1.03
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
float azimuth; // true heading from the aircraft to the ground (degrees)
float incidentangle; // off nadir angle (degrees)
float range; // range from the aircraft to the ground (meters)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double glon; // longitude of the lowest detected mode within the waveform (degrees east)
double glat; // latitude of the lowest detected mode within the waveform (degrees north)
float zg; // mean elevation of the lowest detected mode within the waveform (m)
float rh25; // height (relative to zg) at which 25% of the waveform energy occurs (m)
float rh50; // height (relative to zg) at which 50% of the waveform energy occurs (m)
float rh75; // height (relative to zg) at which 75% of the waveform energy occurs (m)
float rh100; // height (relative to zg) at which 100% of the waveform energy occurs (m)
};
#pragma pack(0)
typedef struct lge_v1_03 * ptr_lge_v1_03;
#pragma pack(1)
struct lvis_lge_v1_04 // LVIS Ground Elevation v1.04
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
float azimuth; // true heading from the aircraft to the ground (degrees)
float incidentangle; // off nadir angle (degrees)
float range; // range from the aircraft to the ground (meters)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double glon; // longitude of the lowest detected mode within the waveform (degrees east)
double glat; // latitude of the lowest detected mode within the waveform (degrees north)
float zg; // mean elevation of the lowest detected mode within the waveform (m)
float rh25; // height (relative to zg) at which 25% of the waveform energy occurs (m)
float rh50; // height (relative to zg) at which 50% of the waveform energy occurs (m)
float rh75; // height (relative to zg) at which 75% of the waveform energy occurs (m)
float rh100; // height (relative to zg) at which 100% of the waveform energy occurs (m)
};
#pragma pack(0)
typedef struct lge_v1_04 * ptr_lge_v1_04;
#pragma pack(1)
struct lvis_lgw_v1_00 // LVIS Geolocated Waveforms v1.00
{
double lon0; // longitude of the highest sample of the waveform (degrees east)
double lat0; // latitude of the highest sample of the waveform (degrees north)
float z0; // elevation of the highest sample of the waveform (m)
double lon431; // longitude of the lowest sample of the waveform (degrees east)
double lat431; // latitude of the lowest sample of the waveform (degrees north)
float z431; // elevation of the lowest sample of the waveform (m)
float sigmean; // signal mean noise level, calculated in-flight (counts)
unsigned char wave[432]; // return waveform, recorded in-flight (counts)
};
#pragma pack(0)
typedef struct lgw_v1_00 * ptr_lgw_v1_00;
#pragma pack(1)
struct lvis_lgw_v1_01 // LVIS Geolocated Waveforms v1.01
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
double lon0; // longitude of the highest sample of the waveform (degrees east)
double lat0; // latitude of the highest sample of the waveform (degrees north)
float z0; // elevation of the highest sample of the waveform (m)
double lon431; // longitude of the lowest sample of the waveform (degrees east)
double lat431; // latitude of the lowest sample of the waveform (degrees north)
float z431; // elevation of the lowest sample of the waveform (m)
float sigmean; // signal mean noise level, calculated in-flight (counts)
unsigned char wave[432]; // return waveform, recorded in-flight (counts)
};
#pragma pack(0)
typedef struct lgw_v1_01 * ptr_lgw_v1_01;
#pragma pack(1)
struct lvis_lgw_v1_02 // LVIS Geolocated Waveforms v1.02
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double lon0; // longitude of the highest sample of the waveform (degrees east)
double lat0; // latitude of the highest sample of the waveform (degrees north)
float z0; // elevation of the highest sample of the waveform (m)
double lon431; // longitude of the lowest sample of the waveform (degrees east)
double lat431; // latitude of the lowest sample of the waveform (degrees north)
float z431; // elevation of the lowest sample of the waveform (m)
float sigmean; // signal mean noise level, calculated in-flight (counts)
unsigned char wave[432]; // return waveform, recorded in-flight (counts)
};
#pragma pack(0)
typedef struct lgw_v1_02 * ptr_lgw_v1_02;
#pragma pack(1)
struct lvis_lgw_v1_03 // LVIS Geolocated Waveforms v1.03
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
float azimuth; // true heading from the aircraft to the ground (degrees)
float incidentangle; // off nadir angle (degrees)
float range; // range from the aircraft to the ground (meters)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double lon0; // longitude of the highest sample of the waveform (degrees east)
double lat0; // latitude of the highest sample of the waveform (degrees north)
float z0; // elevation of the highest sample of the waveform (m)
double lon431; // longitude of the lowest sample of the waveform (degrees east)
double lat431; // latitude of the lowest sample of the waveform (degrees north)
float z431; // elevation of the lowest sample of the waveform (m)
float sigmean; // signal mean noise level, calculated in-flight (counts)
unsigned char txwave[80]; // transmit waveform, recorded in-flight (counts)
unsigned char rxwave[432]; // return waveform, recorded in-flight (counts)
};
#pragma pack(0)
typedef struct lgw_v1_03 * ptr_lgw_v1_03;
#pragma pack(1)
struct lvis_lgw_v1_04 // LVIS Geolocated Waveforms v1.04
{
uint32_t lfid; // unique LVIS file identifier
uint32_t shotnumber; // unique LVIS shotnumber (in a file the shotnumber is always unique)
float azimuth; // true heading from the aircraft to the ground (degrees)
float incidentangle; // off nadir angle (degrees)
float range; // range from the aircraft to the ground (meters)
double lvistime; // LVIS recorded UTC time (seconds of the day) when the shot was acquired
double lon0; // longitude of the highest sample of the waveform (degrees east)
double lat0; // latitude of the highest sample of the waveform (degrees north)
float z0; // elevation of the highest sample of the waveform (m)
double lon527; // longitude of the lowest sample of the waveform (degrees east)
double lat527; // latitude of the lowest sample of the waveform (degrees north)
float z527; // elevation of the lowest sample of the waveform (m)
float sigmean; // signal mean noise level, calculated in-flight (counts)
uint16_t txwave[120]; // transmit waveform, recorded in-flight (counts)
uint16_t rxwave[528]; // return waveform, recorded in-flight (counts)
};
#pragma pack(0)
typedef struct lgw_v1_04 * ptr_lgw_v1_04;
#define LVIS_LCE_V1_00_ELEMENTS 3
static char * lvis_lce_v1_00_header[3] =
{
"tlon",
"tlat",
"zt"
};
#define LVIS_LCE_V1_01_ELEMENTS 5
static char * lvis_lce_v1_01_header[5] =
{
"lfid",
"shotnumber",
"tlon",
"tlat",
"zt"
};
#define LVIS_LCE_V1_02_ELEMENTS 6
static char * lvis_lce_v1_02_header[6] =
{
"lfid",
"shotnumber",
"lvistime",
"tlon",
"tlat",
"zt"
};
#define LVIS_LCE_V1_03_ELEMENTS 9
static char * lvis_lce_v1_03_header[9] =
{
"lfid",
"shotnumber",
"azimuth",
"incidentangle",
"range",
"lvistime",
"tlon",
"tlat",
"zt"
};
#define LVIS_LCE_V1_04_ELEMENTS 9
static char * lvis_lce_v1_04_header[9] =
{
"lfid",
"shotnumber",
"azimuth",
"incidentangle",
"range",
"lvistime",
"tlon",
"tlat",
"zt"
};
#define LVIS_LGE_V1_00_ELEMENTS 7
static char * lvis_lge_v1_00_header[7] =
{
"glon",
"glat",
"zg",
"rh25",
"rh50",
"rh75",
"rh100"
};
#define LVIS_LGE_V1_01_ELEMENTS 9
static char * lvis_lge_v1_01_header[9] =
{
"lfid",
"shotnumber",
"glon",
"glat",
"zg",
"rh25",
"rh50",
"rh75",
"rh100"
};
#define LVIS_LGE_V1_02_ELEMENTS 10
static char * lvis_lge_v1_02_header[10] =
{
"lfid",
"shotnumber",
"lvistime",
"glon",
"glat",
"zg",
"rh25",
"rh50",
"rh75",
"rh100"
};
#define LVIS_LGE_V1_03_ELEMENTS 13
static char * lvis_lge_v1_03_header[13] =
{
"lfid",
"shotnumber",
"azimuth",
"incidentangle",
"range",
"lvistime",
"glon",
"glat",
"zg",
"rh25",
"rh50",
"rh75",
"rh100"
};
#define LVIS_LGE_V1_04_ELEMENTS 13
static char * lvis_lge_v1_04_header[13] =
{
"lfid",
"shotnumber",
"azimuth",
"incidentangle",
"range",
"lvistime",
"glon",
"glat",
"zg",
"rh25",
"rh50",
"rh75",
"rh100"
};
#define LVIS_LGW_V1_00_ELEMENTS 7
static char * lvis_lgw_v1_00_header[7] =
{
"lon0",
"lat0",
"z0",
"lon431",
"lat431",
"z431",
"sigmean"
};
#define LVIS_LGW_V1_01_ELEMENTS 9
static char * lvis_lgw_v1_01_header[9] =
{
"lfid",
"shotnumber",
"lon0",
"lat0",
"z0",
"lon431",
"lat431",
"z431",
"sigmean"
};
#define LVIS_LGW_V1_02_ELEMENTS 10
static char * lvis_lgw_v1_02_header[10] =
{
"lfid",
"shotnumber",
"lvistime",
"lon0",
"lat0",
"z0",
"lon431",
"lat431",
"z431",
"sigmean"
};
#define LVIS_LGW_V1_03_ELEMENTS 13
static char * lvis_lgw_v1_03_header[13] =
{
"lfid",
"shotnumber",
"azimuth",
"incidentangle",
"range",
"lvistime",
"lon0",
"lat0",
"z0",
"lon431",
"lat431",
"z431",
"sigmean"
};
#define LVIS_LGW_V1_04_ELEMENTS 13
static char * lvis_lgw_v1_04_header[13] =
{
"lfid",
"shotnumber",
"azimuth",
"incidentangle",
"range",
"lvistime",
"lon0",
"lat0",
"z0",
"lon527",
"lat527",
"z527",
"sigmean"
};
static char * lvis_index_header_string = "index";
#endif