Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
#include <RefractionExtinction.hpp>
Public Member Functions | |
void | forward (Vec3d *altAzPos, float *mag, int size) |
void | backward (Vec3d *altAzPos, float *mag, int size) |
void | setPressure (float p_mbar) |
void | setTemperature (float t_C) |
void | setExtinctionCoefficient (float k) |
float | airmass (float cosZ, bool apparent_z=true) |
Airmass computations are limited to meaningful altitudes, and refraction solutions can only be aproximate, given the turbulent, unpredictable real atmosphere. The solution provided here will [hopefully!] result in a visible "zone of avoidance" near the horizon down to altitude -2, and will show stars in their full brightness at their geometrical positions below -2 degrees. Of course, plotting stars below the horizon could be coupled to setting of horizon foreground, it's another usability issue. Typical horizons do not go down below -1, so -2 should leave a fair amount of room. 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 celestial objects, never for landscape coordinates (3) only for terrestrial locations, not on Moon/Mars/Saturn etc
void RefractionExtinction::forward | ( | Vec3d * | altAzPos, | |
float * | mag, | |||
int | size | |||
) |
Compute refraction and extinction effects for arrays of size.
size | position vectors and magnitudes. | |
altAzPos | are the normalized (true) star position vectors, and their z components sin(true_altitude). Note that forward/backward are no absolute reverse operations! |
void RefractionExtinction::backward | ( | Vec3d * | altAzPos, | |
float * | mag, | |||
int | size | |||
) |
Compute refraction and extinction effects for arrays of size.
size | position vectors and magnitudes. | |
altAzPos | are the normalized (apparent) star position vectors, and their z components sin(apparent_altitude). Note that forward/backward are no absolute reverse operations! |
void RefractionExtinction::setPressure | ( | float | p_mbar | ) |
Set surface air pressure (mbars), influences refraction computation.
void RefractionExtinction::setTemperature | ( | float | t_C | ) |
Set surface air temperature (degrees Celsius), influences refraction computation.
void RefractionExtinction::setExtinctionCoefficient | ( | float | k | ) |
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. |
float RefractionExtinction::airmass | ( | float | cosZ, | |
bool | apparent_z = true | |||
) |
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 ist 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 has NO EFFECT BELOW -2 DEGREES! |