test_google_decimeter module
Tests for Android data loaders.
- test_google_decimeter.fixture_derived_2023(root_path_2023)[source]
Testing that Android Derived 2023 is created without errors.
- Parameters:
root_path_2023 (string) – Folder location containing 2023 measurements
- Returns:
derived_2023 – Android Derived 2023 Navdata object for testing.
- Return type:
gnss_lib_py.parsers.google_decimeter.AndroidDerived2023
- test_google_decimeter.fixture_derived_path(root_path)[source]
Filepath of Android Derived measurements
- Parameters:
root_path (string) – Path of testing dataset root path
- Returns:
derived_path_2021 – Location for the unit_test Android derived measurements
- Return type:
string
Notes
Test data is a subset of the Android Raw Measurement Dataset [1], particularly the train/2020-05-14-US-MTV-1/Pixel4 trace. The dataset was retrieved from https://www.kaggle.com/c/google-smartphone-decimeter-challenge/data
References
- test_google_decimeter.fixture_ground_truth_2023(root_path_2023)[source]
Testing that Ground Truth 2023 is created without errors.
- Parameters:
root_path_2023 (string) – Folder location containing 2023 measurements
- Returns:
ground_truth_2023 – Ground Truth 2023 Navdata object for testing.
- Return type:
gnss_lib_py.parsers.google_decimeter.AndroidGroundTruth2023
- test_google_decimeter.fixture_inverse_row_map()[source]
Map from standard names to derived column names
- Returns:
inverse_row_map – Column names for inverse map of form {standard_name : derived_name}
- Return type:
Dict
- test_google_decimeter.fixture_pd_df(derived_path_2021)[source]
Load Android derived measurements into dataframe
- Parameters:
derived_path_2021 (pytest.fixture) – String with filepath to derived measurement file
- Returns:
derived_df – Dataframe with Android Derived measurements
- Return type:
pd.DataFrame
- test_google_decimeter.fixture_raw_path(root_path)[source]
Filepath of Android Raw measurements
- Parameters:
root_path (string) – Path of testing dataset root path
- Returns:
raw_path – Location for text log file with Android Raw measurements
- Return type:
string
Notes
Test data is a subset of the Android Raw Measurement Dataset [3], particularly the train/2020-05-14-US-MTV-1/Pixel4 trace. The dataset was retrieved from https://www.kaggle.com/c/google-smartphone-decimeter-challenge/data
References
[3] Fu, Guoyu Michael, Mohammed Khider, and Frank van Diggelen. “Android Raw GNSS Measurement Datasets for Precise Positioning.” Proceedings of the 33rd International Technical Meeting of the Satellite Division of The Institute of Navigation (ION GNSS+ 2020). 2020.
- test_google_decimeter.fixture_root_path_2022()[source]
Location of measurements for unit test
- Returns:
root_path – Folder location containing 2022 measurements
- Return type:
string
- test_google_decimeter.fixture_root_path_2023()[source]
Location of measurements for unit test
Test data is a subset of the Android Raw Measurement Dataset [7], from the 2023 Decimeter Challenge.
References
[7] https://www.kaggle.com/competitions/smartphone-decimeter-2023
- Returns:
root_path – Folder location containing 2023 measurements
- Return type:
string
- test_google_decimeter.test_android_concat(derived_2021, pd_df)[source]
Test concat on Android data.
- Parameters:
derived_2021 (AndroidDerived2021) – Instance of AndroidDerived2021 for testing
pd_df (pytest.fixture) – pd.DataFrame for testing measurements
- test_google_decimeter.test_android_gtruth(gtruth)[source]
Test AndroidGroundTruth initialization
- Parameters:
gtruth (AndroidGroundTruth2021) – Instance of AndroidGroundTruth2021 for testing
- test_google_decimeter.test_derived_2023(derived_2023)[source]
Check how the 2023 derived data was parsed.
- Parameters:
derived_2023 (gnss_lib_py.parsers.google_decimeter.AndroidDerived2023) – Android Derived 2023 Navdata object for testing.
- test_google_decimeter.test_derived_df_equivalence(derived_path_2021, pd_df, derived_row_map)[source]
Test if naive dataframe and AndroidDerived2021 contain same data.
- Parameters:
derived_path_2021 (string) – Location for the unit_test Android 2021 derived measurements.
pd_df (pytest.fixture) – pd.DataFrame for testing measurements
derived_row_map (pytest.fixture) – Column map to convert standard to original derived column names.
- test_google_decimeter.test_derived_state_estimate_ext(derived_2022)[source]
Tests the state_estimate extracted as a separate NavData.
- Parameters:
derived_2022 (gnss_lib_py.parsers.google_decimeter.AndroidDerived2022) – Android Derived 2022 Navdata object for testing.
- test_google_decimeter.test_derived_value_check(derived_2021, row_name, index, value)[source]
Check AndroidDerived2021 entries against known values.
- Parameters:
derived_2021 (pytest.fixture) – Instance of AndroidDerived2021 for testing
row_name (string) – Row key for test example
index (int) – Column number for test example
value (float or string) – Known value to be checked against
- test_google_decimeter.test_get_and_set_num(derived_2021)[source]
Testing __getitem__ and __setitem__ methods for numerical values
- Parameters:
derived_2021 (pytest.fixture) – Instance of AndroidDerived2021 for testing
- test_google_decimeter.test_get_and_set_str(derived_2021)[source]
Testing __getitem__ and __setitem__ methods for string values
- Parameters:
derived_2021 (pytest.fixture) – Instance of AndroidDerived2021 for testing
- test_google_decimeter.test_ground_truth_2023(ground_truth_2023)[source]
Check how the 2023 ground truth data was parsed.
- Parameters:
ground_truth_2023 (gnss_lib_py.parsers.google_decimeter.AndroidGroundTruth2023) – Ground Truth 2023 Navdata object for testing.
- test_google_decimeter.test_gt_2022(gt_2022_path)[source]
Testing that Android ground truth 2022 is created without errors.
- Parameters:
gt_2022_path (string) – Location for the unit_test Android ground truth 2022 measurements
- test_google_decimeter.test_gt_alt_nan(root_path_2022)[source]
Test Android Ground Truth Loader sets blank altitudes to zero.
- Parameters:
root_path_2022 (string) – Location for the files with missing altitude, including the file with missing altitude
Test that all subclasses inherit from NavData
- Parameters:
derived_2021 (pytest.fixture) – Instance of AndroidDerived2021 for testing
- test_google_decimeter.test_prepare_kaggle_submission(state_estimate_2022)[source]
Prepare Kaggle baseline solution.
- Parameters:
state_estimate_2022 (gnss_lib_py.navdata.navdata.NavData) – Baseline state estimate.
- test_google_decimeter.test_remove_all_data(derived_path_xl)[source]
Test what happens when remove_timing_outliers removes all data.
- Parameters:
derived_path_xl (string) – Location for the unit_test Android 2021 derived measurements.
- test_google_decimeter.test_shape_update(derived_2021)[source]
Test that shape gets updated after adding a row.
- Parameters:
derived_2021 (pytest.fixture) – Instance of AndroidDerived2021 for testing
- test_google_decimeter.test_solve_kaggle_baseline(derived_2022)[source]
Testing Kaggle baseline solution.
- Parameters:
derived_2022 (gnss_lib_py.parsers.google_decimeter.AndroidDerived2022) – Android derived 2022 measurements
- Returns:
state_estimate_2022 – Baseline state estimate.
- Return type:
gnss_lib_py.navdata.navdata.NavData