Skip to content

Commit 527faf5

Browse files
committed
EKF renamed use_tx_time to sv_rx_time
1 parent a4c9e48 commit 527faf5

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

gnss_lib_py/algorithms/gnss_filters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ def solve_gnss_ekf(measurements, init_dict = None,
123123
if "R" not in init_dict:
124124
raise RuntimeError("Measurement noise must be specified in init_dict")
125125

126-
if "use_tx_time" not in init_dict:
127-
init_dict["use_tx_time"] = False
126+
if "sv_rx_time" not in init_dict:
127+
init_dict["sv_rx_time"] = False
128128

129129
# initialize parameter dictionary
130130
if params_dict is None:
@@ -212,7 +212,7 @@ def __init__(self, init_dict, params_dict):
212212
self.delta_t = params_dict.get('dt',1.0)
213213
self.motion_type = params_dict.get('motion_type','stationary')
214214
self.measure_type = params_dict.get('measure_type','pseudorange')
215-
self.use_tx_time = init_dict.get('use_tx_time', False)
215+
self.sv_rx_time = init_dict.get('sv_rx_time', False)
216216

217217
def dyn_model(self, u, predict_dict=None):
218218
"""Nonlinear dynamics
@@ -291,7 +291,7 @@ def measure_model(self, update_dict):
291291
"""
292292
if self.measure_type=='pseudorange':
293293
pos_sv_m = update_dict['pos_sv_m']
294-
if not self.use_tx_time:
294+
if not self.sv_rx_time:
295295
rx_pos_m = np.array([[self.state[0]], [self.state[1]], [self.state[2]]])
296296
num_svs = np.shape(pos_sv_m)[1]
297297
_, true_range = _find_delxyz_range(pos_sv_m.T, rx_pos_m, num_svs)

tests/algorithms/test_gnss_filters.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def gnss_init_params():
3636
'sigma_0': 5*np.eye(state_dim),
3737
'Q': Q,
3838
'R': R,
39-
'use_tx_time': True}
39+
'sv_rx_time': True}
4040
return init_dict
4141

4242

@@ -221,7 +221,7 @@ def fixture_android_init_dict():
221221
init_dict = {}
222222
init_dict['Q'] = np.eye(7)
223223
init_dict['R'] = np.eye(1)
224-
init_dict['use_tx_time'] = False
224+
init_dict['sv_rx_time'] = False
225225
return init_dict
226226

227227
def test_solve_gnss_ekf(derived, noise_tx_init_dict):
@@ -326,19 +326,19 @@ def test_solve_gnss_ekf_initializations(derived_2022):
326326
reset_init_dict = {}
327327
reset_init_dict['Q'] = np.eye(7)
328328
reset_init_dict['R'] = np.eye(1)
329-
reset_init_dict['use_tx_time'] = True
329+
reset_init_dict['sv_rx_time'] = True
330330
_ = solve_gnss_ekf(derived_2022, reset_init_dict)
331331
# GNSS EKF solution when initial positions are given
332332
derived_2022.remove(rows=['b_rx_m'], inplace=True)
333333
reset_init_dict = {}
334334
reset_init_dict['Q'] = np.eye(7)
335335
reset_init_dict['R'] = np.eye(1)
336-
reset_init_dict['use_tx_time'] = True
336+
reset_init_dict['sv_rx_time'] = True
337337
_ = solve_gnss_ekf(derived_2022, reset_init_dict)
338338
# GNSS EKF solution when no initial states are given
339339
derived_no_rx_rows = derived_2022.remove(rows=['x_rx_m', 'y_rx_m', 'z_rx_m'])
340340
reset_init_dict = {}
341341
reset_init_dict['Q'] = np.eye(7)
342342
reset_init_dict['R'] = np.eye(1)
343-
reset_init_dict['use_tx_time'] = True
343+
reset_init_dict['sv_rx_time'] = True
344344
_ = solve_gnss_ekf(derived_no_rx_rows, reset_init_dict)

0 commit comments

Comments
 (0)