Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data = [[0, 0, 0, 0.4], [31.7, 9, 26, 2], [67, 28, 81, 1.7], [68, 29, 83, 1.7],
- [70.5, 30, 86, 1.7], [117.6, 56, 140, 1.3], [147, 72, 163, 1.1],
- [157, 77, 169, 1.1], [164, 81, 173, 1.1], [180, 89, 179, 1.0],
- [204.4, 134, 186, 3.6], [235, 227, 188, 3.6], [238, 236, 188, 3.6], [263.6, 355, 186, 8.1]]
- # https://space.stackexchange.com/questions/24754/why-jaxas-tilted-launch-from-a-tilted-rooftop
- # https://www.youtube.com/watch?v=jBUFNgLrykc
- import numpy as np
- import matplotlib.pyplot as plt
- secs, downrange, altitude, velocity = np.array(data).T
- plt.figure()
- plt.subplot(2, 1, 1)
- plt.plot(downrange, altitude)
- plt.plot(downrange, altitude, 'ok')
- plt.title('altitude versus downrange distances (km)', fontsize=16)
- plt.subplot(4, 1, 3)
- plt.plot(secs, downrange)
- plt.plot(secs, downrange, 'ok')
- plt.plot(secs, altitude)
- plt.plot(secs, altitude, 'ok')
- plt.title('altitude & downrange distances (km) versus time (sec)', fontsize=16)
- plt.subplot(4, 1, 4)
- plt.plot(secs, velocity, 'ok')
- plt.title('velocity (km/s) versus time (sec)', fontsize=16)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement