Skip to content

Commit 2df2c22

Browse files
committed
fixed tests from leapsecond time conversion changes
1 parent 92d28d5 commit 2df2c22

4 files changed

Lines changed: 4 additions & 14 deletions

File tree

gnss_lib_py/parsers/clk.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ def __init__(self, input_path):
8181
minute = int(timelist_val[6]), \
8282
second = int(float(timelist_val[7])), \
8383
tzinfo=timezone.utc)
84-
gps_millis_timestep = datetime_to_gps_millis(curr_time,
85-
add_leap_secs = False)
84+
gps_millis_timestep = datetime_to_gps_millis(curr_time)
8685
unix_millis_timestep = datetime_to_unix_millis(curr_time)
8786
gnss_sv_ids.append(gnss_sv_id)
8887
gnss_id.append(CONSTELLATION_CHARS[gnss_sv_id[0]])

gnss_lib_py/parsers/sp3.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ def __init__(self, input_path):
7474
int(temp[3]), int(temp[4]), \
7575
int(temp[5]),int(float(temp[6])),\
7676
tzinfo=timezone.utc )
77-
gps_millis_timestep = datetime_to_gps_millis(curr_time,
78-
add_leap_secs = False)
77+
gps_millis_timestep = datetime_to_gps_millis(curr_time)
7978
unix_millis_timestep = datetime_to_unix_millis(curr_time)
8079

8180
if 'P' in dval[0]:

gnss_lib_py/utils/time_conversions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ def datetime_to_tow(t_datetimes):
135135
----------
136136
t_datetimes : datetime.datetime or array-like of datetime.datetime
137137
Datetime object for Time of Clock, assumed to be in UTC time frame.
138-
verbose : bool
139-
Flag for whether to print that leapseconds were added.
140138
141139
Returns
142140
-------
@@ -447,8 +445,6 @@ def unix_to_gps_millis(unix_millis):
447445
----------
448446
unix_millis : float or array-like of float
449447
Milliseconds that have passed since UTC epoch.
450-
add_leap_secs : bool
451-
Flag for whether output is in UTC seconds or GPS seconds.
452448
453449
Returns
454450
-------
@@ -484,8 +480,6 @@ def gps_millis_to_datetime(gps_millis):
484480
----------
485481
gps_millis : float or array-like of float
486482
Float object for Time of Clock [ms].
487-
rem_leap_secs : bool
488-
Flag for whether output is in UTC seconds or GPS seconds.
489483
490484
Returns
491485
-------
@@ -512,8 +506,6 @@ def gps_to_unix_millis(gps_millis):
512506
----------
513507
gps_millis : float or array-like of float
514508
Float object for Time of Clock [ms].
515-
rem_leap_secs : bool
516-
Flag for whether output is in UTC seconds or GPS seconds.
517509
518510
Returns
519511
-------

tests/parsers/test_clk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ def test_load_clkdata_nodata(clk_path_nodata):
137137

138138
@pytest.mark.parametrize('row_name, prn, index, exp_value',
139139
[('b_sv_m', 'G15', 0, -0.00015303409205*consts.C),
140-
('gps_millis', 'G05', 5, 1303668150000.0),
140+
('gps_millis', 'G05', 5, 1303668168000.0),
141141
('b_sv_m', 'R08', 16, -5.87550990462e-05*consts.C),
142-
('gps_millis', 'R14', 10, 1303668300000.0),
142+
('gps_millis', 'R14', 10, 1303668318000.0),
143143
]
144144
)
145145
def test_clkgps_value_check(clkdata, prn, row_name, index, exp_value):

0 commit comments

Comments
 (0)