SuperNOVAS v1.2
The NOVAS C library, made better
Loading...
Searching...
No Matches
refract.c File Reference

Functions

double novas_inv_refract (RefractionModel model, double jd_tt, const on_surface *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)
 
double novas_standard_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el)
 

Detailed Description

Date
Created on Jun 27, 2024
Author
Attila Kovacs

A collection of refraction models and utilities to use with novas_app_to_hor() or novas_hor_to_app().

See also
novas_app_to_hor()
novas_hor_to_app().

Function Documentation

◆ novas_inv_refract()

double novas_inv_refract ( RefractionModel  model,
double  jd_tt,
const on_surface 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.

Parameters
modelThe original refraction model
jd_tt[day] Terrestrial Time (TT) based Julian data of observation
locPointer to structure defining the observer's location on earth, and local weather
typeRefraction type to use for the original model: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0).
el0[deg] input elevation for the inverse refraction model.
Returns
[deg] Estimated refraction, or NAN if there was an error (it should also set errno to indicate the type of error).
See also
refract_astro()
itrs_to_hor()
Since
1.1
Author
Attila Kovacs

References novas_inv_max_iter, and NOVAS_REFRACT_OBSERVED.

◆ novas_optical_refraction()

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.

Parameters
jd_tt[day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel)
locPointer to structure defining the observer's location on earth, and local weather
typeWhether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0).
el[deg] Astrometric (unrefracted) source elevation
Returns
[arcsec] Estimated refraction, or NAN if there was an error (it should also set errno to indicate the type of error).
See also
novas_app_to_hor()
novas_optical_refraction()
NOVAS_STANDARD_ATMOSPHERE()
refract()
refract_astro()

References NOVAS_WEATHER_AT_LOCATION.

◆ novas_radio_refraction()

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:

  1. Berman, Allan L., and Rockwell, Stephen T. (1976), NASA JPL Technical Report 32-1601
Parameters
jd_tt[day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel)
locPointer 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.
typeWhether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0).
el[deg] source elevation of the specified type.
Returns
[deg] Estimated refraction, or NAN if there was an error (it should also set errno to indicate the type of error).
See also
novas_optical_refraction()
make_on_surface()
on_surface

References on_surface::humidity, novas_inv_refract(), novas_radio_refraction(), NOVAS_REFRACT_ASTROMETRIC, NOVAS_REFRACT_OBSERVED, on_surface::pressure, and on_surface::temperature.

◆ novas_standard_refraction()

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.

Parameters
jd_tt[day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel)
locPointer to structure defining the observer's location on earth, and local weather
typeWhether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0).
el[deg] Astrometric (unrefracted) source elevation
Returns
[deg] Estimated refraction, or NAN if there was an error (it should also set errno to indicate the type of error).
See also
novas_app_to_hor()
novas_optical_refraction()
NOVAS_STANDARD_ATMOSPHERE()
refract()
refract_astro()

References NOVAS_STANDARD_ATMOSPHERE.