Skip to content

Commit

Permalink
Sinple high pass on accumulated signal
Browse files Browse the repository at this point in the history
Moving avarage filter
  • Loading branch information
melkercarlsson123 authored Aug 1, 2024
1 parent aab84ad commit d66b43a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dsp/mimo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ void MIMOWorker::update() {
count++;
}
float power = 0.0;
for (int i = 0; i < N_SAMPLES; i++) {
power += powf(out[i], 2);
for (int i = 1; i < N_SAMPLES-1 ; i++){
float MA = out[i] * 0.5f - 0.25f*(out[i +1] + out[i -1]);
power += powf(MA, 2);
}

power /= static_cast<float>(N_SAMPLES * count);
Expand All @@ -140,4 +141,4 @@ void MIMOWorker::update() {

powerdB[m] = power;
}
}
}

0 comments on commit d66b43a

Please sign in to comment.