ГОСТ Р ИСО/МЭК 10373-6—2015
// Checks that there are (nearly} much positive as negative values
it (posval>negval)
dit fr-(posval-negval)/{(posvalmegval>/2);
else
diffr-(begval-posval)/{(posvalmegval)
/
2
);
if (diiir>0.8)
fprint £(atdout,"Data Corrupted: Too little negative (or positive)
value3\n">;
// L-n*p with P-2*pi and r.-l,2,3... - Cuts data
rewind (pointlile);
tead_line(pointhle, volt Str,tlinestr1>;
readline(pointMe,voltst r,timestr1);
read_line(point-tile,volt.str,timestrl);// Skips csv header it present or not
read_line(pointlile, volt.str,timeat rl>;
while (voltstr|0]!-’\0r>
I
read .me (pointlile,volts:r,
t
investr2);
loop*-г
)
loop-loOp*3;
rewind(poir.tMe) ;
lor <lind-0; lind<loop; lind»»)
1
read l-ne(pcmtllle,volt st.r,t-rr,esti2);
1
tlmestrfl-atoi<timestrl>;
// t<4)
tlmesttf2-at«i<t.lmeatr2);
// t(er.d)
e-tsample-<<1/13.Ьбеб)/((timestr12-t lmest.rf1)/(loop-1)>);
1in f-sampleap;
while (llr.X>0)
I
p
1mf-linf-cut samp.e;
1
1I.I*-cut sample;
sampleap-samplesp-linl-3;
1
// At Least *points pet sample
delta_t-tlast-timeatr 1;
val_t-delta_t/samplesp;
il 7val_t><1/13.Ьбеб)/7>
fprmtr(stdeut, "More samples points needed - Nyquist\n");
tetv.tr. (.«amplesp);
i
// Finds the most frequent value(s) o£ the g-ven Signal, Umax (Types A/В) and Hrr.in(Type
B) .
void Hmaxlmdei (double *env, double *Hn.ax, double *Нк..п, _nt nurr.samp.es)
ir.t hist(2001)-I0|;
1 1
IA Changed memory access violation. Increased »1
ir.t hi_low_i-0;
double tophist-0;
double bothist-lOO;
double difihiat.-O;
double vaiue-0;
ir.t hist.ir.d-0;
67