Stellarium  0.90.0
Public Types | Public Member Functions
Extinction Class Reference

This class performs extinction computations, following literature from atmospheric optics and astronomy. More...

#include <RefractionExtinction.hpp>

Public Types

enum  UndergroundExtinctionMode { UndergroundExtinctionZero = 0, UndergroundExtinctionMax = 1, UndergroundExtinctionMirror = 2 }
 Define the extinction strategy for rendering underground objects (useful when ground is not rendered) More...
 

Public Member Functions

void forward (const Vec3d &altAzPos, float *mag) const
 Compute extinction effect for arrays of size num position vectors and magnitudes. More...
 
void forward (const Vec3f &altAzPos, float *mag) const
 
void backward (const Vec3d &altAzPos, float *mag) const
 Compute inverse extinction effect for arrays of size num position vectors and magnitudes. More...
 
void backward (const Vec3f &altAzPos, float *mag) const
 
void setExtinctionCoefficient (float k)
 Set visual extinction coefficient (mag/airmass), influences extinction computation. More...
 
float getExtinctionCoefficient () const
 
void setUndergroundExtinctionMode (UndergroundExtinctionMode mode)
 
UndergroundExtinctionMode getUndergroundExtinctionMode () const
 

Detailed Description

Airmass computations are limited to meaningful altitudes. The solution provided here will [hopefully!] result in a visible "zone of avoidance" near the horizon down to altitude -2, and may show stars in their full brightness below -2 degrees. Typical horizons do not go down below -1, so all natural sites should be covered. Note that forward/backward are no absolute reverse operations! All the computations should be in effect (1) only if atmosphere effects are true (2) only for terrestrial locations, not on Moon/Mars/Saturn etc config.ini:astro/flag_extinction_below_horizon=true|false controls if extinction kills objects below -2 degrees altitude by setting airmass to 42.

Member Enumeration Documentation

Enumerator
UndergroundExtinctionZero 

Zero extinction: stars visible in full brightness.

UndergroundExtinctionMax 

Maximum extinction: coef 42, i.e practically invisible.

UndergroundExtinctionMirror 

Mirror the extinction for the same altutide above the ground.

Member Function Documentation

void Extinction::backward ( const Vec3d altAzPos,
float *  mag 
) const
inline
Parameters
altAzPosare the NORMALIZED (!!) (geometrical) star position vectors, and their z components sin(geometric_altitude). Note that forward/backward are no absolute reverse operations!
void Extinction::forward ( const Vec3d altAzPos,
float *  mag 
) const
inline
Parameters
altAzPosare the NORMALIZED (!!) (geometrical) star position vectors, and their z components sin(geometric_altitude). This call must therefore be done before application of Refraction if atmospheric effects are on. Note that forward/backward are no absolute reverse operations!
void Extinction::setExtinctionCoefficient ( float  k)
inline
Parameters
k=0.1 for highest mountains, 0.2 for very good lowland locations, 0.35 for typical lowland, 0.5 in humid climates.