Re-packaged
This commit is contained in:
19
julia/src/spacecraft.jl
Normal file
19
julia/src/spacecraft.jl
Normal file
@@ -0,0 +1,19 @@
|
||||
export Sc
|
||||
|
||||
struct Sc{T <: Real}
|
||||
mass::T
|
||||
mass_flow_rate::Float64
|
||||
max_thrust::Float64
|
||||
num_thrusters::Int
|
||||
duty_cycle::Float64
|
||||
end
|
||||
|
||||
function Sc(name::String)
|
||||
if name == "test"
|
||||
return Sc(10000., 0.01, 0.05, 2, 1.)
|
||||
elseif name == "no_thrust"
|
||||
return Sc(10000., 0.01, 0., 0, 0.)
|
||||
else
|
||||
throw(ErrorException("Bad sc name"))
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user