1
0
mirror of https://gitlab.com/lander-team/plots.git synced 2025-06-15 22:46:40 +00:00

updated for SVR

This commit is contained in:
Anson Biggs 2021-12-08 23:32:20 -07:00
parent 4242644cd2
commit 3a85f80097
4 changed files with 351 additions and 17 deletions

View File

@ -1,18 +1,19 @@
using Plots using Plots
theme(:juno) theme(:dark)
begin begin
plot(cosd.(0:30), label = "Vertical Thrust", legend = :topright) plot(cosd.(0:30), label = "Vertical Thrust", legend = :topright, line = 3)
plot!(sind.(0:30), label = "Horizontal Thrust") plot!(sind.(0:30), label = "Horizontal Thrust", line = 3)
vline!([10], label = "Pitch", line = (3, :dash)) vline!([7], label = "Max TVC Deflection", line = (3, :dash))
vline!([15], label = "Roll", line = (3, :dash)) # vline!([15], label = "Roll", line = (3, :dash))
ylabel!("Percent of Thrust") ylabel!("Percent of Thrust")
xlabel!("Thruster Deflection") xlabel!("Thruster Deflection")
xticks!(0:5:45, string.(0:5:45) .* "°") xvals = [0:5:45; 7]
yticks!(0:0.25:1, string.(0:25:100) .* "%") xticks!(xvals, string.(xvals) .* "°")
yticks!(0:0.10:1, string.(0:10:100) .* "%")
title!("Thrust at TVC Deflections") title!("Thrust at TVC Deflections")
end end
savefig("TVCDef.png") savefig("TVCDef.svg")

192
TVCDef.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 110 KiB

View File

@ -3,7 +3,7 @@ using Unitful
using UnitfulRecipes using UnitfulRecipes
using NumericalIntegration using NumericalIntegration
theme(:juno) theme(:dark)
function impulse_calc(max_deflection = 15u"°") function impulse_calc(max_deflection = 15u"°")
if max_deflection == 0 if max_deflection == 0
@ -46,18 +46,18 @@ function impulse_calc(max_deflection = 15u"°")
return horizontal_impulse return horizontal_impulse
end end
deflections = (0.1:0.1:20)u"°" deflections = (0.1:0.1:15)u"°"
impulse = impulse_calc.(deflections) impulse = impulse_calc.(deflections)
let let
plot(deflections, impulse, label = "Horizontal Impulse", legend = :topleft, line = 3) plot(deflections, impulse, label = "Declected Impulse", legend = :topleft, line = 3)
yticks!(0:2:15, string.(0:2:15) .* "%") yticks!(0:2:12, string.(0:2:12) .* "%")
ylabel!("Percent of Impulse") ylabel!("Percent of Vertical Impulse Lost")
xticks!(0:2:20, string.(0:2:20) .* "°") xticks!([0:5:20; 7], string.([0:5:20; 7]) .* "°")
xlabel!("Maximum TVC Deflection") xlabel!("Maximum TVC Deflection")
title!("Horizontal Impulse as a function \nof maximum TVC deflection") title!("Vertical Impulse Deflected\nGiven Max TVC Deflection")
vline!([8], label = "Current Design", line = (3, :dash, :mediumpurple)) vline!([7], label = "Current Design", line = (3, :dash, :mediumpurple))
end end
# savefig("ThrustDef.png") savefig("ThrustDef.svg")

141
ThrustDef.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 98 KiB