mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-04-20 21:26:30 +08:00
ggwave : should improve recall success rate
especially for "fastest" protocols
This commit is contained in:
@@ -792,7 +792,9 @@ void GGWave::decode(const CBWaveformInp & cbWaveformInp) {
|
|||||||
|
|
||||||
m_framesToAnalyze = m_nMarkerFrames*stepsPerFrame;
|
m_framesToAnalyze = m_nMarkerFrames*stepsPerFrame;
|
||||||
m_framesLeftToAnalyze = m_framesToAnalyze;
|
m_framesLeftToAnalyze = m_framesToAnalyze;
|
||||||
for (int ii = m_nMarkerFrames*stepsPerFrame - 1; ii >= m_nMarkerFrames*stepsPerFrame/2; --ii) {
|
|
||||||
|
// note : not sure if looping backwards here is more meaningful than looping forwards
|
||||||
|
for (int ii = m_nMarkerFrames*stepsPerFrame - 1; ii >= 0; --ii) {
|
||||||
bool knownLength = false;
|
bool knownLength = false;
|
||||||
|
|
||||||
const int offsetStart = ii;
|
const int offsetStart = ii;
|
||||||
@@ -806,7 +808,7 @@ void GGWave::decode(const CBWaveformInp & cbWaveformInp) {
|
|||||||
m_recordedAmplitude.begin() + offsetTx*step,
|
m_recordedAmplitude.begin() + offsetTx*step,
|
||||||
m_recordedAmplitude.begin() + offsetTx*step + m_samplesPerFrame, m_fftInp.data());
|
m_recordedAmplitude.begin() + offsetTx*step + m_samplesPerFrame, m_fftInp.data());
|
||||||
|
|
||||||
for (int k = 1; k < rxProtocol.framesPerTx - 1; ++k) {
|
for (int k = 1; k < rxProtocol.framesPerTx; ++k) {
|
||||||
for (int i = 0; i < m_samplesPerFrame; ++i) {
|
for (int i = 0; i < m_samplesPerFrame; ++i) {
|
||||||
m_fftInp[i] += m_recordedAmplitude[(offsetTx + k*stepsPerFrame)*step + i];
|
m_fftInp[i] += m_recordedAmplitude[(offsetTx + k*stepsPerFrame)*step + i];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user