2 import matplotlib.pyplot
as plt
7 (
'qhat', (np.float64,4)),
8 (
'err', (np.float64,3)),
9 (
'eulerErr', (np.float64,3)),
10 (
'bias', (np.float32,3))
14 data = np.fromfile(
"../test/build/"+filename, dtype=stateType)
16 plt.figure(figsize=[12,9])
17 plt.suptitle(filename)
19 plt.subplot(4, 3, 3*i+1)
20 plt.plot(data[
't'], data[
'q'][:,i], label=
"q")
21 plt.plot(data[
't'], data[
'qhat'][:,i], label=
"qhat")
26 plt.subplot(4,3,3*i+2)
27 plt.plot(data[
't'], data[
'err'][:,i])
29 err_norm = np.sqrt(np.sum(np.square(data[
'err']),axis=1))
30 plt.plot(data[
't'], err_norm)
33 plt.subplot(4,3,3*i+3)
34 plt.plot(data[
't'], data[
'bias'][:,i])
37 print(
"{} max error: {}".format(filename, np.max(err_norm)))
40 if __name__ ==
'__main__':
def plotResults(filename)