Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
src
l2gen
airmass.c
Go to the documentation of this file.
1
#include "
l12_proto.h
"
2
3
/* airmass for a spherical atmosphere, Kasten & Young, 1989 */
4
float
ky_airmass
(
float
theta) {
5
float
mu
=
MAX
(cos(theta /
RADEG
), 0.01);
6
return
(1. / (
mu
+ pow(0.50572 * (96.07995 - theta), (-1.6364))));
7
}
8
9
float
ky_airmass_
(
float
*theta) {
10
return
(
ky_airmass
(*theta));
11
}
12
13
/* airmass for a plane parallel atmosphere */
14
float
pp_airmass
(
float
theta) {
15
float
mu
=
MAX
(cos(theta /
RADEG
), 0.01);
16
return
(1. /
mu
);
17
}
18
19
float
pp_airmass_
(
float
*theta) {
20
return
(
pp_airmass
(*theta));
21
}
MAX
#define MAX(A, B)
Definition:
swl0_utils.h:26
pp_airmass
float pp_airmass(float theta)
Definition:
airmass.c:14
mu
float mu
Definition:
atrem_corl1v2.h:324
l12_proto.h
pp_airmass_
float pp_airmass_(float *theta)
Definition:
airmass.c:19
ky_airmass_
float ky_airmass_(float *theta)
Definition:
airmass.c:9
ky_airmass
float ky_airmass(float theta)
Definition:
airmass.c:4
RADEG
#define RADEG
Definition:
czcs_ctl_pt.c:5