def test_step(self):
# Step
a_B_history = self.dataset.a_B
w_B_history = self.dataset.w_B
for i in range(30):
(a_B, w_B) = self.dataset.step()
a_B_history = np.hstack((a_B_history, a_B))
w_B_history = np.hstack((w_B_history, w_B))
# Plot
debug = False
# debug = True
if debug:
plt.subplot(211)
plt.plot(self.dataset.time_true, a_B_history[0, :], label="ax")
plt.plot(self.dataset.time_true, a_B_history[1, :], label="ay")
plt.plot(self.dataset.time_true, a_B_history[2, :], label="az")
plt.legend(loc=0)
plt.subplot(212)
plt.plot(self.dataset.time_true, w_B_history[0, :], label="wx")
plt.plot(self.dataset.time_true, w_B_history[1, :], label="wy")
plt.plot(self.dataset.time_true, w_B_history[2, :], label="wz")
plt.legend(loc=0)
plt.show()
评论列表
文章目录