Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 650 → Rev 651

/programy/C/ix86/echo/SW/signal.gp
1,5 → 1,5
!./sonar/src/sonar
set pm3d map
set pm3d
#set parametric
set palette gray
#set size 1,1
10,6 → 10,6
set key off
#set ytics 1e9
 
splot "/tmp/plane_cut.txt"
pause 1
reread
splot "/tmp/plane_cut.txt" using 1:2:3 with lines
#pause 1
#reread
/programy/C/ix86/echo/SW/sonar/src/sonar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programy/C/ix86/echo/SW/sonar/src/sonar.c
354,7 → 354,7
j+=2;
}
 
printf("\nData transmitted \ncorrelating\n");
printf("\nChirp transmitted \ncorrelating\n");
for (n=0; n < (period_size - chirp_size - 1); n++)
{
l=0;
376,10 → 376,13
for(j=0;j < period_size; j++)
{
b=k*j;
echo_map[m]=(-a*a+b*b+Xl*Xl+Xr*Xr)/(2*Xl-2*Xr);
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));
echo_map[m+2]=correlationl[i]*correlationr[j];
m+=3;
if( (b+a) >= (Xr-Xl))
{
echo_map[m]=a; ///(-a*a+b*b+Xl*Xl+Xr*Xr)/(2*Xl-2*Xr);
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)*(Xl-Xr));
echo_map[m+2]=correlationl[i]+correlationr[j];
m+=3;
}
}
}
printf("Searching echos\n");
419,10 → 422,10
fclose(out);
 
j=0;
out=fopen("/tmp/plane_cut.txt","w"); // writes plane cut - e.g. density map to file
out=fopen("/tmp/plane_cut.txt","w"); // writes echo_map - e.g. density map to file
for (i=0;i < period_size*period_size/100; i++)
{
fprintf(out,"%3.3f %3.3f %3.3f\n", echo_map[j], echo_map[j+1], echo_map[j+2]);
fprintf(out,"% 4.3f %4.3f %6.3f\n", echo_map[j], echo_map[j+1], echo_map[j+2]);
j+=3;
}
fclose(out);