Stellarium 0.15.2
List of all members | Public Member Functions
Skybright Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Skybright::Skybright ( )

Constructor.

Member Function Documentation

float Skybright::getLuminance ( float  cosDistMoon,
const float  cosDistSun,
const float  cosDistZenith 
) const

Compute the luminance at the given position.

Parameters
cosDistMooncos(angular distance between moon and the position)
cosDistSuncos(angular distance between sun and the position)
cosDistZenithcos(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.

Parameters
yearthe year in YYYY format
monththe month: 1=Jan, 12=Dec
moonPhasethe 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.

Parameters
latitudeobserver latitude in radian
altitudeobserver altitude in m
temperaturetemperature in deg. C
relativeHumidityair 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()

Parameters
cosDistMoonZenithcos(angular distance between moon and zenith)
cosDistSunZenithcos(angular distance between sun and zenith)

The documentation for this class was generated from the following file: