2
* Copyright (C) 2003 Fabien Chereau
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
// month : 1=Jan, 12=Dec
28
// moon_phase in radian 0=Full Moon, PI/2=First Quadrant/Last Quadran, PI=No Moon
29
void set_date(int year, int month, float moon_phase);
31
// Set the position parameters
32
// Latitude in radian, altitude in m, temperature in deg. C, humidity in %
33
void set_loc(float latitude, float altitude, float temperature = 15.f,
34
float relative_humidity = 40.f);
36
// Set the moon and sun zenith angular distance (cosin given) and precompute what can be
37
// This funtion has to be called once before any call to get_luminance()
38
// Input : cos_dist_moon_zenith = cos(angular distance between moon and zenith)
39
// cos_dist_sun_zenith = cos(angular distance between sun and zenith)
40
void set_sun_moon(float cos_dist_moon_zenith, float cos_dist_sun_zenith);
42
// Compute the luminance at the given position
43
// Inputs : cos_dist_moon = cos(angular distance between moon and the position)
44
// cos_dist_sun = cos(angular distance between sun and the position)
45
// cos_dist_zenith = cos(angular distance between zenith and the position)
46
float get_luminance(float cos_dist_moon, float cos_dist_sun, float cos_dist_zenith);
49
float air_mass_moon; // Air mass for the Moon
50
float air_mass_sun; // Air mass for the Sun
52
double b_total; // Total brightness
53
float b_night; // Dark night brightness
54
float b_twilight; // Twilight brightness
55
float b_daylight; // Daylight sky brightness
56
float b_moon; // Moon brightness
57
float mag_moon; // Moon magnitude
59
float RA; // Something related with date
61
float K; // Useful coef...
63
float C3; // Term for moon brightness computation
64
float C4; // Term for sky brightness computation
66
float SN; // Snellen Ratio (20/20=1.0, good 20/10=2.0)
68
// Optimisation variables
71
float b_twilight_term;
75
#endif // _SKYBRIGHT_H_