Stellarium 0.15.2
|
This class makes use of the 1998 sky brightness model by Bradley Schaefer. More...
#include <Skybright.hpp>
Public Member Functions | |
Skybright () | |
Constructor. More... | |
void | setDate (const int year, const int month, const float moonPhase) |
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... | |
This class makes use of the 1998 sky brightness model by Bradley Schaefer.
Compute the luminance of the sky according to some parameters like sun moon position or time or altitude etc...
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.,
Definition at line 40 of file Skybright.hpp.
Skybright::Skybright | ( | ) |
Constructor.
float Skybright::getLuminance | ( | float | cosDistMoon, |
const float | cosDistSun, | ||
const float | cosDistZenith | ||
) | const |
Compute the luminance at the given position.
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 | ||
) |
Set the sky date to use for atmosphere computation.
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 |
void Skybright::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.
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 | ||
) |
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()
cosDistMoonZenith | cos(angular distance between moon and zenith) |
cosDistSunZenith | cos(angular distance between sun and zenith) |