Stellarium 0.12.3
Skybright.hpp
1  /*
2  * Copyright (C) 2003 Fabien Chereau
3  *
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.
8  *
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.
13  *
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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17  */
18 
19 #ifndef _SKYBRIGHT_HPP_
20 #define _SKYBRIGHT_HPP_
21 
25 class Skybright
26 {
27 public:
29  Skybright();
30 
35  void setDate(int year, int month, float moonPhase);
36 
42  void setLocation(float latitude, float altitude, float temperature=15.f, float relativeHumidity=40.f);
43 
48  void setSunMoon(float cosDistMoonZenith, float cosDistSunZenith);
49 
54  float getLuminance(float cosDistMoon, float cosDistSun, float cosDistZenith) const;
55 
56 private:
57  float airMassMoon; // Air mass for the Moon
58  float airMassSun; // Air mass for the Sun
59  float magMoon; // Moon magnitude
60  float RA; // Something related with date
61  float K; // Useful coef...
62  float C3; // Term for moon brightness computation
63  float C4; // Term for sky brightness computation
64  float SN; // Snellen Ratio (20/20=1.0, good 20/10=2.0)
65 
66  // Optimisation variables
67  float bNightTerm;
68  float bMoonTerm1;
69  float bTwilightTerm;
70 };
71 
72 #endif // _SKYBRIGHT_HPP_