ГОСТ Р ИСО/МЭК 10373-6—2015
/***
* */
/»** LSBI] - load modulation amplitude at fc -fs
•
***/
/*♦» return value: number of computed LMA *•*/
int Ndata;
int N_over;
int N_middle;
double *Y uc,’Y us,*Y lc,*Y ls;
double pa;
double sum
_
Wb-0;
double cf;
in*. SIidingLMA(double fc,int count,double vtimefl,double vd(),int lout,double LMA_
timed,double JSB[],double LSB[|)
f
double cl_real,cl_imag;
double cireal,с2_дтад;
double wO,wu,w
1
,dt;
double Wb;/* Bartlett window coefficient •/
m t A ,j,k -0 ;
/* Time window size*/
/’ Overlap */
/* Half window size */
t*
Phase lactors */
/* pi-3.1-1
___
*/
/* Sum of Bartlett coeff. */
/* correction factor of the Bartlett window */
pi - (double)atari(1.0)*4; /’ calculate pi */
w0-(double)(fc’,2.0)’pi; t* carrier U.bfe MHz •/
wu-(double)(1.0*1.O/lfc.O)’w0; 1* upper Sideband 14.41 MHz *1
wl-(double)(1.0-1.0/lt.0;’w0; /* lower Sideband 12.71 MHz */
/«*«***«*** Time wintSow *♦***♦***♦***♦*********♦*♦*♦*************♦***♦***♦***♦***♦*/
dt-vtime[21-vtrme[l
1
; /* Note: (vtimejil-vtime|1}) дз the scope sampling rate «/
K data-(mt) (0.5*2*li.OF/rtt/tc); /* Number of samples for two subcamer petioas */
Nmiodie-(,nt) (0.5*N_aata/2);
Nover-(mt) (0.Ь-»1.0/dt/fc); /* Overlap of 1/fc «/
/««**««« Ajiocdte memory •♦♦**********♦♦**♦♦**♦♦**♦♦**♦♦**♦♦**♦♦**♦♦**♦♦**♦♦*♦♦♦**
/
Yuc-(double *) malloc(N
_
aata * здгеоГ(double));
i f (Yuc — NULL)
<
print! <"Cannot, allocate memory");
return 0;
t
Yus-(double ’) m alloc(N data * sizeof(double));
i f (Yus - - NULL)
\
print!(“Cannot allocate memory");
free(Yuc);
return 0;
I
Ylc-(double *) malloc(Ndata * sizeof(double));
if (Ylc — NULL)
<
prInt.f(“Cannot allocate memory");
tree(Yuc); Iree(Yus);
return 0;
I
Yls-(double ’) malloc(N_data * sizeot(double)>;
it (Yls — NULL)
i
piintf)"Cannot allocate memory");
Iree(Yuc); rree(Yus); Iree(Ylc);
return 0;