mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 08:38:06 +08:00
recv: handle higher frequency drifts.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user