google_decimeter module

Functions to process Android measurements.

class google_decimeter.AndroidDerived2021(input_path, remove_timing_outliers=True)[source]

Bases: NavData

Class handling derived measurements from Android dataset.

Inherits from NavData().

Parameters:
  • input_path (string or path-like) – Path to measurement csv file

  • remove_timing_outliers (bool) – Flag for whether to remove measures that are too close or too far away in time. Code from the competition hosts used to implement changes. See note.

Notes

Removes duplicate rows using correction 5 from competition hosts implemented from https://www.kaggle.com/code/gymf123/tips-notes-from-the-competition-hosts/notebook retrieved on 10 August, 2022

static _row_map()[source]

Map of row names from loaded to gnss_lib_py standard

Returns:

row_map – Dictionary of the form {old_name : new_name}

Return type:

Dict

postprocess()[source]

Android derived specific postprocessing.

Adds corrected pseudoranges to measurements. Time step corrections implemented from dataset webpage [1] retrieved on 10 August, 2022.

Correlates constellation type numbers with corresponding constellation names. Mapping also comes from competition website [1].

References

class google_decimeter.AndroidDerived2022(input_path, **kwargs)[source]

Bases: NavData

Class handling derived measurements from Android dataset.

Inherits from NavData(). The row nomenclature for the new derived dataset has changed. We reflect this changed nomenclature in the _row_map() method.

Parameters:

input_path (string or path-like) – Path to measurement csv file

static _row_map()[source]

Map of row names from loaded to gnss_lib_py standard

Returns:

row_map – Dictionary of the form {old_name : new_name}

Return type:

Dict

get_state_estimate()[source]

Extract relevant rows in a separate NavData for state estimate.

Returns:

state_estimate – Instance of NavData containing state estimate rows present in the instance of AndroidDerived2022.

Return type:

gnss_lib_py.navdata.navdata.NavData

postprocess()[source]

Android derived specific postprocessing.

Notes

Adds corrected pseudoranges to measurements. Time step corrections implemented from https://www.kaggle.com/c/google-smartphone-decimeter-challenge/data retrieved on 10 August, 2022.

class google_decimeter.AndroidDerived2023(input_path)[source]

Bases: AndroidDerived2022

Class handling derived measurements from 2023 Android dataset.

Processes the Google Smartphone Decimeter Challenge 2023 [2].

Inherits from AndroidDerived2022().

Parameters:

input_path (string or path-like) – Path to measurement csv file

References

class google_decimeter.AndroidGroundTruth2021(input_path)[source]

Bases: NavData

Class handling ground truth from Android dataset.

Inherits from NavData().

Parameters:

input_path (string or path-like) – Path to measurement csv file

static _row_map()[source]

Map of row names from loaded ground truth to gnss_lib_py standard

Returns:

row_map – Dictionary of the form {old_name : new_name}

Return type:

Dict

postprocess()[source]

Android derived specific postprocessing for NavData()

Notes

Corrections incorporated from Kaggle notes hosted here: https://www.kaggle.com/code/gymf123/tips-notes-from-the-competition-hosts

class google_decimeter.AndroidGroundTruth2022(input_path)[source]

Bases: AndroidGroundTruth2021

Class handling ground truth from Android dataset.

Inherits from AndroidGroundTruth2021().

static _row_map()[source]

Map row names from loaded data to gnss_lib_py standard

Returns:

row_map – Dictionary of the form {old_name : new_name}

Return type:

Dict

postprocess()[source]

Android derived specific postprocessing for NavData()

Notes

class google_decimeter.AndroidGroundTruth2023(input_path)[source]

Bases: AndroidGroundTruth2022

Class handling ground truth from Android dataset.

Inherits from AndroidGroundTruth2022().

google_decimeter.prepare_kaggle_submission(state_estimate, trip_id='trace/phone')[source]

Converts from gnss_lib_py receiver state to Kaggle submission.

Parameters:
  • state_estimate (gnss_lib_py.navdata.navdata.NavData) – Estimated receiver position in latitude and longitude as an instance of the NavData class with the following rows: gps_millis, lat_rx*_deg, lon_rx*_deg.

  • trip_id (string) – Value for the tripId column in kaggle submission which is a fusion of the data and phone type.

Returns:

output – NavData structure ready for Kaggle submission.

Return type:

gnss_lib_py.navdata.navdata.NavData

google_decimeter.solve_kaggle_baseline(navdata)[source]

Convert Decimeter challenge baseline into state_estimate.

The baseline solution was provided in 2022 and 2023, but not in 2021.

Parameters:

navdata (gnss_lib_py.parsers.google_decimeter.AndroidDerived2022) – Instance of the AndroidDerived2022 class.

Returns:

state_estimate – Baseline state estimate.

Return type:

gnss_lib_py.navdata.navdata.NavData

google_decimeter.solve_kaggle_dataset(folder_path, solver, verbose=False, *args, **kwargs)[source]

Run solver on all kaggle traces.

Additional *args arguments are passed into the solver function.

Parameters:
  • folder_path (string or path-like) – Path to folder containing all traces (e.g. full path to “train” or “test” directories.

  • solver (function) – State estimate solver that takes an instance of AndroidDerived2022 and outputs a state_estimate NavData object. Additional *args arguments are passed into this solver function.

  • verbose (bool) –

    If verbose, will print each trace trajectory name and phone name

    pair when it is solving the state estimate for that pair.

Returns:

solution – Full solution submission across all traces. Can then be saved using submission.to_csv().

Return type:

gnss_lib_py.navdata.navdata.NavData