2022 IB Diploma Extended Essays
#yaw data plt.plot(t_lidar, yaw_lidar, t_orb, yaw_orb, t_zed, yaw_zed, t_gyro,yaw_gyro,t_mag,yaw_mag) plt.legend(['yaw(t) - lidar', 'yaw(t) - orb', 'yaw(t) - zed', 'yaw(t) - gyro', 'yaw(t) - mag'],
loc='best') plt.show() t = t_lidar
forb = interp1d(t_orb, x_orb) fzed = interp1d(t_zed, x_zed)
#x data plt.plot(t_lidar, forb(t_lidar)-x_lidar, t_lidar, fzed(t_lidar)-x_lidar ) x1=forb(t_lidar)-x_lidar x2=fzed(t_lidar)-x_lidar plt.legend(["x(t) error - orb. E="+str(mean(x1))+" D="+str(var(x1))+" std="+str(std(x1))+".", "x(t) error - zed. E="+str(mean(x2))+" D="+str(var(x2))+" std="+str(std(x2))+"."], loc='best') plt.show()
forb = interp1d(t_orb, y_orb) fzed = interp1d(t_zed, y_zed) #y data plt.plot(t_lidar, forb(t_lidar)-y_lidar, t_lidar, fzed(t_lidar)-y_lidar )
x1=forb(t_lidar)-y_lidar x2=fzed(t_lidar)-y_lidar plt.legend(["y(t) error - orb. E="+str(mean(x1))+" D="+str(var(x1))+" std="+str(std(x1))+".", "y(t) error - zed. E="+str(mean(x2))+" D="+str(var(x2))+" std="+str(std(x2))+"."], loc='best') plt.show()
forb = interp1d(t_orb, yaw_orb) fzed = interp1d(t_zed, yaw_zed) fgyro = interp1d(t_gyro, yaw_gyro) fmag = interp1d(t_mag, yaw_mag) #yaw plt.plot(t_lidar, forb(t_lidar)-yaw_lidar, t_lidar, fzed(t_lidar)-yaw_lidar, t_lidar, fgyro(t_lidar) - yaw_lidar, t_lidar, fmag(t_lidar) - yaw_lidar)
x1=forb(t_lidar)-yaw_lidar x2=fzed(t_lidar)-yaw_lidar x3=fgyro(t_lidar) - yaw_lidar x4=fmag(t_lidar) - yaw_lidar plt.legend(["yaw(t) error - orb. E="+str(mean(x1))+" D="+str(var(x1))+" std="+str(std(x1)) +".", "yaw(t) error - zed. E="+str(mean(x2))+" D="+str(var(x2))+" std="+str(std(x2))+".", "yaw(t) error - gyro. E="+str(mean(x3))+" D="+str(var(x3))+" std="+str(std(x3))+".", "yaw(t) error - mag. E="+str(mean(x4))+" D="+str(var(x4))+" std="+str(std(x4))+"."],
loc='best') plt.show()
Made with FlippingBook. PDF to flipbook with ease