mirror of
https://github.com/jhshi/openofdm.git
synced 2025-05-28 13:14:21 +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
|
||||
None if no packet was detected.
|
||||
"""
|
||||
lts = LONG_PREAMBLE[64:64+64]
|
||||
peaks = np.array([abs(c) for c in np.convolve(
|
||||
samples, LONG_PREAMBLE[32:96], mode='same')]).argsort()[-2:]
|
||||
if (max(peaks) - min(peaks) == 64) and (min(peaks) - 64 - 160) > 0:
|
||||
return min(peaks) - 64 - 160
|
||||
samples, lts, mode='same')]).argsort()[-2:]
|
||||
if (max(peaks) - min(peaks) == 64) and (min(peaks) - 33 - 160) > 0:
|
||||
return min(peaks) - 33 - 160
|
||||
else:
|
||||
return None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user