1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

ChirpChat demod: optimize SFD detection

This commit is contained in:
f4exb 2024-04-05 14:43:17 +02:00
parent 788df1eda3
commit 1691a3dfb3

View File

@ -286,8 +286,10 @@ void ChirpChatDemodSink::processSample(const Complex& ci)
m_preambleHistory[m_chirpCount] = imax;
m_chirpCount++;
double preDrop = magsqPre - magsqSFD;
double dropRatio = -preDrop / magsqSFD;
if (magsqPre < magsqSFD) // preamble drop
if ((preDrop < 0.0) && (dropRatio > 0.5)) // preamble drop
{
m_magsqTotalAvg(magsqSFDTotal);