Mercurial > hg > fxanalyse
changeset 57:0e4e0d7b6a22
Do not suspend slope measurement for 5 cycles at each slope measurement interval
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Wed, 17 Oct 2012 15:54:41 +0200 |
parents | 6e73fb3d94fa |
children | 3a70e376f8c2 |
files | FXAnalyse.c |
diffstat | 1 files changed, 5 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/FXAnalyse.c Wed Oct 17 15:52:36 2012 +0200 +++ b/FXAnalyse.c Wed Oct 17 15:54:41 2012 +0200 @@ -109,7 +109,7 @@ double SlopeMeasuringTimeBegin = 0.0; double Slope_Math2slope=0.0,Math2_slope=0.0,Moy_Math2slope=0.0; -int N_Math2slope=0.0,nstabilisationSlopeMeasuring=0; +int N_Math2slope=0.0; double LimitToDelock=5.0; double limitotakoff=70.0; @@ -1239,14 +1239,10 @@ } // update slope measurement - if (nstabilisationSlopeMeasuring < 5) { - nstabilisationSlopeMeasuring += 1; - } else { - N_Math2slope = N_Math2slope + 1; - Math2_slope = currentFreq; - Moy_Math2slope = ((N_Math2slope-1)*Moy_Math2slope + Math2_slope)/N_Math2slope; - Slope_Math2slope = (Slope_Math2slope*(N_Math2slope-2) + 6*(Math2_slope-Moy_Math2slope)/N_Math2slope)/(N_Math2slope+1); - } + N_Math2slope = N_Math2slope + 1; + Math2_slope = currentFreq; + Moy_Math2slope = ((N_Math2slope-1)*Moy_Math2slope + Math2_slope)/N_Math2slope; + Slope_Math2slope = (Slope_Math2slope*(N_Math2slope-2) + 6*(Math2_slope-Moy_Math2slope)/N_Math2slope)/(N_Math2slope+1); // update applied slope if ((utc - SlopeMeasuringTimeBegin) > TimetoSlope) { @@ -1283,7 +1279,6 @@ Math2_slope = 0.0; Moy_Math2slope = 0.0; Slope_Math2slope = 0.0; - nstabilisationSlopeMeasuring = 0; SlopeMeasuringTimeBegin = utc; } } @@ -2246,8 +2241,6 @@ Slope_Math2slope = 0.0; CenterFrequencyCh2 = 0.0; Nratio = -1; - nstabilisationSlopeMeasuring = 0; - } break; }