![]() |
Stellarium
1.2
|
This class makes use of the 1998 sky brightness model by Bradley Schaefer. More...
#include <Skybright.hpp>
Public Member Functions | |
Skybright () | |
Constructor. | |
void | setDate (const int year, const int month, const float moonPhase, const float moonMag) |
Set the sky date to use for atmosphere computation. More... | |
void | setLocation (const float latitude, const float altitude, const float temperature=15.f, const float relativeHumidity=40.f) |
Set the position parameters to use for atmosphere computation. More... | |
void | setSunMoon (const float cosDistMoonZenith, const float cosDistSunZenith) |
Set the moon and sun zenith angular distance (cosin given) and precompute what can be This function has to be called once before any call to getLuminance() More... | |
float | getLuminance (float cosDistMoon, const float cosDistSun, const float cosDistZenith) const |
Compute the luminance at the given position. More... | |
Further reading:
TASKS TO IMPROVE: Some components of the Schaefer model as given in BASIC sourcecode in the 1998 S&T article are strongly simplified. E.g.,
Compute the luminance of the sky according to some parameters like sun moon position or time or altitude etc...
float Skybright::getLuminance | ( | float | cosDistMoon, |
const float | cosDistSun, | ||
const float | cosDistZenith | ||
) | const |
cosDistMoon | cos(angular distance between moon and the position) |
cosDistSun | cos(angular distance between sun and the position) |
cosDistZenith | cos(angular distance between zenith and the position) |
void Skybright::setDate | ( | const int | year, |
const int | month, | ||
const float | moonPhase, | ||
const float | moonMag | ||
) |
year | the year in YYYY format |
month | the month: 1=Jan, 12=Dec |
moonPhase | the moon phase in radian 0=Full Moon, PI/2=First Quadrant/Last Quadran, PI=No Moon |
moonMag | visual magnitude of the moon. Could be computed from geometry, but in case of eclipses we should deliver it here. |
void Skybright::setLocation | ( | const float | latitude, |
const float | altitude, | ||
const float | temperature = 15.f , |
||
const float | relativeHumidity = 40.f |
||
) |
latitude | observer latitude in radian |
altitude | observer altitude in m |
temperature | temperature in deg. C |
relativeHumidity | air humidity in % |
void Skybright::setSunMoon | ( | const float | cosDistMoonZenith, |
const float | cosDistSunZenith | ||
) |
cosDistMoonZenith | cos(angular distance between moon and zenith) |
cosDistSunZenith | cos(angular distance between sun and zenith) |