Skip to content

Commit

Permalink
change function to work with txt file, not json
Browse files Browse the repository at this point in the history
  • Loading branch information
SuragNuthulapaty committed Sep 13, 2023
1 parent b99ba4f commit c66ca79
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 24,621 deletions.
8 changes: 6 additions & 2 deletions src/GenerateParameterJSON.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,9 @@ def get_other_values(csv_file_name):
get_other_values(str(p)+"/ork_files/rocket_csv.csv")
get_length( str(p)+"/ork_files/rocket.ork")

with open("src/Rocket/values.json", "w", encoding="utf8") as outfile:
json.dump(out_dict, outfile)
output_string = ""
for k,v in out_dict.items():
output_string += str(k) + " " + str(v) + "\n"

with open('src/Rocket/values.txt', 'w') as f:
f.writelines(output_string)
1 change: 0 additions & 1 deletion src/Rocket/values.json

This file was deleted.

6 changes: 6 additions & 0 deletions src/Rocket/values.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dry_center_of_gravity 3.34985
wet_center_of_gravity 3.5865199999999997
diameter 0.157
wet_mass 39.33
dry_mass 27.06
length 5.105
Loading

0 comments on commit c66ca79

Please sign in to comment.