mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-30 05:12:26 -04:00
New scheme - first pass is same as stock wsprd with blocksize=1; second pass tries blocksizes {1,2,3}. Drift estimation is turned off on second pass for smaller frequency estimate variance.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8404 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
b27f51bbe3
commit
9f9932b560
@ -748,7 +748,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
struct result { char date[7]; char time[5]; float sync; float snr;
|
struct result { char date[7]; char time[5]; float sync; float snr;
|
||||||
float dt; double freq; char message[23]; float drift;
|
float dt; double freq; char message[23]; float drift;
|
||||||
unsigned int cycles; int jitter; int blocksize};
|
unsigned int cycles; int jitter; int blocksize; unsigned int metric};
|
||||||
struct result decodes[50];
|
struct result decodes[50];
|
||||||
|
|
||||||
char *hashtab;
|
char *hashtab;
|
||||||
@ -771,12 +771,10 @@ int main(int argc, char *argv[])
|
|||||||
// Parameters used for performance-tuning:
|
// Parameters used for performance-tuning:
|
||||||
unsigned int maxcycles=10000; //Decoder timeout limit
|
unsigned int maxcycles=10000; //Decoder timeout limit
|
||||||
float minsync1=0.10; //First sync limit
|
float minsync1=0.10; //First sync limit
|
||||||
// float minsync2=0.12; //Second sync limit
|
float minsync2=0.12; //Second sync limit
|
||||||
float minsync2=0.10; //Second sync limit
|
|
||||||
int iifac=8; //Step size in final DT peakup
|
int iifac=8; //Step size in final DT peakup
|
||||||
int symfac=50; //Soft-symbol normalizing factor
|
int symfac=50; //Soft-symbol normalizing factor
|
||||||
// int maxdrift=4; //Maximum (+/-) drift
|
int maxdrift=4; //Maximum (+/-) drift
|
||||||
int maxdrift=0; //Maximum (+/-) drift
|
|
||||||
float minrms=52.0 * (symfac/64.0); //Final test for plausible decoding
|
float minrms=52.0 * (symfac/64.0); //Final test for plausible decoding
|
||||||
delta=60; //Fano threshold step
|
delta=60; //Fano threshold step
|
||||||
float bias=0.45; //Fano metric bias (used for both Fano and stack algorithms)
|
float bias=0.45; //Fano metric bias (used for both Fano and stack algorithms)
|
||||||
@ -795,7 +793,7 @@ int main(int argc, char *argv[])
|
|||||||
case 'a':
|
case 'a':
|
||||||
data_dir = optarg;
|
data_dir = optarg;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b': // not used at the moment - this is hardwired to 3 for 2nd pass
|
||||||
nblocksize=(int) atoi(optarg);
|
nblocksize=(int) atoi(optarg);
|
||||||
if( nblocksize < 1 || nblocksize > 3 ) {
|
if( nblocksize < 1 || nblocksize > 3 ) {
|
||||||
usage();
|
usage();
|
||||||
@ -960,9 +958,17 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//*************** main loop starts here *****************
|
//*************** main loop starts here *****************
|
||||||
for (ipass=0; ipass<npasses; ipass++) {
|
for (ipass=0; ipass<npasses; ipass++) {
|
||||||
|
if(ipass == 0) {
|
||||||
if( ipass > 0 && ndecodes_pass == 0 ) break;
|
nblocksize=1;
|
||||||
ndecodes_pass=0;
|
maxdrift=4;
|
||||||
|
minsync2=0.12;
|
||||||
|
}
|
||||||
|
if(ipass == 1 ) {
|
||||||
|
nblocksize=3; // try all blocksizes up to 3
|
||||||
|
maxdrift=0; // no drift for smaller frequency estimator variance
|
||||||
|
minsync2=0.10;
|
||||||
|
}
|
||||||
|
ndecodes_pass=0; // still needed?
|
||||||
|
|
||||||
memset(ps,0.0, sizeof(float)*512*nffts);
|
memset(ps,0.0, sizeof(float)*512*nffts);
|
||||||
for (i=0; i<nffts; i++) {
|
for (i=0; i<nffts; i++) {
|
||||||
@ -1198,7 +1204,7 @@ int main(int argc, char *argv[])
|
|||||||
sync_and_demodulate(idat, qdat, npoints, symbols, &f1, ifmin, ifmax, fstep, &shift1,
|
sync_and_demodulate(idat, qdat, npoints, symbols, &f1, ifmin, ifmax, fstep, &shift1,
|
||||||
lagmin, lagmax, lagstep, &drift1, symfac, &sync1, 1);
|
lagmin, lagmax, lagstep, &drift1, symfac, &sync1, 1);
|
||||||
|
|
||||||
if(0) {
|
if(ipass == 0) {
|
||||||
// refine drift estimate
|
// refine drift estimate
|
||||||
fstep=0.0; ifmin=0; ifmax=0;
|
fstep=0.0; ifmin=0; ifmax=0;
|
||||||
float driftp,driftm,syncp,syncm;
|
float driftp,driftm,syncp,syncm;
|
||||||
@ -1253,16 +1259,13 @@ while( ib <= nblocksize && not_decoded ) {
|
|||||||
if( idt%2 == 1 ) ii=-ii;
|
if( idt%2 == 1 ) ii=-ii;
|
||||||
ii=iifac*ii;
|
ii=iifac*ii;
|
||||||
jiggered_shift=shift1+ii;
|
jiggered_shift=shift1+ii;
|
||||||
|
|
||||||
// Use mode 2 to get soft-decision symbols
|
// Use mode 2 to get soft-decision symbols
|
||||||
t0 = clock();
|
t0 = clock();
|
||||||
// sync_and_demodulate(idat, qdat, npoints, symbols, &f1, ifmin, ifmax, fstep,
|
|
||||||
// &jiggered_shift, lagmin, lagmax, lagstep, &drift1, symfac,
|
|
||||||
// &sync1, 2);
|
|
||||||
tsync2 += (float)(clock()-t0)/CLOCKS_PER_SEC;
|
|
||||||
|
|
||||||
noncoherent_sequence_detection(idat, qdat, npoints, symbols, &f1,
|
noncoherent_sequence_detection(idat, qdat, npoints, symbols, &f1,
|
||||||
&jiggered_shift, &drift1, symfac,
|
&jiggered_shift, &drift1, symfac,
|
||||||
&sync1, &blocksize);
|
&sync1, &blocksize);
|
||||||
|
tsync2 += (float)(clock()-t0)/CLOCKS_PER_SEC;
|
||||||
|
|
||||||
sq=0.0;
|
sq=0.0;
|
||||||
for(i=0; i<162; i++) {
|
for(i=0; i<162; i++) {
|
||||||
@ -1291,6 +1294,7 @@ while( ib <= nblocksize && not_decoded ) {
|
|||||||
}
|
}
|
||||||
ib++;
|
ib++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( worth_a_try && !not_decoded ) {
|
if( worth_a_try && !not_decoded ) {
|
||||||
ndecodes_pass++;
|
ndecodes_pass++;
|
||||||
|
|
||||||
@ -1352,6 +1356,7 @@ ib++;
|
|||||||
decodes[uniques-1].cycles=cycles;
|
decodes[uniques-1].cycles=cycles;
|
||||||
decodes[uniques-1].jitter=ii;
|
decodes[uniques-1].jitter=ii;
|
||||||
decodes[uniques-1].blocksize=blocksize;
|
decodes[uniques-1].blocksize=blocksize;
|
||||||
|
decodes[uniques-1].metric=metric;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1383,11 +1388,11 @@ ib++;
|
|||||||
decodes[i].time, decodes[i].snr,decodes[i].dt, decodes[i].freq,
|
decodes[i].time, decodes[i].snr,decodes[i].dt, decodes[i].freq,
|
||||||
(int)decodes[i].drift, decodes[i].message);
|
(int)decodes[i].drift, decodes[i].message);
|
||||||
fprintf(fall_wspr,
|
fprintf(fall_wspr,
|
||||||
"%6s %4s %3d %3.0f %5.2f %11.7f %-22s %2d %5u %4d %4d\n",
|
"%6s %4s %3d %3.0f %5.2f %11.7f %-22s %2d %5u %4d %4d %4d\n",
|
||||||
decodes[i].date, decodes[i].time, (int)(10*decodes[i].sync),
|
decodes[i].date, decodes[i].time, (int)(10*decodes[i].sync),
|
||||||
decodes[i].snr, decodes[i].dt, decodes[i].freq,
|
decodes[i].snr, decodes[i].dt, decodes[i].freq,
|
||||||
decodes[i].message, (int)decodes[i].drift, decodes[i].cycles/81,
|
decodes[i].message, (int)decodes[i].drift, decodes[i].cycles/81,
|
||||||
decodes[i].jitter,decodes[i].blocksize);
|
decodes[i].jitter,decodes[i].blocksize,decodes[i].metric);
|
||||||
fprintf(fwsprd,
|
fprintf(fwsprd,
|
||||||
"%6s %4s %3d %3.0f %4.1f %10.6f %-22s %2d %5u %4d\n",
|
"%6s %4s %3d %3.0f %4.1f %10.6f %-22s %2d %5u %4d\n",
|
||||||
decodes[i].date, decodes[i].time, (int)(10*decodes[i].sync),
|
decodes[i].date, decodes[i].time, (int)(10*decodes[i].sync),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user