Print more sensible output for SNR.

This commit is contained in:
Themaister 2012-10-31 00:03:15 +01:00
parent ff9167f56b
commit 50d6080af5

View File

@ -298,14 +298,13 @@ int main(int argc, char *argv[])
struct snr_result res;
calculate_snr(&res, freq, in_rate / 2, output + fft_samples, butterfly_buf, fft_samples);
//printf("SNR @ w = %5.3f : %6.2lf dB, Gain: %6.1lf dB\n",
// freq_list[i], res.snr, res.gain);
printf("%.3f,%.2lf,%.1lf\n", freq_list[i], res.snr, res.gain);
printf("SNR @ w = %5.3f : %6.2lf dB, Gain: %6.1lf dB\n",
freq_list[i], res.snr, res.gain);
//printf("\tAliases: #1 (w = %5.3f, %6.2lf dB), #2 (w = %5.3f, %6.2lf dB), #3 (w = %5.3f, %6.2lf dB)\n",
// res.alias_freq[0] / (float)in_rate, res.alias_power[0],
// res.alias_freq[1] / (float)in_rate, res.alias_power[1],
// res.alias_freq[2] / (float)in_rate, res.alias_power[2]);
printf("\tAliases: #1 (w = %5.3f, %6.2lf dB), #2 (w = %5.3f, %6.2lf dB), #3 (w = %5.3f, %6.2lf dB)\n",
res.alias_freq[0] / (float)in_rate, res.alias_power[0],
res.alias_freq[1] / (float)in_rate, res.alias_power[1],
res.alias_freq[2] / (float)in_rate, res.alias_power[2]);
}
resampler_free(re);