fig = tools.plot_figure([t, t, t, t], [sf_p_0001_sqt_cov_p_kf, sf_p_1_sqt_cov_p_kf, \ sf_p_100_sqt_cov_p_kf, sf_p_10000_sqt_cov_p_kf], 4, [len(t),len(t),len(t),len(t)], ["co-", "b*-", "rp-", "m+-"], ["$s_{P0} =0.0001$", "$s_{P0} =1$", "$s_{P0} =100$", "$s_{P0} =10000$"], "Position uncertainty", "Time ($s$)", "Uncertainty ($m$)", '', 1, 0, 0, [], 0, [], fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X+0.2) pdf_P0.savefig(fig) sf_p_0001_cdf_x, sf_p_0001_cdf_y = tools.cal_cdf(sf_p_0001_err_p_kf) sf_p_1_cdf_x, sf_p_1_cdf_y = tools.cal_cdf(sf_p_1_err_p_kf) sf_p_100_cdf_x, sf_p_100_cdf_y = tools.cal_cdf(sf_p_100_err_p_kf) sf_p_10000_cdf_x, sf_p_10000_cdf_y = tools.cal_cdf(sf_p_10000_err_p_kf) fig = tools.plot_figure([sf_p_0001_cdf_x, sf_p_1_cdf_x, sf_p_100_cdf_x, sf_p_10000_cdf_x], [sf_p_0001_cdf_y, sf_p_1_cdf_y, sf_p_100_cdf_y, sf_p_10000_cdf_y], 4, [len(sf_p_0001_cdf_x), len(sf_p_1_cdf_x),len(sf_p_100_cdf_x), len(sf_p_10000_cdf_x)], \ ["co-", "b*-", "rp-", "m+-"], ["$s_{P0} =0.0001$", "$s_{P0} =1$", "$s_{P0} =100$", "$s_{P0} =10000$"], "CDF of position errors", \ "Position error ($m$)", "Probability", '', 1, 0, 0, [0,5], 0, [], legend_loc="lower right", fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X-0.2, y_shift_legend=-0.02) pdf_P0.savefig(fig)
[vrw_0001_err_p_kf, vrw_01_err_p_kf, \ vrw_0001_sqt_cov_p_kf, vrw_01_sqt_cov_p_kf], 4, [len(t),len(t),len(t),len(t)], ["bo-", "r+-", "c-.","m:"], ["$e_{p}$ ($q_a= 0.001 m/s/\u221A s$)", "$e_{p}$ ($q_a= 0.1 m/s/\u221A s$)", "$\sigma_{p}$ ($q_a= 0.001 m/s/\u221A s$)", "$\sigma_{p}$ ($q_a= 0.1 m/s/\u221A s$)", ], "Position error and uncertainty", "Time ($s$)", "Position error ($m$)", '', 1, 0, 0, [], 0, [], fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X+0.4) pdf_Q_qa.savefig(fig) vrw_0001_cdf_x, vrw_0001_cdf_y = tools.cal_cdf(vrw_0001_err_p_kf) vrw_001_cdf_x, vrw_001_cdf_y = tools.cal_cdf(vrw_001_err_p_kf) vrw_01_cdf_x, vrw_01_cdf_y = tools.cal_cdf(vrw_01_err_p_kf) vrw_1_cdf_x, vrw_1_cdf_y = tools.cal_cdf(vrw_1_err_p_kf) fig = tools.plot_figure([vrw_0001_cdf_x, vrw_001_cdf_x, vrw_01_cdf_x, vrw_1_cdf_x], [vrw_0001_cdf_y, vrw_001_cdf_y, vrw_01_cdf_y, vrw_1_cdf_y], 4, [len(vrw_0001_cdf_x), len(vrw_001_cdf_x),len(vrw_01_cdf_x), len(vrw_1_cdf_x)], \ ["co-", "b*-", "r+-", "mp-"], ["$q_a=0.001 m/s/\u221A s$","$q_a= 0.01 m/s/\u221A s$","$q_a= 0.1 m/s/\u221A s$", "$q_a= 1 m/s/\u221A s$"], "CDF of position errors", \ "Position error ($m$)", "Probability", '', 1, 0, 0, [0,5], 0, [], legend_loc="lower right", fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X-0.2, y_shift_legend=-0.02) pdf_Q_qa.savefig(fig)
fig = tools.plot_figure([t, t, t, t], [qba_0001_err_p_kf, qba_01_err_p_kf, \ qba_0001_sqt_cov_p_kf, qba_01_sqt_cov_p_kf], 4, [len(t),len(t),len(t),len(t)], ["bo-", "r+-", "c-.","m:"], ["$e_{p}$ ($q_{ba}= 0.001 m/s^2$)", "$e_{p}$ ($q_{ba}= 0.1 m/s^2$)", "$\sigma_{p}$ ($q_{ba}= 0.001 m/s^2$)", "$\sigma_{p}$ ($q_{ba}= 0.1 m/s^2$)", ], "Position error and uncertainty", "Time ($s$)", "Position error ($m$)", '', 1, 0, 0, [], 0, [], fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X+0.4) pdf_Q_qba.savefig(fig) qba_0001_cdf_x, qba_0001_cdf_y = tools.cal_cdf(qba_0001_err_p_kf) qba_001_cdf_x, qba_001_cdf_y = tools.cal_cdf(qba_001_err_p_kf) qba_01_cdf_x, qba_01_cdf_y = tools.cal_cdf(qba_01_err_p_kf) qba_1_cdf_x, qba_1_cdf_y = tools.cal_cdf(qba_1_err_p_kf) fig = tools.plot_figure([qba_0001_cdf_x, qba_001_cdf_x, qba_01_cdf_x, qba_1_cdf_x], [qba_0001_cdf_y, qba_001_cdf_y, qba_01_cdf_y, qba_1_cdf_y], 4, [len(qba_0001_cdf_x), len(qba_001_cdf_x),len(qba_01_cdf_x), len(qba_1_cdf_x)], \ ["co-", "b*-", "r+-", "mp-"], ["$q_{ba}=0.001 m/s^2$","$q_{ba}= 0.01 m/s^2$", "$q_{ba}= 0.1 m/s^2$", "$q_{ba}= 1 m/s^2$"], "CDF of position errors", \ "Position error ($m$)", "Probability", '', 1, 0, 0, [0,5], 0, [], legend_loc="lower right", fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X-0.2, y_shift_legend=-0.02) pdf_Q_qba.savefig(fig)
fig = tools.plot_figure([t, t, t, t], [r_1_err_p_kf, r_10_err_p_kf, \ r_1_sqt_cov_p_kf, r_10_sqt_cov_p_kf], 4, [len(t),len(t),len(t),len(t)], ["bo-", "r+-", "c-.","m:"], ["$e_{p}$ ($\sigma_{R}= 1 m$)", "$e_{p}$ ($\sigma_{R}= 10 m$)", "$\sigma_{p}$ ($\sigma_{R}= 1 m$)", "$\sigma_{p}$ ($\sigma_{R}= 10 m$)", ], "Position error and uncertainty", "Time ($s$)", "Position error ($m$)", '', 1, 0, 0, [], 0, [], fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X+0.3) pdf_R.savefig(fig) r_01_cdf_x, r_01_cdf_y = tools.cal_cdf(r_01_err_p_kf) r_1_cdf_x, r_1_cdf_y = tools.cal_cdf(r_1_err_p_kf) r_10_cdf_x, r_10_cdf_y = tools.cal_cdf(r_10_err_p_kf) r_100_cdf_x, r_100_cdf_y = tools.cal_cdf(r_100_err_p_kf) fig = tools.plot_figure([r_01_cdf_x, r_1_cdf_x, r_10_cdf_x, r_100_cdf_x], [r_01_cdf_y, r_1_cdf_y, r_10_cdf_y, r_100_cdf_y], 4, [len(r_01_cdf_x), len(r_1_cdf_x),len(r_10_cdf_x), len(r_100_cdf_x)], \ ["c*-", "bo-", "r+-", "mp-"], ["$\sigma_{R}=0.1 m$","$\sigma_{R}= 1 m$","$\sigma_{R}= 10 m$", "$\sigma_{R}= 100 m$"], "CDF of position errors", \ "Position error ($m$)", "Probability", '', 1, 0, 0, [0,5], 0, [], legend_loc="lower right", fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X, y_shift_legend=-0.02) pdf_R.savefig(fig)
"g.-", ], ["$p_{2D}$ (no BD)", "$p_{2D}$ (with BD)", "ref"], "Position without/with blunder detection", "East ($m$)", "North ($m$)", '', 1, 1, 0, [], 0, [], fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X + 0.1) pdf_BD.savefig(fig) bd_0_cdf_x, bd_0_cdf_y = tools.cal_cdf(bd_0_err_p_kf) bd_1_cdf_x, bd_1_cdf_y = tools.cal_cdf(bd_1_err_p_kf) fig = tools.plot_figure([bd_0_cdf_x, bd_1_cdf_x], [bd_0_cdf_y, bd_1_cdf_y], 2, [len(bd_0_cdf_x), len(bd_1_cdf_x)], \ ["r*-", "bo-"], ["$e_{p}$ (no BD)","$e_{p}$ (with BD)"], "CDF of position errors", \ "Position error ($m$)", "Probability", '', 1, 0, 0, [0,5], 0, [], legend_loc="lower right", fs=FS_PLOT, if_use_shift=1, y_shift_legend=-0.01) pdf_BD.savefig(fig) """ Statistics """
fig = tools.plot_figure([t, t, t, t], [tau_1_err_p_kf, tau_10_err_p_kf, \ tau_1_sqt_cov_p_kf, tau_10_sqt_cov_p_kf], 4, [len(t),len(t),len(t),len(t)], ["bo-", "r+-", "c-.","m:"], ["$e_{p}$ ($\\tau =1 s$)", "$e_{p}$ ($\\tau =100 s$)", "$\sigma_{p}$ ($\\tau =1 s$)", "$\sigma_{p}$ ($\\tau =100 s$)", ], "Position error and uncertainty", "Time ($s$)", "Position error ($m$)", '', 1, 0, 0, [], 0, [], fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X+0.2) pdf_Q_tau.savefig(fig) tau_01_cdf_x, tau_01_cdf_y = tools.cal_cdf(tau_01_err_p_kf) tau_1_cdf_x, tau_1_cdf_y = tools.cal_cdf(tau_1_err_p_kf) tau_10_cdf_x, tau_10_cdf_y = tools.cal_cdf(tau_10_err_p_kf) tau_100_cdf_x, tau_100_cdf_y = tools.cal_cdf(tau_100_err_p_kf) fig = tools.plot_figure([tau_01_cdf_x, tau_1_cdf_x, tau_10_cdf_x, tau_100_cdf_x], [tau_01_cdf_y, tau_1_cdf_y, tau_10_cdf_y, tau_100_cdf_y], 4, [len(tau_01_cdf_x), len(tau_1_cdf_x),len(tau_10_cdf_x), len(tau_100_cdf_x)], \ ["co-", "b*-", "rp-", "m+-"], ["$\\tau =0.1 s$", "$\\tau =1 s$", "$\\tau =10 s$", "$\\tau =100 s$"], "CDF of position errors", \ "Position error ($m$)", "Probability", '', 1, 0, 0, [0,5], 0, [], legend_loc="lower right", fs=FS_PLOT, if_use_shift=1, x_shift_legend=SHIFT_LEGEND_X-0.2, y_shift_legend=-0.02) pdf_Q_tau.savefig(fig)