forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlandsat.h
70 lines (52 loc) · 2.06 KB
/
landsat.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
#ifndef _LANDSAT_H
#define _LANDSAT_H
#define UNCORRECTED 0
#define CORRECTED 1
#define DOS 10
#define DOS1 12
#define DOS2 14
#define DOS2b 15
#define DOS3 16
#define DOS4 18
#define NOMETADATAFILE 0
#define METADATAFILE 1
/**********************************************************
* Landsat Structures
*
* Lmax and Lmin in W / (m^2 * sr * micron) -> Radiance
* Esun in W / (m^2 * micron) -> Irradiance
*********************************************************/
#define MAX_BANDS 11
typedef struct {
int number; /* Band number */
int code; /* Band code */
double wavemax, wavemin; /* Wavelength in micron */
double esun; /* Mean solar irradiance */
double lmax, lmin; /* Spectral radiance */
double qcalmax, qcalmin; /* Quantized calibrated pixel */
char thermal; /* Flag to thermal band */
double gain, bias; /* Gain and Bias of sensor */
double K1, K2; /* Thermal calibration
* or Rad2Ref constants */
} band_data;
typedef struct {
int flag; /* Line-data or file-data */
unsigned char number; /* Landsat number */
char creation[11]; /* Image production date */
char date[11]; /* Image acquisition date */
double time; /* Image acquisition time */
double dist_es; /* Distance Earth-Sun */
double sun_elev; /* Sun elevation */
double sun_az; /* Sun azimuth */
char sensor[10]; /* Sensor: MSS, TM, ETM+, OLI/TIRS */
int bands; /* Total number of bands */
band_data band[MAX_BANDS]; /* Data for each band */
} lsat_data;
/*****************************************************************************
* Landsat Equations Prototypes
*****************************************************************************/
double lsat_qcal2rad(double, band_data *);
double lsat_rad2ref(double, band_data *);
double lsat_rad2temp(double, band_data *);
void lsat_bandctes(lsat_data *, int, char, double, int, double);
#endif