From acd38708cc669b5c9b56b3d0563379726893f01e Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Tue, 31 May 2016 11:52:25 +0100 Subject: [PATCH] Fix a couple of places that refer to "noise floor". We measure the total power of everything we can't demodulate; that's not really the noise floor. --- stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stats.c b/stats.c index 1b97043..46ee2a7 100644 --- a/stats.c +++ b/stats.c @@ -90,7 +90,7 @@ void display_stats(struct stats *st) { printf(" %u accepted with %d-bit error repaired\n", st->demod_accepted[j], j); if (st->noise_power_sum > 0 && st->noise_power_count > 0) { - printf(" %.1f dBFS noise floor\n", + printf(" %.1f dBFS noise power\n", 10 * log10(st->noise_power_sum / st->noise_power_count)); } @@ -279,7 +279,7 @@ void add_stats(const struct stats *st1, const struct stats *st2, struct stats *t add_timespecs(&st1->reader_cpu, &st2->reader_cpu, &target->reader_cpu); add_timespecs(&st1->background_cpu, &st2->background_cpu, &target->background_cpu); - // noise floor: + // noise power: target->noise_power_sum = st1->noise_power_sum + st2->noise_power_sum; target->noise_power_count = st1->noise_power_count + st2->noise_power_count;