ГОСТ Р ИСО/МЭК 10373-6—2015
2
flag-locall«dor(envc,toutput,hlghrate_low,^crosses,env_length);
//Finds target
if {flag— 2)// ...rf there axe two occurrences, there’s no
problem...
I
tploone-crosses->time;// Temporary values are stored for
future use
tplotwo-crosses->slg->time;
vpl6two-crosses->sig->volt;
1
else If Iflag>2) // if there axe more than two occurrences...
I
/ / ...1’.
must ne checked that “peaks" comply the ISO
restnetrons
while (toutp-t|index_A2)<ctosses~>time II toutput[index_A2]— 0>
index_A2♦♦;
oscmir.-er.vc2[index_A21;
while <envc2[index_A21c-oscmin)
{
oscmrn-enve2|rndex_A2J;
mdex_A2+ •;
1
osct.mln-toutput.[ir.dex_A2];
crossescopy-crossea;
for <1-1; i<(flag-1>; i♦*)
erossescopy-erossescopy->srg;
».im3-ctossescopy->t.ime;
while ((outputlir.dcx_A2J<Lim3)
maex_A244;
озстах-envc2[index_A2|;
while (toutput|index_A2)<tim3>
f
it (oscmax<envc2[mdex_A2]>
j
0Scmax-envc2(index_A21;
osct.max-toutput(index A2);
1
iridex_A24♦;
)
if (o3cmax-oscmin>(0.09*(Hmax-oscmln)))
tprint£(staout,"Monotony not fulfilled \n">;
for <1-1; i<(flag-1); i**>
crosses-crosses->sig;
tploone-crosses->tirrie; //’temporaryvalues are stored for future use
tp
1
otwo-croases->aig->time;
vplotwo-crosses->Sig->volt;
1
reelis»(crosses);
highxate_hl-ninety‘0.1*minvolt;// Calculates target
flag-locaiisador<envc,toutput,hlghraCehr,acrosses2,eriv_iength);
//Fmds target
1Г (flag>-2)
Г
crosses_W0RK-crosses2;
while (x improveflag)
i
uf (crcsses_WORK->t-me<,.p-ocne)
77