ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/atmos.h
Revision: 2.2
Committed: Fri Jul 19 23:38:28 2024 UTC (9 months, 1 week ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.1: +2 -1 lines
Log Message:
feat(genssky): Major changes and improvements by Taoning Wang

File Contents

# User Rev Content
1 greg 2.2 /* RCSid $Id$ */
2 greg 2.1 #ifndef ATMOS_H
3     #define ATMOS_H
4    
5     #include "color.h"
6     #include "data.h"
7     #include "fvect.h"
8     #include "paths.h"
9     #include "rtio.h"
10     #include "rtmath.h"
11     #include "sun.h"
12    
13     #define NSSAMP 20
14    
15     typedef struct {
16     double width;
17     double exp_term;
18     double exp_scale;
19     double linear_term;
20     double constant_term;
21     } DensityProfileLayer;
22    
23     typedef struct {
24     DensityProfileLayer layers[2];
25     } DensityProfile;
26    
27     typedef struct {
28     DensityProfile rayleigh_density;
29     DensityProfile ozone_density;
30     const float *beta_r0;
31     float beta_scale;
32     DATARRAY *beta_m;
33     const double grefl;
34     } Atmosphere;
35    
36     typedef struct {
37     char tau[PATH_MAX];
38     char scat[PATH_MAX];
39     char scat1m[PATH_MAX];
40     char irrad[PATH_MAX];
41     } DpPaths;
42    
43     extern const double ER;
44     extern const double AH;
45     extern const double HR_MS;
46     extern const double HR_MW;
47     extern const double HR_SS;
48     extern const double HR_SW;
49     extern const double HR_T;
50     extern const int WVLSPAN;
51     extern const float EXTSOL[NSSAMP];
52     extern const float BR0_MS[NSSAMP];
53     extern const float BR0_MW[NSSAMP];
54     extern const float BR0_SS[NSSAMP];
55     extern const float BR0_SW[NSSAMP];
56     extern const float BR0_T[NSSAMP];
57     extern const float BCLOUD;
58     extern const double AOD0_CA;
59     extern const double SOLOMG;
60    
61     extern void get_rmumusnu(FVECT vpt, FVECT vdir, FVECT sundir, double *r,
62     double *mu, double *mu_s, double *nu);
63    
64     extern void get_transmittance_to_sun(DATARRAY *tau_dp, const double r,
65     const double mu_s, double *result);
66    
67     extern void get_sky_transmittance(DATARRAY *tau, double r, double mu, float *result);
68    
69     extern void get_sky_radiance(DATARRAY *scat, DATARRAY *scat1m, const double radius,
70     const double mu, const double mu_s, const double nu, float *result);
71    
72     extern void get_solar_radiance(DATARRAY *tau, DATARRAY *scat, DATARRAY *scat1m, const FVECT sundir, const double radius, const double sun_ct, double *sun_radiance);
73    
74     extern void get_ground_radiance(DATARRAY *tau, DATARRAY *scat, DATARRAY *scat1m, DATARRAY *irrad,
75     const FVECT view_point, const FVECT view_direction, const double radius, const double mu, const double sun_ct, const double nu,
76     const double grefl, const FVECT sundir, float *result);
77    
78     extern void add_cloud_radiance(DATARRAY *scat, double nu, double pt[4],
79     float *result);
80    
81     extern int compute_sundir(const int year, const int month, const int day,
82     const double hour, const int tsolar,
83     double sundir[3]);
84    
85     extern int precompute(const int sorder, const DpPaths dppaths, const Atmosphere *atmos,
86     int num_threads);
87    
88 greg 2.2 #endif /* ATMOS_H */