modulator filter updates
This commit is contained in:
parent
68476ab6c1
commit
37f2c3bbfc
|
@ -124,6 +124,7 @@ class my_top_block(gr.top_block):
|
||||||
DMR = op25_repeater.dmr_bs_tx_bb(options.verbose, options.config_file)
|
DMR = op25_repeater.dmr_bs_tx_bb(options.verbose, options.config_file)
|
||||||
self.connect(ENCODER, (DMR, 0))
|
self.connect(ENCODER, (DMR, 0))
|
||||||
self.connect(ENCODER2, (DMR, 1))
|
self.connect(ENCODER2, (DMR, 1))
|
||||||
|
rc = 'rrc'
|
||||||
elif options.protocol == 'dstar':
|
elif options.protocol == 'dstar':
|
||||||
ENCODER = op25_repeater.dstar_tx_sb(options.verbose, options.config_file)
|
ENCODER = op25_repeater.dstar_tx_sb(options.verbose, options.config_file)
|
||||||
elif options.protocol == 'p25':
|
elif options.protocol == 'p25':
|
||||||
|
@ -133,8 +134,10 @@ class my_top_block(gr.top_block):
|
||||||
"", # udp ip address
|
"", # udp ip address
|
||||||
0, # udp port
|
0, # udp port
|
||||||
False) # dump raw u vectors
|
False) # dump raw u vectors
|
||||||
|
rc = 'rc'
|
||||||
elif options.protocol == 'ysf':
|
elif options.protocol == 'ysf':
|
||||||
ENCODER = op25_repeater.ysf_tx_sb(options.verbose, options.config_file, options.fullrate_mode)
|
ENCODER = op25_repeater.ysf_tx_sb(options.verbose, options.config_file, options.fullrate_mode)
|
||||||
|
rc = 'rrc'
|
||||||
nfiles = 0
|
nfiles = 0
|
||||||
if options.file1:
|
if options.file1:
|
||||||
nfiles += 1
|
nfiles += 1
|
||||||
|
@ -171,7 +174,7 @@ class my_top_block(gr.top_block):
|
||||||
if options.protocol == 'dstar':
|
if options.protocol == 'dstar':
|
||||||
MOD = p25_mod_bf(output_sample_rate = options.sample_rate, dstar = True, bt = options.bt)
|
MOD = p25_mod_bf(output_sample_rate = options.sample_rate, dstar = True, bt = options.bt)
|
||||||
else:
|
else:
|
||||||
MOD = p25_mod_bf(output_sample_rate = options.sample_rate, generator=generator)
|
MOD = p25_mod_bf(output_sample_rate = options.sample_rate, rc=rc)
|
||||||
AMP = blocks.multiply_const_ff(output_gain)
|
AMP = blocks.multiply_const_ff(output_gain)
|
||||||
|
|
||||||
if options.output_file:
|
if options.output_file:
|
||||||
|
|
|
@ -153,6 +153,7 @@ class p25_mod_bf(gr.hier_block2):
|
||||||
generator=transfer_function_tx,
|
generator=transfer_function_tx,
|
||||||
dstar=False,
|
dstar=False,
|
||||||
bt=_def_bt,
|
bt=_def_bt,
|
||||||
|
rc=None,
|
||||||
log=_def_log):
|
log=_def_log):
|
||||||
"""
|
"""
|
||||||
Hierarchical block for RRC-filtered P25 FM modulation.
|
Hierarchical block for RRC-filtered P25 FM modulation.
|
||||||
|
@ -198,9 +199,14 @@ class p25_mod_bf(gr.hier_block2):
|
||||||
|
|
||||||
self.generator = generator
|
self.generator = generator
|
||||||
|
|
||||||
if self.dstar:
|
assert rc is None or rc == 'rc' or rc == 'rrc'
|
||||||
|
if rc:
|
||||||
|
coeffs = filter.firdes.root_raised_cosine(1.0, output_sample_rate, input_sample_rate, 0.2, 91)
|
||||||
|
if rc == 'rc':
|
||||||
|
coeffs = np.convolve(coeffs, coeffs)
|
||||||
|
elif self.dstar:
|
||||||
coeffs = gmsk_taps(sample_rate=output_sample_rate, bt=self.bt).generate()
|
coeffs = gmsk_taps(sample_rate=output_sample_rate, bt=self.bt).generate()
|
||||||
else:
|
elif not rc:
|
||||||
coeffs = c4fm_taps(sample_rate=output_sample_rate, generator=self.generator).generate()
|
coeffs = c4fm_taps(sample_rate=output_sample_rate, generator=self.generator).generate()
|
||||||
self.filter = filter.interp_fir_filter_fff(self._interp_factor, coeffs)
|
self.filter = filter.interp_fir_filter_fff(self._interp_factor, coeffs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue