Esempio n. 1
0
    all_velocity_errors = numpy.append(all_velocity_errors, velocity_errors)
    all_residual_drifts_deriv = numpy.append(all_residual_drifts_deriv, residual_drifts_deriv)

time_diffs = data['times'][1:] - data['times'][:-1]

mask = numpy.logical_or(time_diffs == 0, time_diffs > arguments.time_threshold)
differences = data['clock_drifts'][1:] - data['clock_drifts'][:-1]
differences = numpy.ma.array(differences, mask = mask).compressed()
time_diffs = numpy.ma.array(time_diffs, mask = mask).compressed()
clock_drifts_deriv = differences / time_diffs

logging.info("Plotting")

error_histogram = plt.figure().add_subplot(1, 1, 1)
mu, sigma, outliers = matplotlib_settings.plot_hist(error_histogram,
                                                    all_errors,
                                                    arguments.outlier_threshold)
print("Mean: {}".format(mu))
print("Sigma: {}".format(sigma))
print("Outlier probability: {}".format(outliers))
error_histogram.set_title('Measurement errors')
error_histogram.set_xlabel(r'Error/\si{\meter}')
error_histogram.set_ylabel(r'Count')
matplotlib_settings.maybe_save_plot(error_histogram,
                                    arguments.save_pseudorange_histogram)

fig2 = plt.figure()
velocity_error_histogram = fig2.add_subplot(1, 1, 1)
mu, sigma, outliers = matplotlib_settings.plot_hist(velocity_error_histogram,
                                          all_velocity_errors,
                                          arguments.velocity_outlier_threshold)
Esempio n. 2
0
error_plot.scatter(
    times[:: arguments.plot_thinning],
    errors[:: arguments.plot_thinning],
    marker=".",
    s=40,
    alpha=0.7,
    edgecolors="none",
    rasterized=True,
)
error_plot.set_title("Measurement errors for SV {}".format(sv_id))
error_plot.set_xlabel(r"Time/\si{\second}")
error_plot.set_ylabel(r"Error/\si{\meter}")
matplotlib_settings.maybe_save_plot(error_plot, arguments.save_pseudorange_errors)

error_histogram = plt.figure().add_subplot(1, 1, 1)
mu, sigma, offsets = matplotlib_settings.plot_hist(error_histogram, errors, arguments.outlier_threshold)
print("Mean: {}".format(mu))
print("Sigma: {}".format(sigma))
error_histogram.set_title("Measurement errors for SV {}".format(sv_id))
error_histogram.set_xlabel(r"Error/\si{\meter}")
error_histogram.set_ylabel(r"Count")

drifts_plot = plt.figure().add_subplot(1, 1, 1)
drifts_plot.plot(times[:: arguments.plot_thinning], clock_drifts[:: arguments.plot_thinning], "-", alpha=0.7)
drifts_plot.set_title("Receiver clock drifts for SV {}".format(sv_id))
drifts_plot.set_xlabel(r"Time/\si{\second}")
drifts_plot.set_ylabel(r"Drift/\si{\meter\per\second}")
matplotlib_settings.common_plot_settings(drifts_plot, set_limits=False)

velocity_plot = plt.figure().add_subplot(1, 1, 1)
velocity_plot.scatter(
Esempio n. 3
0
velocity_errors = data['velocity_errors'][::arguments.plot_thinning]
velocity_errors -= clock_drifts

logging.info("Plotting")

error_plot = plt.figure().add_subplot(1, 1, 1)
error_plot.scatter(times, errors, c=sv_ids, marker='.', s=40, alpha=0.7,
    edgecolors='none', rasterized=True)
error_plot.set_title('Measurement errors')
error_plot.set_xlabel(r'Time/\si{\second}')
error_plot.set_ylabel(r'Error/\si{\meter}')
matplotlib_settings.maybe_save_plot(error_plot, arguments.save_pseudorange_errors)

error_histogram = plt.figure().add_subplot(1, 1, 1)
mu, sigma, outliers = matplotlib_settings.plot_hist(error_histogram,
                                                    errors,
                                                    arguments.outlier_threshold)
print("Mean: {}".format(mu))
print("Sigma: {}".format(sigma))
error_histogram.set_title('Measurement errors')
error_histogram.set_xlabel(r'Error/\si{\meter}')
error_histogram.set_ylabel(r'Count')
matplotlib_settings.maybe_save_plot(error_histogram, arguments.save_pseudorange_histogram)

drifts_plot = plt.figure().add_subplot(1, 1, 1)
drifts_plot.plot(times, clock_drifts,
    '-', alpha=0.7)
drifts_plot.set_title('Receiver clock drifts')
drifts_plot.set_xlabel(r'Time/\si{\second}')
drifts_plot.set_ylabel(r'Drift/\si{\meter\per\second}')
matplotlib_settings.common_plot_settings(drifts_plot, set_limits=False)
Esempio n. 4
0
        ('sv_ids', numpy.float),
        ('errors', numpy.float),
    ])

times = data["times"][::arguments.plot_thinning]
sv_ids = (data["sv_ids"] / data["sv_ids"].max())[::arguments.plot_thinning]
errors = data["errors"][::arguments.plot_thinning]

logging.info("Plotting")

error_plot = plt.figure().add_subplot(1, 1, 1)
error_plot.scatter(times, errors, c=sv_ids, marker='.', s=40, alpha=0.7,
    edgecolors='none', rasterized=True)
error_plot.set_title('Measurement error derivation')
error_plot.set_xlabel(r'Time/\si{\second}')
error_plot.set_ylabel(r'Error derivation/\si{\meter\per\second}')
matplotlib_settings.common_plot_settings(error_plot, set_limits=False)

error_histogram = plt.figure().add_subplot(1, 1, 1)
mu, sigma, outliers = matplotlib_settings.plot_hist(error_histogram,
                                                    data['errors'],
                                                    arguments.outlier_threshold)
print("Mean: {}".format(mu))
print("Sigma: {}".format(sigma))
error_histogram.set_title('Measurement errors')
error_histogram.set_xlabel(r'Error/\si{\meter}')
error_histogram.set_ylabel(r'Count')

if not arguments.no_show:
    plt.show()