import numpy as np import matplotlib.pyplot as plt r_maa=6371. a=np.loadtxt("maandumine.dat") print ("landing time=",a[-1,0]/60,"min") print ("landing vel=",a[-1,6],"m/s",a[-1,6]*3.6,"km/h") indx=np.argwhere(a[:,5]>20) imax=np.argmax(a[indx,7]) print ("h=",a[imax,5],"km, amax=",a[imax,7],"m/s2") fig1,[p1,p2,p3]=plt.subplots(1,3,figsize=(15,5)) fig2,p4=plt.subplots(1,1,figsize=(5,5)) p1.plot(a[:,0],a[:,5]) p2.plot(a[:,5],a[:,6]) p3.plot(a[:,5],a[:,7]) p4.axis("equal") p4.plot(a[:,1],a[:,2],color='red') alp=np.arange(0,6.28,0.01) p4.plot(np.sin(alp)*r_maa,np.cos(alp)*r_maa,color='green') p2.legend("h(t)") p2.legend("v(t)") p3.legend(["a(t)","real"]) p1.set_xlabel("t,sek") p1.set_ylabel("h,km") p2.set_xlabel("h,km") p2.set_ylabel("v,m/s") p3.set_xlabel("h,km") p3.set_ylabel("a,m/s2") p1.grid() p2.grid() p3.grid() plt.show() fig1.savefig("tulemus_exp.png")