Skip to content

Commit

Permalink
Update Apophis script
Browse files Browse the repository at this point in the history
  • Loading branch information
PerezHz committed Jul 25, 2023
1 parent 1e7fa12 commit a9465d3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pha/apophis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ function main(dynamics::D, maxsteps::Int, jd0_datetime::DateTime, nyears_bwd::T,

print_header("Integrator warmup", 2)
_ = NEOs.propagate(dynamics, 1, jd0, nyears_fwd, q0, Val(true);
order = order, abstol = abstol, parse_eqs = parse_eqs)
order, abstol, parse_eqs)
_ = NEOs.propagate_root(dynamics, 1, jd0, nyears_fwd, q0, Val(true);
order, abstol, parse_eqs)
println()

print_header("Main integration", 2)
Expand All @@ -136,16 +138,16 @@ function main(dynamics::D, maxsteps::Int, jd0_datetime::DateTime, nyears_bwd::T,
sol_bwd = NEOs.propagate(dynamics, maxsteps, jd0, nyears_bwd, q0, Val(true);
order, abstol, parse_eqs)
jldsave("Apophis_bwd.jld2"; sol_bwd)
# sol_bwd = JLD2.load("Apophis_bwd.jld2", "asteph")
# sol_bwd = JLD2.load("Apophis_bwd.jld2", "sol_bwd")

tmax = nyears_fwd*yr
println("• Initial time of integration: ", string(jd0_datetime))
println("• Final time of integration: ", julian2datetime(jd0 + tmax))

sol_fwd = NEOs.propagate(dynamics, maxsteps, jd0, nyears_fwd, q0, Val(true);
sol_fwd, tvS, xvS, gvS = NEOs.propagate_root(dynamics, maxsteps, jd0, nyears_fwd, q0, Val(true);
order, abstol, parse_eqs)
jldsave("Apophis_fwd.jld2"; sol_fwd)
# sol_fwd = JLD2.load("Apophis_fwd.jld2", "asteph")
jldsave("Apophis_fwd.jld2"; sol_fwd, tvS, xvS, gvS)
# sol_fwd = JLD2.load("Apophis_fwd.jld2", "sol_bwd")
println()

# load Solar System ephemeris
Expand Down

0 comments on commit a9465d3

Please sign in to comment.