mirror of
https://github.com/nasa/trick.git
synced 2025-06-17 06:38:27 +00:00
Model Rocket Simulation. Ref #726
This commit is contained in:
30
trick_sims/SIM_rocket/scripts/Velocity.py
Executable file
30
trick_sims/SIM_rocket/scripts/Velocity.py
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
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['vely'], 'g-')
|
||||
plt.title('Climb Rate')
|
||||
plt.xlabel('time (s)')
|
||||
plt.ylabel('Climb Rate (m/s)')
|
||||
plt.grid(True)
|
||||
plt.show()
|
Reference in New Issue
Block a user