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

bug is 100% related to bs412

This commit is contained in:
2025-05-31 11:51:26 +02:00
parent 82a74db8b1
commit 4fdb2dff0d
2 changed files with 2 additions and 9 deletions

View File

@@ -3,12 +3,12 @@
#define LOG2_19000 log2f(19000.0f)
inline float dbr_to_deviation(float dbr) {
return 19000.0f * powf(10.0f, dbr / 20.0f);
return 19000.0f * powf(2.0f, dbr * 0.332193f);
}
inline float deviation_to_dbr(float deviation) {
if(deviation == 0.0f) return -100.0f;
return 20.0f * (log2f(deviation) - LOG2_19000) * 0.30103f;
return 10.0f * (log2f(deviation) - LOG2_19000) * 0.30103f;
}
void init_modulation_power_measure(MPXPowerMeasurement* mpx, int sample_rate) {