mirror of
https://gitlab.com/lander-team/air-prop-simulation.git
synced 2025-07-25 23:51:37 +00:00
Data now gets printed to readme.md
This commit is contained in:
21
thrust.jl
21
thrust.jl
@@ -5,6 +5,7 @@ using UnitfulRecipes
|
||||
using Roots
|
||||
using CSV
|
||||
using Measurements
|
||||
using Printf
|
||||
|
||||
|
||||
# Tank https://www.amazon.com/Empire-Paintball-BASICS-Pressure-Compressed/dp/B07B6M48SR/
|
||||
@@ -64,5 +65,25 @@ print(describe(df))
|
||||
|
||||
plot(df.Time[1:150:end], df.Thrust[1:150:end], title = "Thrust Over Time")
|
||||
|
||||
### Save data to readme.md
|
||||
|
||||
savefig("ThrustCurve.png")
|
||||
|
||||
b = IOBuffer();
|
||||
t = TextDisplay(b);
|
||||
display(t, "text/html", describe(df));
|
||||
table = String(take!(b)); # https://stackoverflow.com/a/60443621/8774114
|
||||
|
||||
|
||||
readme = Printf.@sprintf """
|
||||
# Air Prop Thrust
|
||||
Total Impulse: %s
|
||||
|
||||

|
||||
|
||||
More Data:
|
||||
|
||||
%s
|
||||
""" impulse table
|
||||
|
||||
write("readme.md", readme)
|
Reference in New Issue
Block a user