-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquadplot.py
53 lines (44 loc) · 985 Bytes
/
quadplot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import quadvar as qv
import numpy as np
import matplotlib.pyplot as plt
# plot XYZ Positon
plt.figure(1)
plt.subplot(1,3,1)
plt.plot(qv.t_plot,qv.x_plot)
plt.title('X Position')
plt.xlabel('Time (s)')
plt.ylabel('Distance (m)')
plt.grid()
plt.subplot(1,3,2)
plt.plot(qv.t_plot,qv.y_plot)
plt.title('Y Position')
plt.xlabel('Time (s)')
plt.ylabel('Distance (m)')
plt.grid()
plt.subplot(1,3,3)
plt.plot(qv.t_plot,qv.z_plot)
plt.title('Z Position')
plt.xlabel('Time (s)')
plt.ylabel('Distance (m)')
plt.grid()
# plot Phi Theta Psi Angular Positon
plt.figure(2)
plt.subplot(1,3,1)
plt.plot(qv.t_plot,qv.phi_plot)
plt.title('Roll Angle')
plt.xlabel('Time (s)')
plt.ylabel('Angle (rad)')
plt.grid()
plt.subplot(1,3,2)
plt.plot(qv.t_plot,qv.theta_plot)
plt.title('Pitch Angle')
plt.xlabel('Time (s)')
plt.ylabel('Angle (rad)')
plt.grid()
plt.subplot(1,3,3)
plt.plot(qv.t_plot,qv.psi_plot)
plt.title('Yaw Angle')
plt.xlabel('Time (s)')
plt.ylabel('Angle (rad)')
plt.grid()
plt.show()