Go to the documentation of this file.
36 static float taua_est(
float x) {
37 return (-0.8 - 0.4 * log(
x));
41 float glint_coef,
float airmass,
42 float mu0,
float F0[],
float taur[],
float taua[],
float La[],
float TLg[]) {
45 static float taua_min = 0.08;
46 static float taua_ave = 0.1;
47 static float rhoa_min = 0.01;
48 static float rhoa_min2 = 0.008;
49 static int32_t iter_max = 2;
50 static float rfac = 0.8;
66 else if (glint_coef <= glint_min)
67 for (ib = 0; ib <
nband; ib++)
72 refl_test =
pi /
mu0 * (La[nir_l] /
F0[nir_l] - glint_coef * exp(-(taur[nir_l] + taua_ave) * airmass));
74 if (refl_test <= rhoa_min)
75 taua_ave2 = taua_est(10. *
MAX(refl_test, 0.0001));
79 for (ib =
nband - 1; ib >= 0; ib--) {
83 else if (taua[nir_l] <= taua_min)
84 taua_c = taua_est(taua[nir_l]);
90 refl_test =
pi /
mu0 * (La[ib] /
F0[ib] - glint_coef * exp(-(taur[ib] + taua_c) * airmass));
92 if (refl_test <= rhoa_min2)
93 TLg[ib] =
F0[ib] * glint_coef * exp(-(taur[ib] + 1.5 * taua_c) * airmass);
95 TLg[ib] =
F0[ib] * glint_coef * exp(-(taur[ib] + taua_c) * airmass);
100 if (La[nir_l] > 0.0 && La[nir_s] > 0.0) {
101 fac =
MAX(TLg[nir_l] / La[nir_l], TLg[nir_s] / La[nir_s]);
103 for (ib = 0; ib <
nband; ib++) {
104 TLg[ib] = rfac * TLg[ib] /
fac;
void glint_rad(int32_t iter, int32_t nband, int32_t nir_s, int32_t nir_l, float glint_coef, float airmass, float mu0, float F0[], float taur[], float taua[], float La[], float TLg[])