Astro.Earth (Astro v2.0.0)

Copy Markdown View Source

Earth constants, nutation, and elevation-related corrections for rise/set calculations.

This module provides physical and geometric constants for the Earth (equatorial radius, atmospheric refraction, apparent solar radius, mean obliquity) together with the IAU 1980 nutation series and elevation adjustments used by the rise/set algorithms in Astro.Solar.SunRiseSet and Astro.Lunar.MoonRiseSet.

Function groups

Physical constants

Optical constants

Nutation

  • nutation/1 — IAU 1980 nutation in longitude and obliquity (17-term)

Observer geometry

Summary

Functions

Adjusts the solar elevation to be the apparent angle at sunrise if the requested angle is :geometric (or 90°).

Returns the Earth's equatorial radius in kilometers.

Adjusts the solar elevation to account for the elevation of the requested location.

Returns the geometric distance to the horizon in meters.

Computes IAU 1980 nutation) in longitude and obliquity, and the mean obliquity.

Returns the mean obliquity of the ecliptic at epoch J2000.0.

Returns an estimate of the effect of refraction (in degrees) applied to the calculation of sunrise and sunset times.

Returns the Sun's apparent radius in degrees at sunrise/sunset.

Functions

adjusted_solar_elevation(solar_elevation, elevation)

Adjusts the solar elevation to be the apparent angle at sunrise if the requested angle is :geometric (or 90°).

Arguments

  • solar_elevation is the requested solar elevation in degrees. It will be 90° for sunrise and sunset.

  • elevation is elevation in meters

Returns

  • The solar elevation angle which, if solar elevation is exactly 90.0 degrees, is adjusted for refraction, elevation and solar radius.

earth_radius()

@spec earth_radius() :: Astro.kilometers()

Returns the Earth's equatorial radius in kilometers.

This value is the IAU current best estimate and the recommended value for astronomical calculations.

elevation_adjustment(elevation)

Adjusts the solar elevation to account for the elevation of the requested location.

Arguments

  • elevation is the observer's elevation in meters.

Returns

  • The solar elevation angle adjusted for the observer's elevation.

horizon_distance(observer_elevation_m \\ 0.0)

Returns the geometric distance to the horizon in meters.

Uses the exact formula √(h² + 2Rh) where h is the observer's elevation and R is the Earth's equatorial radius. Atmospheric refraction is not included.

Arguments

  • observer_elevation_m is the observer's elevation above sea level in meters. Defaults to 0.0.

Returns

  • The distance to the geometric horizon in meters.

nutation(c)

@spec nutation(c :: Astro.Time.julian_centuries()) :: {float(), float(), float()}

Computes IAU 1980 nutation) in longitude and obliquity, and the mean obliquity.

Arguments

Returns

  • {delta_psi_rad, delta_eps_rad, eps0_rad} representing the longitude, obliquity and mean obliquity.

obliquity_j2000()

@spec obliquity_j2000() :: Astro.angle()

Returns the mean obliquity of the ecliptic at epoch J2000.0.

Obliquity, or axial tilt, is the angle between the Earth's rotational axis and its orbital axis, which is the line perpendicular to its orbital plane.

The rotational axis of Earth, for example, is the imaginary line that passes through both the North Pole and South Pole, whereas the Earth's orbital axis is the line perpendicular to the imaginary plane through which the Earth moves as it revolves around the Sun. The Earth's obliquity or axial tilt is the angle between these two lines.

See Astronomical Algorithms Chapter 22.

Returns

  • The mean obliquity as a float angle in degrees at j2000.

refraction()

@spec refraction() :: Astro.degrees()

Returns an estimate of the effect of refraction (in degrees) applied to the calculation of sunrise and sunset times.

Sunrise actually occurs before the Sun truly reaches the horizon because earth's atmosphere refracts the sun's image. At the horizon, the average amount of refraction is 34 arcminutes, though this amount varies based on atmospheric conditions.

This effect is especially powerful for objects that appear close to the horizon, such as the rising or setting sun, because the light rays enter the earth's atmosphere at a particularly shallow angle. Because of refraction, the sun may be seen for several minutes before it actually rises in the morning and after it sets in the evening.

The refraction angle is calculated using the formula from Meeus (2nd edition, chapter 15):

R = 1 / tan(0° + 7.31 / (0° + 4.4))  34 arcminutes = 0.5667°

The Astronomical Almanac uses the same value.

solar_radius()

@spec solar_radius() :: Astro.degrees()

Returns the Sun's apparent radius in degrees at sunrise/sunset.

Unlike most other solar measurements, sunrise occurs when the Sun's upper limb, rather than its center, appears to cross the horizon. The apparent radius of the Sun at the horizon is 16 arc minutes.