Skip to content

Commit

Permalink
Use faster Julian date calculations for offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
helgee committed Aug 27, 2018
1 parent b9ac603 commit d6e476f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/offsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ the quantity TDB-TT can differ by as much as about 4 microseconds.
"""
function tai_offset(::BarycentricDynamicalTime, ep)
dt = get(days(ep - J2000_EPOCH))
dt = j2000(TT, ep)
g = 357.53 + 0.9856003dt
tai_offset(TT, ep) + 0.001658sind(g) + 0.000014sind(2g)
end

function tai_offset(::BarycentricDynamicalTime, ep, ut, elong, u, v)
t = get(centuries(ep - J2000_EPOCH)) / 10.0
t = get(centuries(j2000(TT, ep) * days)) / 10.0
# Convert UT to local solar time in radians.
tsol = mod(ut, 1.0) * 2π + elong

Expand Down

0 comments on commit d6e476f

Please sign in to comment.