Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/Positioning/spa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/Refraction/spa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
Loading