From f3e3192cb913261ff2d994abe37cda20e48a2bbc Mon Sep 17 00:00:00 2001 From: Stefan de Lange Date: Fri, 16 Jan 2026 19:55:53 +0100 Subject: [PATCH] Remove redundant function atmospheric_refraction_correction --- src/Positioning/spa.jl | 15 --------------- src/Refraction/spa.jl | 1 - 2 files changed, 16 deletions(-) diff --git a/src/Positioning/spa.jl b/src/Positioning/spa.jl index 5ac5987..e6f0e56 100644 --- a/src/Positioning/spa.jl +++ b/src/Positioning/spa.jl @@ -323,21 +323,6 @@ function topocentric_elevation_angle_without_atmosphere(sin_lat, cos_lat, δ′_ return e0 end -function atmospheric_refraction_correction(pressure, temp, e0, atmos_refract) - # only apply correction when sun is above horizon accounting for refraction - if e0 < -(0.26667 + atmos_refract) - return 0.0 - end - - # convert pressure from Pa to hPa/mbar - pressure_hPa = pressure / 100.0 - - Δe = - (pressure_hPa / 1010.0) * (283.0 / (273.0 + temp)) * 1.02 / - (60.0 * tand(e0 + 10.3 / (e0 + 5.11))) - return Δe # already in degrees -end - function topocentric_azimuth_angle(H′_rad, δ′_rad, sin_lat, cos_lat) (sin_H′, cos_H′) = sincos(H′_rad) tan_δ′ = tan(δ′_rad) diff --git a/src/Refraction/spa.jl b/src/Refraction/spa.jl index 07e5239..85f3816 100644 --- a/src/Refraction/spa.jl +++ b/src/Refraction/spa.jl @@ -62,7 +62,6 @@ apparent_elevation = elevation + refraction_correction atmos_refract::T = -0.5667 end -# Positional constructor for 2 arguments (3-argument constructor is already created by @kwdef) SPARefraction(pressure::T, temperature::T) where {T<:AbstractFloat} = SPARefraction{T}(pressure, temperature, T(-0.5667))