recv: quantize phase on {1,i,-1,-i}

This commit is contained in:
Roman Zeyde
2014-08-14 21:19:46 +03:00
parent ed6022ccd8
commit 65200d1038

View File

@@ -115,7 +115,8 @@ def receive_prefix(symbols):
last_phase = a * indices[-1] + b
log.debug('Current phase on carrier: %.3f', last_phase)
expected_phase, = set(np.angle(sliced[nonzeros]) / (2 * np.pi))
angle = np.mean(np.angle(S[nonzeros]))
expected_phase = round(angle / (0.5*np.pi)) * 0.25
log.debug('Excepted phase on carrier: %.3f', expected_phase)
sampling_err = (last_phase - expected_phase) * config.Nsym