aboutsummaryrefslogtreecommitdiffstats
path: root/op25
diff options
context:
space:
mode:
authorMax <ikj1234i@yahoo.com>2017-10-11 14:59:24 -0400
committerMax <ikj1234i@yahoo.com>2017-10-11 14:59:24 -0400
commit37f2c3bbfc09bca304236b98bec1e85ea3e15c18 (patch)
tree29e7d0bcb1fc040a23f91c599af7cd961a69bfc4 /op25
parent68476ab6c1001702192f93f2abcfed11fdb47bd2 (diff)
modulator filter updates
Diffstat (limited to 'op25')
-rw-r--r--op25/gr-op25_repeater/apps/tx/dv_tx.py5
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py10
2 files changed, 12 insertions, 3 deletions
diff --git a/op25/gr-op25_repeater/apps/tx/dv_tx.py b/op25/gr-op25_repeater/apps/tx/dv_tx.py
index e350e93..0520e14 100644
--- a/op25/gr-op25_repeater/apps/tx/dv_tx.py
+++ b/op25/gr-op25_repeater/apps/tx/dv_tx.py
@@ -124,6 +124,7 @@ class my_top_block(gr.top_block):
DMR = op25_repeater.dmr_bs_tx_bb(options.verbose, options.config_file)
self.connect(ENCODER, (DMR, 0))
self.connect(ENCODER2, (DMR, 1))
+ rc = 'rrc'
elif options.protocol == 'dstar':
ENCODER = op25_repeater.dstar_tx_sb(options.verbose, options.config_file)
elif options.protocol == 'p25':
@@ -133,8 +134,10 @@ class my_top_block(gr.top_block):
"", # udp ip address
0, # udp port
False) # dump raw u vectors
+ rc = 'rc'
elif options.protocol == 'ysf':
ENCODER = op25_repeater.ysf_tx_sb(options.verbose, options.config_file, options.fullrate_mode)
+ rc = 'rrc'
nfiles = 0
if options.file1:
nfiles += 1
@@ -171,7 +174,7 @@ class my_top_block(gr.top_block):
if options.protocol == 'dstar':
MOD = p25_mod_bf(output_sample_rate = options.sample_rate, dstar = True, bt = options.bt)
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)
if options.output_file:
diff --git a/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py b/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
index d9c9de6..ace2be3 100755
--- a/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
+++ b/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
@@ -153,6 +153,7 @@ class p25_mod_bf(gr.hier_block2):
generator=transfer_function_tx,
dstar=False,
bt=_def_bt,
+ rc=None,
log=_def_log):
"""
Hierarchical block for RRC-filtered P25 FM modulation.
@@ -198,9 +199,14 @@ class p25_mod_bf(gr.hier_block2):
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()
- else:
+ elif not rc:
coeffs = c4fm_taps(sample_rate=output_sample_rate, generator=self.generator).generate()
self.filter = filter.interp_fir_filter_fff(self._interp_factor, coeffs)