![]() |
SuperNOVAS v1.3
The NOVAS C library, made better
|
Macros | |
#define | NOVAS_DEFAULT_WAVELENGTH 0.55 |
[μm] Median wavelength of visible light. | |
Functions | |
double | novas_inv_refract (RefractionModel model, double jd_tt, const on_surface *restrict loc, enum novas_refraction_type type, double el0) |
double | novas_optical_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
double | novas_radio_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
int | novas_refract_wavelength (double microns) |
double | novas_standard_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
double | novas_wave_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
double | refract (const on_surface *restrict location, enum novas_refraction_model model, double zd_obs) |
double | refract_astro (const on_surface *restrict location, enum novas_refraction_model model, double zd_astro) |
A collection of refraction models and utilities to use with novas_app_to_hor() or novas_hor_to_app().
double novas_inv_refract | ( | RefractionModel | model, |
double | jd_tt, | ||
const on_surface *restrict | loc, | ||
enum novas_refraction_type | type, | ||
double | el0 | ||
) |
Computes the reverse atmospheric refraction for a given refraction model. Thus if a refraction model takes observed elevation as an input, the reverse refraction takes astrometric elevation as its input, and vice versa.
model | The original refraction model |
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Refraction type to use for the original model: NOVAS_REFRACT_OBSERVED (-1) or NOVAS_REFRACT_ASTROMETRIC (0). |
el0 | [deg] input elevation for the inverse refraction model. |
References novas_inv_max_iter, and NOVAS_REFRACT_OBSERVED.
double novas_optical_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
Returns an optical refraction correction using the weather parameters defined for the observer location.
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Whether the input elevation is observed or astrometric: NOVAS_REFRACT_OBSERVED (-1) or NOVAS_REFRACT_ASTROMETRIC (0). |
el | [deg] Astrometric (unrefracted) source elevation |
References NOVAS_WEATHER_AT_LOCATION.
double novas_radio_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
Atmospheric refraction model for radio wavelengths (Berman & Rockwell 1976). It uses the weather parameters defined for the location, including humidity. As such, make sure the weather data is fully defined, and that the humidity was explicitly set after calling make_on_surface()
.
Adapted from FORTAN code provided by Berman & Rockwell 1976.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather. Make sure all weather values, including humidity (added in v1.1), are fully populated. |
type | Whether the input elevation is observed or astrometric: NOVAS_REFRACT_OBSERVED (-1) or NOVAS_REFRACT_ASTROMETRIC (0). |
el | [deg] source elevation of the specified type. |
References on_surface::humidity, novas_inv_refract(), novas_radio_refraction(), NOVAS_REFRACT_ASTROMETRIC, NOVAS_REFRACT_OBSERVED, on_surface::pressure, and on_surface::temperature.
int novas_refract_wavelength | ( | double | microns | ) |
Sets the observing wavelength for which refraction is to be calculated when using a wavelength-depenendent model, such as novas_wave_refraction().
microns | [μm] Observed wavelength to assume in refraction calculations |
EINVAL
) if the wavelength invalid (zero, negative, or NaN).double novas_standard_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
Returns an optical refraction correction for a standard atmosphere.
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Whether the input elevation is observed or astrometric: NOVAS_REFRACT_OBSERVED (-1) or NOVAS_REFRACT_ASTROMETRIC (0). |
el | [deg] Astrometric (unrefracted) source elevation |
References NOVAS_STANDARD_ATMOSPHERE.
double novas_wave_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
The wavelength-dependent IAU atmospheric refraction model, based on the SOFA iauRefco()
function, in compliance to the 'SOFA Software License' terms of the original source. Our implementation is not provided nor it is endorsed by SOFA. The original function has been modified slightly, such as:
errno
set to EINVAL
), unlike the SOFA implementation, which sets minimal or maximal allowed values for these. The refraction is calculated for the observing wavelenth previously set via novas_refract_wavelength()
, or for visible light at 550 nm by default.
The function uses the weather parameters defined for the location, including humidity. As such, make sure the weather data is fully defined, and that the humidity was explicitly set after calling make_on_surface()
.
According to the documentation of SOFA's iauRefco()
function, the model has the following accuracy for elevation angles between 15 and 75 degrees, under a range of typical surface conditions:
worst | RMS | |
---|---|---|
optical/IR | 62 mas | 8 mas |
radio | 319 mas | 49 mas |
NOTES:
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather. Make sure all weather values, including humidity (added in v1.1), are fully populated. |
type | Whether the input elevation is observed or astrometric: NOVAS_REFRACT_OBSERVED (-1) or NOVAS_REFRACT_ASTROMETRIC (0). |
el | [deg] observed source elevation of the specified type. |
References on_surface::humidity, novas_inv_refract(), NOVAS_REFRACT_ASTROMETRIC, NOVAS_REFRACT_OBSERVED, novas_wave_refraction(), on_surface::pressure, and on_surface::temperature.
double refract | ( | const on_surface *restrict | location, |
enum novas_refraction_model | model, | ||
double | zd_obs | ||
) |
Computes atmospheric optical refraction for an observed (already refracted!) zenith distance through the atmosphere. In other words this is suitable to convert refracted zenith angles to astrometric (unrefracted) zenith angles. For the reverse, see refract_astro().
The returned value is the approximate refraction for optical wavelengths. This function can be used for planning observations or telescope pointing, but should not be used for precise positioning.
NOTES:
REFERENCES:
location | Pointer to structure containing observer's location. It may also contains weather data (optional) for the observer's location. Some, but not all, refraction models will use location-based (e.g. weather) information. For models that do not need it, it may be NULL. |
model | The built in refraction model to use. E.g. NOVAS_STANDARD_ATMOSPHERE (1), or NOVAS_WEATHER_AT_LOCATION (2)... |
zd_obs | [deg] Observed (already refracted!) zenith distance through the atmosphere. |
References NOVAS_NO_ATMOSPHERE, NOVAS_RADIO_REFRACTION, novas_radio_refraction(), NOVAS_REFRACT_OBSERVED, NOVAS_REFRACTION_MODELS, NOVAS_WAVE_REFRACTION, novas_wave_refraction(), and NOVAS_WEATHER_AT_LOCATION.
double refract_astro | ( | const on_surface *restrict | location, |
enum novas_refraction_model | model, | ||
double | zd_astro | ||
) |
Computes atmospheric optical refraction for a source at an astrometric zenith distance (e.g. calculated without accounting for an atmosphere). This is suitable for converting astrometric (unrefracted) zenith angles to observed (refracted) zenith angles. See refract() for the reverse correction.
The returned value is the approximate refraction for optical wavelengths. This function can be used for planning observations or telescope pointing, but should not be used for precise positioning.
REFERENCES:
location | Pointer to structure containing observer's location. It may also contains weather data (optional) for the observer's location. Some, but not all, refraction models will use location-based (e.g. weather) information. For models that do not need it, it may be NULL. |
model | The built in refraction model to use. E.g. NOVAS_STANDARD_ATMOSPHERE (1), or NOVAS_WEATHER_AT_LOCATION (2)... |
zd_astro | [deg] Astrometric (unrefracted) zenith distance angle of the source. |
References novas_inv_max_iter, NOVAS_RADIO_REFRACTION, novas_radio_refraction(), NOVAS_REFRACT_ASTROMETRIC, and refract().