NLP seems to be doing pretty well

This commit is contained in:
Connor
2021-10-10 20:53:14 -06:00
parent f83d73449f
commit b29afbce04
13 changed files with 524 additions and 198 deletions

View File

@@ -15,7 +15,10 @@ struct V∞_Error <: Exception
v∞_in::AbstractVector
v∞_out::AbstractVector
end
Base.showerror(io::IO, e::V∞_Error) = print(io, "v∞s weren't the same: ", e.v∞_in, " and ", e.v∞_out)
Base.showerror(io::IO, e::V∞_Error) = print(io, """v∞s weren't the same:
v1 = $(e.v∞_in) and
v2 = $(e.v∞_out)
difference: $(norm(e.v∞_in) - norm(e.v∞_out))""")
struct PropOne_Error <: Exception
ΔV_unit::AbstractVector
@@ -31,3 +34,13 @@ struct Mission_Creation_Error{T} <: Exception where T <: Real
num_entries::T
end
Base.showerror(io::IO, e::Mission_Creation_Error) = print(io, "Tried to create a mission with $(e.num_entries) entries")
struct Planet_Match_Error{T} <: Exception where T <: Real
state::Vector{T}
planet::Vector{T}
end
Base.showerror(io::IO, e::Planet_Match_Error) = print(io, """"
Spacecraft didn't make it to planet
spacecraft_pos = $(e.state)
planet_pos = $(e.planet)
difference = $(abs(norm(e.state - e.planet)))""")