Cleanup only. No functional changes.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6373 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Steven Franke 2016-01-09 15:27:16 +00:00
parent 9765c2970e
commit 500ff59ce9

View File

@ -32,11 +32,9 @@ void ftrsd2_(int mrsym[], int mrprob[], int mr2sym[], int mr2prob[],
int indexes[63]; int indexes[63];
int era_pos[51]; int era_pos[51];
int i, j, numera, nerr, nn=63; int i, j, numera, nerr, nn=63;
FILE *logfile = NULL;
int ntrials = *ntrials0; int ntrials = *ntrials0;
int verbose = 0;
int nhard=0,nhard_min=32768,nsoft=0,nsoft_min=32768; int nhard=0,nhard_min=32768,nsoft=0,nsoft_min=32768;
int nsofter=0,nsofter_min=32768,ntotal=0,ntotal_min=32768,ncandidates; int ntotal=0,ntotal_min=32768,ncandidates;
int nera_best=0; int nera_best=0;
float pp,pp1,pp2; float pp,pp1,pp2;
static unsigned int nseed; static unsigned int nseed;
@ -52,13 +50,6 @@ void ftrsd2_(int mrsym[], int mrprob[], int mr2sym[], int mr2prob[],
{32, 45, 54, 63, 66, 75, 78, 83}, {32, 45, 54, 63, 66, 75, 78, 83},
{51, 58, 57, 66, 72, 77, 82, 86}}; {51, 58, 57, 66, 72, 77, 82, 86}};
if(verbose) {
logfile=fopen("/tmp/ftrsd.log","a");
if( !logfile ) {
printf("Unable to open ftrsd.log\n");
exit(1);
}
}
// Initialize the KA9Q Reed-Solomon encoder/decoder // Initialize the KA9Q Reed-Solomon encoder/decoder
unsigned int symsize=6, gfpoly=0x43, fcr=3, prim=1, nroots=51; unsigned int symsize=6, gfpoly=0x43, fcr=3, prim=1, nroots=51;
@ -173,26 +164,21 @@ NB: j is the symbol-vector index of the symbol with rank i.
nerr=decode_rs_int(rs,workdat,era_pos,numera,0); nerr=decode_rs_int(rs,workdat,era_pos,numera,0);
if( nerr >= 0 ) { if( nerr >= 0 ) {
// We have a candidate coderowd. Find its hard and soft distance from // We have a candidate codeword. Find its hard and soft distance from
// the received word. Also find pp1 and pp2 from the full array // the received word. Also find pp1 and pp2 from the full array
// s3(64,63) of synchronized symbol spectra. // s3(64,63) of synchronized symbol spectra.
ncandidates=ncandidates+1; ncandidates=ncandidates+1;
nhard=0; nhard=0;
nsoft=0; nsoft=0;
nsofter=0;
for (i=0; i<63; i++) { for (i=0; i<63; i++) {
if(workdat[i] != rxdat[i]) { if(workdat[i] != rxdat[i]) {
nhard=nhard+1; nhard=nhard+1;
nsofter=nsofter+rxprob[i];
if(workdat[i] != rxdat2[i]) { if(workdat[i] != rxdat2[i]) {
nsoft=nsoft+rxprob[i]; nsoft=nsoft+rxprob[i];
} }
} else {
nsofter=nsofter-rxprob[i];
} }
} }
nsoft=63*nsoft/nsum; nsoft=63*nsoft/nsum;
nsofter=63*nsofter/nsum;
ntotal=nsoft+nhard; ntotal=nsoft+nhard;
getpp_(workdat,&pp); getpp_(workdat,&pp);
@ -201,7 +187,6 @@ NB: j is the symbol-vector index of the symbol with rank i.
pp1=pp; pp1=pp;
nsoft_min=nsoft; nsoft_min=nsoft;
nhard_min=nhard; nhard_min=nhard;
nsofter_min=nsofter;
ntotal_min=ntotal; ntotal_min=ntotal;
memcpy(correct,workdat,63*sizeof(int)); memcpy(correct,workdat,63*sizeof(int));
nera_best=numera; nera_best=numera;
@ -209,18 +194,11 @@ NB: j is the symbol-vector index of the symbol with rank i.
} else { } else {
if(pp>pp2 && pp!=pp1) pp2=pp; if(pp>pp2 && pp!=pp1) pp2=pp;
} }
// if(ntotal_min <= 81 && pp2/pp1 <= 0.87) break;
if(nhard_min <= 41 && ntotal_min <= 71) break; if(nhard_min <= 41 && ntotal_min <= 71) break;
} }
if(k == ntrials) ntry[0]=k; if(k == ntrials) ntry[0]=k;
} }
if(logfile) {
fprintf(logfile,"ncand %4d nhard %4d nsoft %4d nhard+nsoft %4d nsum %8d\n",
ncandidates,nhard_min,nsoft_min,ntotal_min,nsum);
fclose(logfile);
}
param[0]=ncandidates; param[0]=ncandidates;
param[1]=nhard_min; param[1]=nhard_min;
param[2]=nsoft_min; param[2]=nsoft_min;