Subversion Repositories svnkaklik

Rev

Rev 649 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 649 Rev 650
Line 368... Line 368...
368
        correlationr[n]=abs(r);
368
        correlationr[n]=abs(r);
369
    }
369
    }
370
 
370
 
371
    m=0;
371
    m=0;
372
    printf("Building echo map\n");		// compute map from left and right correlation data
372
    printf("Building echo map\n");		// compute map from left and right correlation data
373
	for (i=0;i < period_size; i+=10)
373
	for (i=0;i < period_size; i++)
374
	{
374
	{
375
		a=k*i;
375
		a=k*i;
376
		for(j=0;j < period_size; j+=10)
376
		for(j=0;j < period_size; j++)
377
		{
377
		{
378
			b=k*j;
378
			b=k*j;
379
			echo_map[m]=(-a*a+b*b+Xl*Xl+Xr*Xr)/(2*Xl-2*Xr);
379
			echo_map[m]=(-a*a+b*b+Xl*Xl+Xr*Xr)/(2*Xl-2*Xr);
380
			echo_map[m+1]=sqrt((a-b-Xl-Xr)*(a+b+Xl+Xr)*(a-b-Xl+Xr)*(a-b-Xl+Xr)*(a+b-Xl+Xr))/(-2*(Xl-Xr));
380
			echo_map[m+1]=sqrt((a-b-Xl-Xr)*(a+b+Xl+Xr)*(a-b-Xl+Xr)*(a-b-Xl+Xr)*(a+b-Xl+Xr))/(-2*(Xl-Xr));
381
			echo_map[m+2]=correlationl[i]*correlationr[j];
381
			echo_map[m+2]=correlationl[i]*correlationr[j];