@@ -128,7 +128,7 @@ def _tracking_channel_factory(parameters):
128128 if parameters ['acq' ].signal == glo_constants .GLO_L1 :
129129 return TrackingChannelGLOL1 (parameters )
130130
131- def get_fsm_states (ms , short_n_long , bit_sync ):
131+ def get_fsm_states (fsm_states , ms , short_n_long , bit_sync ):
132132 if ms == 1 :
133133 ms = '1ms'
134134 elif ms == 2 :
@@ -158,7 +158,7 @@ def get_fsm_states(ms, short_n_long, bit_sync):
158158 else :
159159 bit_sync_status = 'no_bit_sync'
160160
161- return defaults . fsm_states [ms ][bit_sync_status ][mode ]
161+ return fsm_states [ms ][bit_sync_status ][mode ]
162162
163163
164164def get_lock_detector (cur_bw , lock_detect_set ):
@@ -244,7 +244,8 @@ def __init__(self, params):
244244
245245 self .track_settled = False
246246 self .fsm_index = 0
247- self .fsm_states = get_fsm_states (ms = self .coherent_ms ,
247+ self .fsm_states = get_fsm_states (self .fsm_states_all ,
248+ ms = self .coherent_ms ,
248249 short_n_long = self .short_n_long ,
249250 bit_sync = self .bit_sync )
250251
@@ -408,7 +409,8 @@ def _set_track_profile(self):
408409 cutoff_freq = 10 ,
409410 loop_freq = 1e3 / self .coherent_ms )
410411
411- self .fsm_states = get_fsm_states (ms = self .coherent_ms ,
412+ self .fsm_states = get_fsm_states (self .fsm_states_all ,
413+ ms = self .coherent_ms ,
412414 short_n_long = self .short_n_long ,
413415 bit_sync = self .bit_sync )
414416 self .fsm_index = 0
@@ -960,6 +962,7 @@ def __init__(self, params):
960962 params ['chipping_rate' ] = gps_constants .l1ca_chip_rate
961963 params ['sample_index' ] = params ['samples' ]['sample_index' ]
962964 params ['carrier_freq' ] = gps_constants .l1
965+ params ['fsm_states_all' ] = defaults .gps_fsm_states
963966
964967 self .bit_sync = False
965968
@@ -1075,6 +1078,7 @@ def __init__(self, params):
10751078 params ['chipping_rate' ] = gps_constants .l2c_chip_rate
10761079 params ['sample_index' ] = 0
10771080 params ['carrier_freq' ] = gps_constants .l2
1081+ params ['fsm_states_all' ] = defaults .gps_fsm_states
10781082
10791083 self .bit_sync = True
10801084
@@ -1135,22 +1139,29 @@ def __init__(self, params):
11351139 GLO L1 tracking initialization parameters
11361140
11371141 """
1142+
11381143 # Convert acquisition SNR to C/N0
11391144 cn0_0 = 10 * np .log10 (params ['acq' ].snr )
11401145 cn0_0 += 10 * np .log10 (defaults .GLOL1_CHANNEL_BANDWIDTH_HZ )
1146+
11411147 params ['cn0_0' ] = cn0_0
1142- params ['coherent_ms' ] = 1
1143- params ['coherent_iter' ] = 1
1144- params ['loop_filter_params' ] = defaults .l1ca_stage1_loop_filter_params
1145- params ['lock_detect_params' ] = defaults .l1ca_lock_detect_params_opt
11461148 params ['IF' ] = params ['samples' ][glo_constants .GLO_L1 ]['IF' ]
11471149 params ['prn_code' ] = GLOCode
11481150 params ['code_freq_init' ] = params ['acq' ].doppler * \
11491151 glo_constants .glo_chip_rate / glo_constants .glo_l1
1152+
1153+ params ['track_params' ] = defaults .glol1_track_params
1154+ params ['loop_filter_params_template' ] = \
1155+ defaults .glol1_loop_filter_params_template
1156+
1157+ params ['lock_detect_params' ] = defaults .glol1_lock_detect_params
11501158 params ['chipping_rate' ] = glo_constants .glo_chip_rate
1151- params ['sample_index' ] = 0
1152- params ['alias_detector' ] = \
1153- alias_detector .AliasDetectorGLO (params ['coherent_ms' ])
1159+ params ['sample_index' ] = params ['samples' ]['sample_index' ]
1160+ params ['carrier_freq' ] = glo_constants .glo_l1
1161+
1162+ params ['fsm_states_all' ] = defaults .glo_fsm_states
1163+
1164+ self .bit_sync = False
11541165
11551166 TrackingChannel .__init__ (self , params )
11561167
@@ -1196,42 +1207,14 @@ def _run_preprocess(self):
11961207
11971208 self .coherent_iter = self .coherent_ms
11981209
1199- def _short_n_long_preprocess (self ):
1200- if self .stage1 :
1201- self .E = self .P = self .L = 0.j
1202- else :
1203- # When simulating short and long cycles, short step resets EPL
1204- # registers, and long one adds up to them
1205- if self .short_step :
1206- self .E = self .P = self .L = 0.j
1207- self .coherent_iter = 1
1208- else :
1209- self .coherent_iter = self .coherent_ms - 1
1210-
1211- self .code_chips_to_integrate = glo_constants .glo_code_len
1212-
1213- return self .coherent_iter , self .code_chips_to_integrate
1214-
1215- def _short_n_long_postprocess (self ):
1216- more_integration_needed = False
1217- if not self .stage1 :
1218- if self .short_step :
1219- # In case of short step - go to next integration period
1220- self .short_step = False
1221- more_integration_needed = True
1222- else :
1223- # Next step is short cycle
1224- self .short_step = True
1225- return more_integration_needed
1226-
1227- def _run_postprocess (self ):
1210+ def _run_nav_data_decoding (self ):
12281211 """
12291212 Run GLO L1 coherent integration postprocessing.
12301213 Runs navigation bit sync decoding operation and
12311214 GLO L1 to GLO L2 handover.
12321215 """
12331216
1234- # Handover to L2C if possible
1217+ # Handover to L2 if possible
12351218 if self .glol2_handover and not self .glol2_handover_acq and \
12361219 glo_constants .GLO_L2 in self .samples and \
12371220 'samples' in self .samples [glo_constants .GLO_L2 ]: # and sync:
0 commit comments