mirror of
https://github.com/jhshi/openofdm.git
synced 2025-05-31 22:50:51 +00:00
fix lts index
This commit is contained in:
parent
20279b42a4
commit
c4c81b2766
@ -460,10 +460,11 @@ class Decoder(object):
|
|||||||
Returns the index of the first sample of STS
|
Returns the index of the first sample of STS
|
||||||
None if no packet was detected.
|
None if no packet was detected.
|
||||||
"""
|
"""
|
||||||
|
lts = LONG_PREAMBLE[64:64+64]
|
||||||
peaks = np.array([abs(c) for c in np.convolve(
|
peaks = np.array([abs(c) for c in np.convolve(
|
||||||
samples, LONG_PREAMBLE[32:96], mode='same')]).argsort()[-2:]
|
samples, lts, mode='same')]).argsort()[-2:]
|
||||||
if (max(peaks) - min(peaks) == 64) and (min(peaks) - 64 - 160) > 0:
|
if (max(peaks) - min(peaks) == 64) and (min(peaks) - 33 - 160) > 0:
|
||||||
return min(peaks) - 64 - 160
|
return min(peaks) - 33 - 160
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user