@@ -324,13 +324,15 @@ def test_add_visible_svs_for_trajectory(android_gps_l1, ephemeris_path,
324324 # Create list of times and states from android_gps_l1 into an estimate
325325 state_estimate = NavData ()
326326 unique_svs = np .unique (android_gps_l1 ['sv_id' ])
327+ unique_gnss_id = list (np .unique (android_gps_l1 ['gnss_id' ]))
327328 android_sv = android_gps_l1 .where ("sv_id" , unique_svs [0 ])
328329 state_estimate ['gps_millis' ] = android_sv ['gps_millis' ]
329330 state_estimate ['x_rx_m' ] = android_sv ['x_rx_m' ]
330331 state_estimate ['y_rx_m' ] = android_sv ['y_rx_m' ]
331332 state_estimate ['z_rx_m' ] = android_sv ['z_rx_m' ]
332333 sv_posvel_traj = sv_models .add_visible_svs_for_trajectory (state_estimate ,
333- ephemeris_path )
334+ ephemeris_path ,
335+ constellations = unique_gnss_id )
334336 # assert that actually received SVs in the given times are a
335337 # subset of those considered visible
336338 true_rows = ['x_sv_m' , 'y_sv_m' , 'z_sv_m' , 'vx_sv_mps' , 'vy_sv_mps' ,
@@ -355,13 +357,6 @@ def test_add_visible_svs_for_trajectory(android_gps_l1, ephemeris_path,
355357 measure_frame_sv [row ],
356358 decimal = error_tol_dec ['brd_eph' ])
357359
358- # Test same function with None for satellites. No support for non-GPS
359- # constellations currently and should raise an error
360- with pytest .warns (RuntimeWarning ):
361- _ = sv_models .add_visible_svs_for_trajectory (state_estimate ,
362- ephemeris_path ,
363- constellations = None )
364-
365360@pytest .fixture (name = "root_path" )
366361def fixture_root_path ():
367362 """Location of measurements for unit test
@@ -581,7 +576,7 @@ def fixture_load_navdata_glonassg1(navdata):
581576
582577 return navdata_glonassg1
583578
584- def test_compute_gps_precise_eph (navdata_gps , sp3data , clkdata ):
579+ def test_compute_gps_precise_eph (navdata_gps , sp3data , clkdata , root_path ):
585580 """Tests that sv_models.single_gnss_from_precise_eph does not fail for GPS
586581
587582 Notes
@@ -604,6 +599,8 @@ def test_compute_gps_precise_eph(navdata_gps, sp3data, clkdata):
604599 clkdata ,
605600 verbose = True )
606601
602+ np .testing .assert_array_equal (navdata_gps ["sv_id" ],navdata_prcs_gps ["sv_id" ])
603+
607604
608605 # Check if the resulting derived is NavData class
609606 assert isinstance ( navdata_prcs_gps , type (NavData ()) )
0 commit comments