Google Decimeter Challenge Datasets
This tutorial explains details about to use parsers and functions made for the 2021, 2022, and 2023 Google Smartphone Decimeter Challege datasets.
Load gnss_lib_py
into the Python workspace
[1]:
import gnss_lib_py as glp
2023 Google Android Derived Dataset
This data comes from the 2023 Google Smartphone Decimeter Challenge and can be downloaded from Kaggle.
Loading the data into an instance of NavData
is as easy as creating an instance of AndroidDerived2023
with the relevant file path.
[2]:
# download Android data file
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2023/2023-09-07-18-59-us-ca/pixel7pro/device_gnss.csv --quiet -nc -O "../data/device_gnss.csv"
# load Android Google Challenge data
derived_data = glp.AndroidDerived2023("../data/device_gnss.csv")
We can verify that the data loaded correctly by printing the shape and rows of the imported data.
[3]:
derived_data.shape
[3]:
(49, 234)
[4]:
derived_data.rows
[4]:
['MessageType',
'TimeNanos',
'LeapSecond',
'FullBiasNanos',
'BiasNanos',
'BiasUncertaintyNanos',
'DriftNanosPerSecond',
'DriftUncertaintyNanosPerSecond',
'HardwareClockDiscontinuityCount',
'TimeOffsetNanos',
'State',
'ReceivedSvTimeNanos',
'ReceivedSvTimeUncertaintyNanos',
'PseudorangeRateMetersPerSecond',
'PseudorangeRateUncertaintyMetersPerSecond',
'AccumulatedDeltaRangeState',
'CarrierFrequencyHz',
'MultipathIndicator',
'CodeType',
'ChipsetElapsedRealtimeNanos',
'ArrivalTimeNanosSinceGpsEpoch',
'ReceivedSvTimeNanosSinceGpsEpoch',
'unix_millis',
'gnss_id',
'sv_id',
'signal_type',
'x_sv_m',
'y_sv_m',
'z_sv_m',
'el_sv_deg',
'az_sv_deg',
'vx_sv_mps',
'vy_sv_mps',
'vz_sv_mps',
'b_sv_m',
'b_dot_sv_mps',
'raw_pr_m',
'raw_pr_sigma_m',
'intersignal_bias_m',
'iono_delay_m',
'tropo_delay_m',
'cn0_dbhz',
'accumulated_delta_range_m',
'accumulated_delta_range_sigma_m',
'x_rx_m',
'y_rx_m',
'z_rx_m',
'corr_pr_m',
'gps_millis']
2023 Google Android Ground Truth
We can similarly load in the ground truth data from the same 2023 Google Smartphone Decimeter Challenge.
[5]:
# download Android data file
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2023/2023-09-07-18-59-us-ca/pixel7pro/ground_truth.csv --quiet -nc -O "../data/ground_truth.csv"
# load Android Google Challenge ground truth data
gt_data = glp.AndroidGroundTruth2023("../data/ground_truth.csv")
[6]:
gt_data.shape
[6]:
(17, 5)
[7]:
gt_data.rows
[7]:
['MessageType',
'Provider',
'AccuracyMeters',
'SpeedAccuracyMps',
'BearingAccuracyDegrees',
'elapsedRealtimeNanos',
'VerticalAccuracyMeters',
'lat_rx_gt_deg',
'lon_rx_gt_deg',
'alt_rx_gt_m',
'v_rx_gt_mps',
'heading_rx_gt_rad',
'unix_millis',
'x_rx_gt_m',
'y_rx_gt_m',
'z_rx_gt_m',
'gps_millis']
2023/2022 Google Decimeter Kaggle Challenge
There are utility functions to prepare Kaggle submissions for the 2023 challenge and 2022 Challenge.
We offer a function to convert the provided Weighted Least Squares baseline solution into the standard state_estimate
format found throughout gnss_lib_py
. Simply pass in the derived data NavData object.
[8]:
state_estimate = glp.solve_kaggle_baseline(derived_data)
print(state_estimate)
gps_millis lat_rx_deg lon_rx_deg alt_rx_m
0 1.303771e+12 37.395822 -122.102934 1.066548
1 1.303771e+12 37.395827 -122.102951 6.186168
2 1.303771e+12 37.395820 -122.102921 5.634656
3 1.303771e+12 37.395803 -122.102936 8.128997
4 1.303771e+12 37.395800 -122.102938 5.844278
5 1.303771e+12 37.395833 -122.102963 1.183566
prepare_kaggle_submission
can be used to convert the standard state_estimate
format to a NavData object with the same rows and row names which the 2023 and 2022 Kaggle competitions expect. The trip_id
is a combination of the trajectory trace name and phone name.
[9]:
solution = glp.prepare_kaggle_submission(state_estimate, trip_id = "my_trace/my_phone")
print(solution)
tripId UnixTimeMillis LatitudeDegrees LongitudeDegrees
0 my_trace/my_phone 1619735725999 37.395822 -122.102934
1 my_trace/my_phone 1619735726999 37.395827 -122.102951
2 my_trace/my_phone 1619735727999 37.395820 -122.102921
3 my_trace/my_phone 1619735728999 37.395803 -122.102936
4 my_trace/my_phone 1619735729999 37.395800 -122.102938
5 my_trace/my_phone 1619735730999 37.395833 -122.102963
solve_kaggle_dataset
can be used to automatically iterate through all trace trajectory names and phone names, estimate the state using the provided solver, and concatenate all state estimates together for a single submission. The solver
variable could use solve_kaggle_baseline
, solve_wls
, or solve_gnss_ekf
for example.
[10]:
# submission = glp.solve_kaggle_dataset(folder_path = "/path/to/train/or/test/folder/",
# solver = glp.solve_wls)
# after the submission NavData object is created, save it to a csv with:
# submission.to_csv("file_path.csv")
2022 Google Android Derived Dataset
This data comes from the 2022 Google Smartphone Decimeter Challenge and can be downloaded from Kaggle.
Loading the data into an instance of NavData
is as easy as creating an instance of AndroidDerived2022
with the relevant file path.
[11]:
# download Android data file
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2022/device_gnss.csv --quiet -nc -O "../data/device_gnss.csv"
# load Android Google Challenge data
derived_data = glp.AndroidDerived2022("../data/device_gnss.csv")
We can verify that the data loaded correctly by printing the shape and rows of the imported data.
[12]:
derived_data.shape
[12]:
(49, 234)
[13]:
derived_data.rows
[13]:
['MessageType',
'TimeNanos',
'LeapSecond',
'FullBiasNanos',
'BiasNanos',
'BiasUncertaintyNanos',
'DriftNanosPerSecond',
'DriftUncertaintyNanosPerSecond',
'HardwareClockDiscontinuityCount',
'TimeOffsetNanos',
'State',
'ReceivedSvTimeNanos',
'ReceivedSvTimeUncertaintyNanos',
'PseudorangeRateMetersPerSecond',
'PseudorangeRateUncertaintyMetersPerSecond',
'AccumulatedDeltaRangeState',
'CarrierFrequencyHz',
'MultipathIndicator',
'CodeType',
'ChipsetElapsedRealtimeNanos',
'ArrivalTimeNanosSinceGpsEpoch',
'ReceivedSvTimeNanosSinceGpsEpoch',
'unix_millis',
'gnss_id',
'sv_id',
'signal_type',
'x_sv_m',
'y_sv_m',
'z_sv_m',
'el_sv_deg',
'az_sv_deg',
'vx_sv_mps',
'vy_sv_mps',
'vz_sv_mps',
'b_sv_m',
'b_dot_sv_mps',
'raw_pr_m',
'raw_pr_sigma_m',
'intersignal_bias_m',
'iono_delay_m',
'tropo_delay_m',
'cn0_dbhz',
'accumulated_delta_range_m',
'accumulated_delta_range_sigma_m',
'x_rx_m',
'y_rx_m',
'z_rx_m',
'corr_pr_m',
'gps_millis']
2022 Google Android Ground Truth
We can similarly load in the ground truth data from the same 2022 Google Smartphone Decimeter Challenge.
[14]:
# download Android data file
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2022/ground_truth.csv --quiet -nc -O "../data/ground_truth.csv"
# load Android Google Challenge ground truth data
gt_data = glp.AndroidGroundTruth2022("../data/ground_truth.csv")
[15]:
gt_data.shape
[15]:
(17, 5)
[16]:
gt_data.rows
[16]:
['MessageType',
'Provider',
'AccuracyMeters',
'SpeedAccuracyMps',
'BearingAccuracyDegrees',
'elapsedRealtimeNanos',
'VerticalAccuracyMeters',
'lat_rx_gt_deg',
'lon_rx_gt_deg',
'alt_rx_gt_m',
'v_rx_gt_mps',
'heading_rx_gt_rad',
'unix_millis',
'x_rx_gt_m',
'y_rx_gt_m',
'z_rx_gt_m',
'gps_millis']
2021 Google Android Derived Dataset
This data comes from the 2021 Google Smartphone Decimeter Challenge and can be downloaded from Kaggle.
Loading the data into an instance of NavData
is as easy as creating an instance of AndroidDerived2021
with the relevant file path.
[17]:
# download Android data file
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2021/Pixel4_derived.csv --quiet -nc -O "../data/Pixel4_derived.csv"
# load Android Google Challenge data
derived_data = glp.AndroidDerived2021("../data/Pixel4_derived.csv")
We can verify that the data loaded correctly by printing the shape and rows of the imported data.
[18]:
derived_data.shape
[18]:
(21, 170)
[19]:
derived_data.rows
[19]:
['receivedSvTimeInGpsNanos',
'trace_name',
'rx_name',
'gps_millis',
'gnss_id',
'sv_id',
'signal_type',
'x_sv_m',
'y_sv_m',
'z_sv_m',
'vx_sv_mps',
'vy_sv_mps',
'vz_sv_mps',
'b_sv_m',
'b_dot_sv_mps',
'raw_pr_m',
'raw_pr_sigma_m',
'intersignal_bias_m',
'iono_delay_m',
'tropo_delay_m',
'corr_pr_m']
2021 Google Android Ground Truth
We can similarly load in the ground truth data from the same 2021 Google Smartphone Decimeter Challenge.
[20]:
# download Android 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_ground_truth.csv"
# load Android Google Challenge ground truth data
gt_data = glp.AndroidGroundTruth2021("../data/Pixel4_ground_truth.csv")
[21]:
gt_data.shape
[21]:
(14, 199)
[22]:
gt_data.rows
[22]:
['collectionName',
'phoneName',
'timeSinceFirstFixSeconds',
'hDop',
'vDop',
'lat_rx_gt_deg',
'lon_rx_gt_deg',
'alt_rx_gt_m',
'gps_millis',
'v_rx_gt_mps',
'heading_rx_gt_rad',
'x_rx_gt_m',
'y_rx_gt_m',
'z_rx_gt_m']