mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 19:23:51 +01:00
update algorithm
This commit is contained in:
2
.vscode/.server-controller-port.log
vendored
2
.vscode/.server-controller-port.log
vendored
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"port": 13452,
|
||||
"time": 1743269976272,
|
||||
"time": 1743282530729,
|
||||
"version": "0.0.3"
|
||||
}
|
||||
@@ -7,7 +7,7 @@ void init_modulation_power_measure(MPXPowerMeasurement* mpx, int sample_rate) {
|
||||
}
|
||||
|
||||
float measure_mpx(MPXPowerMeasurement* mpx, int deviation) {
|
||||
mpx->sample += 10*log10f(deviation/19000.0f);
|
||||
mpx->sample += 20*log10f(deviation/19000.0f);
|
||||
|
||||
float modulation_power = mpx->sample/mpx->i;
|
||||
|
||||
@@ -19,9 +19,9 @@ float measure_mpx(MPXPowerMeasurement* mpx, int deviation) {
|
||||
}
|
||||
|
||||
float dbr_to_deviation(float dbr) {
|
||||
return 19000.0f * powf(10.0f, dbr / 10.0f);
|
||||
return 19000.0f * powf(10.0f, dbr / 20.0f);
|
||||
}
|
||||
|
||||
float deviation_to_dbr(float deviation) {
|
||||
return 10*log10f(deviation/19000.0f);
|
||||
return 20*log10f(deviation/19000.0f);
|
||||
}
|
||||
Reference in New Issue
Block a user