test_smartloc module
Tests for TU Chemnitz SmartLoc data loaders.
- test_smartloc.fixture_load_smartloc_raw(raw_path)[source]
Load instance of SmartLocRaw
- Parameters:
raw_path (pytest.fixture) – String with location of TU Chemnitz rawmeasurement file
- Returns:
smartloc_raw – Instance of SmartLocRaw for testing
- Return type:
- test_smartloc.fixture_pd_df(raw_path)[source]
Load TU Chemnitz rawmeasurements into dataframe
- Parameters:
raw_path (pytest.fixture) – String with filepath to smartloc_raw measurement file
- Returns:
smartloc_raw_df – Dataframe with TU Chemnitz Raw measurements
- Return type:
pd.DataFrame
- test_smartloc.fixture_raw_path(root_path)[source]
Filepath of TU Chemnitz Raw measurements
- Returns:
raw_path – Location for the unit_test TU Chemnitz rawmeasurements
- Return type:
string
Notes
Raw measurements come from TU Chemnitz dataset [1].
Dataset is available on their website [2].
References
- test_smartloc.test_calculate_gt_ecef(smartloc_raw)[source]
Test that GT position rows are added and size increases as expected when using calculate_gt_ecef.
- Parameters:
smartloc_raw (gnss_lib_py.parsers.smartloc.SmartLocRaw) – Instance of SmartLocRaw for testing
- test_smartloc.test_calculate_gt_vel_ecef(smartloc_raw)[source]
Test that GT position rows are added and size increases as expected when using calculate_gt_vel.
- Parameters:
smartloc_raw (gnss_lib_py.parsers.smartloc.SmartLocRaw) – Instance of SmartLocRaw for testing
- test_smartloc.test_get_and_set_num(smartloc_raw)[source]
Testing __getitem__ and __setitem__ methods for numerical values
- Parameters:
smartloc_raw (pytest.fixture) – Instance of SmartLocRaw for testing
- test_smartloc.test_get_and_set_str(smartloc_raw)[source]
Testing __getitem__ and __setitem__ methods for string values
- Parameters:
smartloc_raw (pytest.fixture) – Instance of SmartLocRaw for testing
Test that all subclasses inherit from NavData
- Parameters:
smartloc_raw (pytest.fixture) – Instance of SmartLocRaw for testing
- test_smartloc.test_nlos_removal(smartloc_raw)[source]
Test that NLOS removal reduces length of NavData and that length stays same for repeated removals.
- Parameters:
smartloc_raw (gnss_lib_py.parsers.smartloc.SmartLocRaw) – Instance of SmartLocRaw for testing
- test_smartloc.test_shape_update(smartloc_raw)[source]
Test that shape gets updated after adding a row.
- Parameters:
smartloc_raw (pytest.fixture) – Instance of SmartLocRaw for testing
- test_smartloc.test_smartloc_raw_df_equivalence(smartloc_raw, pd_df)[source]
Test if naive dataframe and SmartLocRaw contain same data
- Parameters:
smartloc_raw (pytest.fixture) – Instance of SmartLocRaw for testing
pd_df (pytest.fixture) – pd.DataFrame for testing measurements
- test_smartloc.test_smartloc_raw_value_check(smartloc_raw, row_name, index, value)[source]
Check SmartLocRaw entries against known values using test matrix
- Parameters:
smartloc_raw (pytest.fixture) – Instance of SmartLocRaw 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