Due to the lapse in federal government funding, NASA is not updating this website. We sincerely regret this inconvenience.
NASA Logo
Ocean Color Science Software

ocssw V2022
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 }
#define MAX(A, B)
Definition: swl0_utils.h:25
float pp_airmass(float theta)
Definition: airmass.c:14
float mu
float pp_airmass_(float *theta)
Definition: airmass.c:19
float ky_airmass_(float *theta)
Definition: airmass.c:9
float ky_airmass(float theta)
Definition: airmass.c:4
#define RADEG
Definition: czcs_ctl_pt.c:5