Stellarium
23.4
|
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 given position vector and magnitude. More... | |
void | forward (const Vec3f &altAzPos, float *mag) const |
void | backward (const Vec3d &altAzPos, float *mag) const |
Compute inverse extinction effect for given position vector and magnitude. 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 |
float | airmass (float cosZ, const bool apparent_z=true) const |
airmass computation for More... | |
QByteArray | getForwardTransformShader () const |
void | setForwardTransformUniforms (QOpenGLShaderProgram &program) const |
This class performs extinction computations, following literature from atmospheric optics and astronomy.
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.
Define the extinction strategy for rendering underground objects (useful when ground is not rendered)
float Extinction::airmass | ( | float | cosZ, |
const bool | apparent_z = true |
||
) | const |
airmass computation for
cosZ | = cosine of zenith angle z (=sin(altitude)!). The default ( |
apparent_z | = true) is computing airmass from observed altitude, following Rozenberg (1966) [X(90)~40]. if ( |
apparent_z | = false), we have geometrical altitude and compute airmass from that, following Young: Air mass and refraction. Applied Optics 33(6), pp.1108-1110, 1994. [X(90)~32]. A problem is that refraction depends on air pressure and temperature, but Young's formula assumes T=15C, p=1013.25mbar. So, it seems better to compute refraction first, and then use the Rozenberg formula here. Rozenberg is infinite at Z=92.17 deg, Young at Z=93.6 deg, so this function RETURNS SUBHORIZONTAL_AIRMASS BELOW -2 DEGREES! |
|
inline |
Compute inverse extinction effect for given position vector and magnitude.
altAzPos | is the NORMALIZED (!!) (geometrical) star position vector, and its z component is therefore sin(geometric_altitude). This call must therefore be done after application of Refraction effects if atmospheric effects are on. Note that forward/backward are no absolute reverse operations! |
|
inline |
Compute extinction effect for given position vector and magnitude.
altAzPos | is the NORMALIZED (!!) (geometrical) star position vectors, and its z component is therefore 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! |
|
inline |
Set visual extinction coefficient (mag/airmass), influences extinction computation.
k= | 0.1 for highest mountains, 0.2 for very good lowland locations, 0.35 for typical lowland, 0.5 in humid climates. |