1818from peregrine .log import default_logging_config
1919from peregrine .tracking import Tracker
2020from peregrine .gps_constants import L1CA , L2C
21- from peregrine .glo_constants import GLO_L1 , GLO_L2
21+ from peregrine .glo_constants import GLO_L1 , GLO_L2 , glo_l1_step , glo_l2_step
2222from peregrine .run import populate_peregrine_cmd_line_arguments
2323
2424
@@ -41,9 +41,9 @@ def main():
4141 help = "carrier Doppler frequency [Hz]. " )
4242
4343 signalParam .add_argument ("-S" , "--signal" ,
44- choices = [L1CA , L2C ],
44+ choices = [L1CA , L2C , GLO_L1 , GLO_L2 ],
4545 metavar = 'BAND' ,
46- help = "Signal type (l1ca / l2c)" )
46+ help = "Signal type (l1ca, l2c, glo_l1, glo_l2 )" )
4747 signalParam .add_argument ("--l2c-handover" ,
4848 action = 'store_true' ,
4949 help = "Perform L2C handover" ,
@@ -79,13 +79,25 @@ def main():
7979
8080 isL1CA = (args .signal == L1CA )
8181 isL2C = (args .signal == L2C )
82+ isGLO_L1 = (args .signal == GLO_L1 )
83+ isGLO_L2 = (args .signal == GLO_L2 )
8284
8385 if isL1CA :
8486 signal = L1CA
8587 IF = freq_profile ['GPS_L1_IF' ]
88+ prn = int (args .prn ) - 1
8689 elif isL2C :
8790 signal = L2C
8891 IF = freq_profile ['GPS_L2_IF' ]
92+ prn = int (args .prn ) - 1
93+ elif isGLO_L1 :
94+ signal = GLO_L1
95+ IF = freq_profile ['GLO_L1_IF' ] + glo_l1_step * int (args .prn )
96+ prn = int (args .prn )
97+ elif isGLO_L2 :
98+ signal = GLO_L2
99+ IF = freq_profile ['GLO_L2_IF' ] + glo_l2_step * int (args .prn )
100+ prn = int (args .prn )
89101 else :
90102 raise NotImplementedError ()
91103
@@ -98,7 +110,6 @@ def main():
98110
99111 carr_doppler = float (args .carr_doppler )
100112 code_phase = float (args .code_phase )
101- prn = int (args .prn ) - 1
102113
103114 ms_to_process = int (args .ms_to_process )
104115
@@ -148,8 +159,10 @@ def main():
148159 print "File format: %s" % args .file_format
149160 print "PRN to track [1-32]: %s" % args .prn
150161 print "Time to process [s]: %s" % (ms_to_process / 1e3 )
151- print "L1 IF [Hz]: %f" % freq_profile ['GPS_L1_IF' ]
152- print "L2 IF [Hz]: %f" % freq_profile ['GPS_L2_IF' ]
162+ print "GPS L1 IF [Hz]: %f" % freq_profile ['GPS_L1_IF' ]
163+ print "GPS L2 IF [Hz]: %f" % freq_profile ['GPS_L2_IF' ]
164+ print "GLO L1 IF [Hz]: %f" % freq_profile ['GLO_L1_IF' ]
165+ print "GLO L2 IF [Hz]: %f" % freq_profile ['GLO_L2_IF' ]
153166 print "Sampling frequency [Hz]: %f" % sampling_freq
154167 print "Initial carrier Doppler frequency [Hz]: %s" % carr_doppler
155168 print "Initial code phase [chips]: %s" % code_phase
0 commit comments