0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 11:33:54 +01:00

correct dbr logic (according to the pira.cz's p275 manual)

This commit is contained in:
2025-04-19 10:05:50 +02:00
parent 6b98127edf
commit 779ee0ad6f

View File

@@ -1,11 +1,11 @@
#include "bs412.h" #include "bs412.h"
float dbr_to_deviation(float dbr) { float dbr_to_deviation(float dbr) {
return 19000.0f * powf(10.0f, dbr / 20.0f); return 19000.0f * powf(10.0f, dbr / 10.0f);
} }
float deviation_to_dbr(float deviation) { float deviation_to_dbr(float deviation) {
return 20 * log10f((deviation + 1e-6f) / 19000.0f); return 10 * log10f((deviation + 1e-6f) / 19000.0f);
} }
void init_modulation_power_measure(MPXPowerMeasurement* mpx, int sample_rate) { void init_modulation_power_measure(MPXPowerMeasurement* mpx, int sample_rate) {