-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccis_plot_err.py
More file actions
84 lines (72 loc) · 2.37 KB
/
accis_plot_err.py
File metadata and controls
84 lines (72 loc) · 2.37 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import numpy as np
import matplotlib.pyplot as plt
sat_ids = np.genfromtxt("results/sat_ids.csv", delimiter=",", dtype=int)
# Wong color scheme
colors = ['#0072b2', '#e69f00', '#56b4e9', '#009e73']
styles = ['solid', 'dotted', 'dashed', 'dashdot']
ylabels = [
'Position Error (m)',
'Velocity Error (m/s)',
'Angular Velocity Error (deg/s)',
'Attitude Error (deg)',
'Camera Attitude Error (deg)',
'Focal Length Error (mm)',
'Distortion Parameter c1 Error',
'Distortion Parameter c2 Error',
'Distortion Parameter c3 Error'
]
fig, axs = plt.subplots(3, 3)
for i in range(3) :
for j in range(3) :
for l in range(sat_ids.size):
sat_id = sat_ids[l]
k = 3*i + j
t = np.genfromtxt(
"results/sat_" + str(sat_id) + "_time_s.csv",
delimiter=","
)
t = t / 60
err = np.genfromtxt(
"results/sat_" + str(sat_id) + "_state_error.csv",
delimiter=","
)
e = err[..., k]
lbl = 'Satellite ' + str(sat_id)
axs[i][j].plot(t, e, label = lbl, \
color = colors[l], linestyle = styles[l])
axs[i][j].set_xlabel('Time (min)')
axs[i][j].set_ylabel(ylabels[k])
axs[i][j].set_yscale('log')
axs[i][j].legend()
fig.set_size_inches(15, 12)
fig.tight_layout()
plt.savefig("plots/est_err.pdf")
#-------------------------------------------------------------------------------
ylabels = [
'Pointing Error (deg)',
'Angular Velocity Error (deg/s)'
]
fig, axs = plt.subplots(1, 2)
for j in range(2):
for l in range(sat_ids.size):
sat_id = sat_ids[l]
k = 9 + j
t = np.genfromtxt(
"results/sat_" + str(sat_id) + "_time_s.csv",
delimiter=","
)
t = t / 60
err = np.genfromtxt(
"results/sat_" + str(sat_id) + "_state_error.csv",
delimiter=","
)
e = err[..., k]
lbl = 'Satellite ' + str(sat_id)
axs[j].plot(t, e, label = lbl, color = colors[l], linestyle = styles[l])
axs[j].set_xlabel('Time (min)')
axs[j].set_ylabel(ylabels[j])
axs[j].set_yscale('log')
axs[j].legend()
fig.set_size_inches(10, 5)
fig.tight_layout()
plt.savefig("plots/att_err.pdf")