Measure mean signal level in the converters.

Rearrange the meaning of the measured power level to be consistent
with the signal level.
This commit is contained in:
Oliver Jowett 2016-11-12 14:07:58 +00:00
parent 8182dc9a8f
commit cc47718a2d
5 changed files with 79 additions and 37 deletions

View file

@ -360,7 +360,7 @@ void demodulate2400(struct mag_buf *mag)
/* update noise power */
{
double sum_signal_power = sum_scaled_signal_power / 65535.0 / 65535.0;
Modes.stats_current.noise_power_sum += (mag->total_power - sum_signal_power);
Modes.stats_current.noise_power_sum += (mag->mean_power * mag->length - sum_signal_power);
Modes.stats_current.noise_power_count += mag->length;
}
}