recv: handle higher frequency drifts.

This commit is contained in:
Roman Zeyde
2015-01-13 18:37:31 +02:00
parent 9dbfcaa870
commit 04b0142955
2 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ class Receiver(object):
self.omegas = 2 * np.pi * self.frequencies / config.Fs
self.Nsym = config.Nsym
self.Tsym = config.Tsym
self.iters_per_update = config.baud # update sampler once per second
self.iters_per_update = 100 # [ms]
self.modem_bitrate = config.modem_bps
self.equalizer = equalizer.Equalizer(config)
self.carrier_index = config.carrier_index
@@ -164,7 +164,7 @@ class Receiver(object):
freq_err = self._prefix(symbols, gain=gain)
sampler.freq -= freq_err
filt = self._train(sampler, order=11, lookahead=6)
filt = self._train(sampler, order=11, lookahead=11)
sampler.equalizer = lambda x: list(filt(x))
bitstream = self._demodulate(sampler, symbols)

View File

@@ -68,8 +68,8 @@ def test_error():
run(1024, chan=lambda x: x[:-skip], success=False)
@pytest.fixture(params=[sign * drift for sign in (+1, -1)
for drift in (0.1, 1, 10, 100)])
@pytest.fixture(params=[sign * (10.0 ** exp) for sign in (+1, -1)
for exp in (-1, 0, 1, 2, 3)])
def freq_err(request):
return request.param * 1e-6