NLP seems to be doing pretty well
This commit is contained in:
@@ -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)))""")
|
||||
|
||||
Reference in New Issue
Block a user