mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 15:26:41 +00:00
496de8c7a9
* Disambiguate python use #1250 Changed all calls to /usr/bin/python to /usr/bin/env python3. Removed execute permissions on a lot of files that are not executable. closes #1250
31 lines
940 B
Python
Executable File
31 lines
940 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
|
|
#
|
|
data = np.genfromtxt('../RUN_test/log_Rocket.csv',
|
|
delimiter=',',
|
|
skip_header=1,
|
|
skip_footer=1,
|
|
names=['t',
|
|
'vux', 'vuy',
|
|
'Fthrustx', 'Fthrusty',
|
|
'Fdragx', 'Fdragy',
|
|
'Fgravx','Fgravy',
|
|
'Ftotalx','Ftotaly',
|
|
'Mt',
|
|
'MassTotal', 'MassRate',
|
|
'Posx','Posy',
|
|
'velx','vely',
|
|
'Cd', 'MassEmpty' ],
|
|
dtype=(float, float)
|
|
)
|
|
|
|
plt.plot(data['t'], data['MassTotal'], 'r-')
|
|
plt.title('Rocket Mass')
|
|
plt.xlabel('time (s)')
|
|
plt.ylabel('Mass (kg)')
|
|
plt.grid(True)
|
|
plt.show()
|