Plot Map

[1]:
import gnss_lib_py as glp

# load Android Google Challenge data
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2021/Pixel4XL_derived.csv --quiet -nc -O "../data/Pixel4XL_derived.csv"
derived_data = glp.AndroidDerived2021("../data/Pixel4XL_derived.csv", remove_timing_outliers=False)

Note: In this case, the example data is filtered to be seconds apart, in the regular setting, such measurements would be removed. To prevent this from happening, we set remove_timing_outliers to False here. For the full dataset, set this flag to True

The plot_map function allows you to plot latitude and longitude rows of data on a map. The rows must match the standard naming style of lat_*_deg and lon_*_deg where * can be replaced with an arbitrary string.

[2]:
state_estimate = glp.solve_wls(derived_data)
fig = glp.plot_map(state_estimate)
fig.show()

You can plot multiple data traces on the same graph as long as the * in the lat_*_deg and lon_*_deg fields is different for each data trace.

[3]:
# load a separate data file
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2021/Pixel4_ground_truth.csv --quiet -nc -O "../data/Pixel4_truth.csv"
truth_data_second_trace = glp.AndroidGroundTruth2021("../data/Pixel4_truth.csv")

fig = glp.plot_map(state_estimate, truth_data_second_trace)
fig.show()