mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 03:23:54 +01:00
correct dbr logic (according to the pira.cz's p275 manual)
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user