Small improvements

This commit is contained in:
Connor
2021-10-10 21:53:58 -06:00
parent 44759ff85f
commit 504d83b390
6 changed files with 55 additions and 40 deletions

View File

@@ -23,7 +23,7 @@ function laguerre_conway(state::Vector{<:Real}, time::Float64, primary::Body=Sun
sign = dF >= 0 ? 1 : -1
ΔE_new = ΔE - n*F / ( dF + sign * (abs((n-1)^2*dF^2 - n*(n-1)*F*d2F )))
i += 1
if i > 100 throw(LaGuerreConway_Error("LaGuerre-Conway did not converge!")) end
if i > 100 throw(LaGuerreConway_Error()) end
end
F = 1 - a/r0_mag * (1-cos(ΔE))
G = a * σ0/ (μ) * (1-cos(ΔE)) + r0_mag * (a) / (μ) * sin(ΔE)
@@ -42,7 +42,7 @@ function laguerre_conway(state::Vector{<:Real}, time::Float64, primary::Body=Sun
sign = dF >= 0 ? 1 : -1
ΔH_new = ΔH - n*F / ( dF + sign * (abs((n-1)^2*dF^2 - n*(n-1)*F*d2F )))
i += 1
if i > 100 throw(LaGuerreConway_Error("LaGuerre-Conway did not converge!")) end
if i > 100 throw(LaGuerreConway_Error()) end
end
F = 1 - a/r0_mag * (1-cos(ΔH))
G = a * σ0/ (μ) * (1-cos(ΔH)) + r0_mag * (-a) / (μ) * sin(ΔH)