# HG changeset patch # User Daniele Nicolodi # Date 1350482081 -7200 # Node ID 0e4e0d7b6a22acc47cabe9274fb0029086caadc4 # Parent 6e73fb3d94fad730d99ebfa6a06fcff32c99ddd6 Do not suspend slope measurement for 5 cycles at each slope measurement interval diff -r 6e73fb3d94fa -r 0e4e0d7b6a22 FXAnalyse.c --- 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; }