Class EarthStandardAtmosphereRefraction

  • All Implemented Interfaces:
    Serializable, AtmosphericRefractionModel

    public class EarthStandardAtmosphereRefraction
    extends Object
    implements AtmosphericRefractionModel
    Implementation of refraction model for Earth standard atmosphere.

    Refraction angle is 0 at zenith, about 1 arcminute at 45°, and 34 arcminutes at the horizon for optical wavelengths.

    Refraction angle is computed according to Saemundssen formula quoted by Meeus. For reference, see Astronomical Algorithms (1998), 2nd ed, (ISBN 0-943396-61-1), chap. 15.

    This formula is about 30 arcseconds of accuracy very close to the horizon, as variable atmospheric effects become very important.

    Local pressure and temperature can be set to correct refraction at the viewpoint.

    Since:
    6.1
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_CORRECTION_FACTOR

        public static final double DEFAULT_CORRECTION_FACTOR
        Default correction factor value.
        See Also:
        Constant Field Values
      • DEFAULT_PRESSURE

        public static final double DEFAULT_PRESSURE
        Default local pressure at viewpoint (Pa).
        See Also:
        Constant Field Values
      • DEFAULT_TEMPERATURE

        public static final double DEFAULT_TEMPERATURE
        Default local temperature at viewpoint (K).
        See Also:
        Constant Field Values
      • STANDARD_ATM_PRESSURE

        public static final double STANDARD_ATM_PRESSURE
        NIST standard atmospheric pressure (Pa).
        See Also:
        Constant Field Values
      • STANDARD_ATM_TEMPERATURE

        public static final double STANDARD_ATM_TEMPERATURE
        NIST standard atmospheric temperature (K).
        See Also:
        Constant Field Values
    • Constructor Detail

      • EarthStandardAtmosphereRefraction

        public EarthStandardAtmosphereRefraction()
        Creates a new default instance.
      • EarthStandardAtmosphereRefraction

        public EarthStandardAtmosphereRefraction​(double pressure,
                                                 double temperature)
        Creates an instance given a specific pressure and temperature.
        Parameters:
        pressure - in Pascals (Pa)
        temperature - in Kelvin (K)
    • Method Detail

      • getPressure

        public double getPressure()
        Get the local pressure at the evaluation location.
        Returns:
        the pressure (Pa)
      • setPressure

        public void setPressure​(double pressure)
        Set the local pressure at the evaluation location

        Otherwise the default value for the local pressure is set to DEFAULT_PRESSURE.

        Parameters:
        pressure - the pressure to set (Pa)
      • getTemperature

        public double getTemperature()
        Get the local temperature at the evaluation location.
        Returns:
        the temperature (K)
      • setTemperature

        public void setTemperature​(double temperature)
        Set the local temperature at the evaluation location

        Otherwise the default value for the local temperature is set to DEFAULT_TEMPERATURE.

        Parameters:
        temperature - the temperature to set (K)
      • getRefraction

        public double getRefraction​(double trueElevation)
        Description copied from interface: AtmosphericRefractionModel
        Compute the refraction angle from the true (geometrical) elevation.
        Specified by:
        getRefraction in interface AtmosphericRefractionModel
        Parameters:
        trueElevation - true elevation (rad)
        Returns:
        refraction angle (rad)