36 lines
1008 B
Julia
36 lines
1008 B
Julia
@testset "Plotting" begin
|
|
|
|
println("Testing plotting features")
|
|
|
|
using PlotlyJS
|
|
|
|
# Plot an earth plot
|
|
T = rand(2hour : 1 : 4hour)
|
|
revs = 30
|
|
n = revs*100
|
|
|
|
start = gen_orbit(T, 12_000., Earth)
|
|
thrust = spiral(0.9, n, start, test_sc, revs*T, Earth)
|
|
path = prop(thrust, start, test_sc, revs*T, Earth)[1]
|
|
|
|
p = plot_orbits([path], Earth)
|
|
savefig(p,"../plots/plot_test_earth.html")
|
|
@test typeof(p) == PlotlyJS.SyncPlot
|
|
|
|
# Now change a little bit and plot around the Sun
|
|
# This also checks that the spacecraft are configured right:
|
|
# They really shouldn't run out of fuel in 4 years
|
|
T = rand(year : hour : 4year)
|
|
tof = 4year
|
|
start = gen_orbit(T, 12_000.)
|
|
thrust = spiral(0.9, n, start, bepi, tof)
|
|
sun_paths = Vector{Vector{Vector{Float64}}}()
|
|
push!(sun_paths, prop(zeros(100,3), start, bepi, tof)[1])
|
|
push!(sun_paths, prop(thrust, start, bepi, tof)[1])
|
|
p = plot_orbits(sun_paths)
|
|
savefig(p,"../plots/plot_test_sun.html")
|
|
@test typeof(p) == PlotlyJS.SyncPlot
|
|
|
|
|
|
end
|