1
0
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:
2021-03-22 06:18:49 -07:00
parent b9237f9a43
commit 5bbb7933e1
3 changed files with 29 additions and 0 deletions

View File

@@ -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
![Thrust Over Time](ThrustCurve.png)
More Data:
%s
""" impulse table
write("readme.md", readme)