From c708ee45ad9c24266f256d625573379be42aa1f3 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Fri, 11 May 2012 20:06:05 +0200 Subject: [PATCH] get smoothing factor from drate --- decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decode.c b/decode.c index 5881733..01dc10b 100644 --- a/decode.c +++ b/decode.c @@ -121,7 +121,7 @@ int cal_header(float cnt_freq, float dat_freq, float drate) const float leader_tolerance = 0.3; static float dat_avg = 1900.0; - const float dat_a = 0.05; + const float dat_a = 1.0 / (drate * 0.00238 + 1.0); dat_avg = dat_a * dat_freq + (1.0 - dat_a) * dat_avg; static int break_ticks = 0;