Stellarium  0.17.0
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 ()
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...

Detailed Description

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

Member Function Documentation

float Skybright::getLuminance ( float  cosDistMoon,
const float  cosDistSun,
const float  cosDistZenith 
) const
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,
const float  moonMag 
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
moonMagvisual 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 
latitudeobserver latitude in radian
altitudeobserver altitude in m
temperaturetemperature in deg. C
relativeHumidityair humidity in %
void Skybright::setSunMoon ( const float  cosDistMoonZenith,
const float  cosDistSunZenith 
cosDistMoonZenithcos(angular distance between moon and zenith)
cosDistSunZenithcos(angular distance between sun and zenith)