//----------------------------------------------------------------------------- void RxSim::process() { NavFramer nf; long int dataPoint =0; int count = 0; nf.debugLevel = debugLevel; nf.dump(cout); complex<float> s; int b=0; while (*input >> s) { if (b == band-1 || input->bands==1) { s *= gain; if (tr->process(s)) { if (verboseLevel) tr->dump(cout); // Test code to skip input to speed up tracking. /*int count2 = 0; while(count2 < 3*16367) { count2++; *input >> s; }*/ // Following two if statements are specific to tracker updating every // 1 ms. if(tr->navChange) { nf.process(*tr, dataPoint, (float)tr->localReplica.getCodePhaseOffsetSec()*1e6); count = 0; } if(count == 20) { count = 0; nf.process(*tr, dataPoint, (float)tr->localReplica.getCodePhaseOffsetSec()*1e6); } count++; } } b++; b %= input->bands; if (cc->localTime > timeLimit) break; dataPoint++; } }
void *Cfunction(void* p) { Par *par = (Par*)p; EMLTracker *tr = par->tr; int *count = par->count; NavFramer *nf = par->nf; int bufferSize = par->bufferSize; int dp = par->dp - bufferSize; Buffer *b = par->s; bool v = par->v; int index = 0; while(index < bufferSize + 1) // number of data points to track before join. { if (tr->process(b->arr[index])) { if(v) tr->dump(cout); if(tr->navChange) { nf->process(*tr, dp, (float)tr->localReplica.getCodePhaseOffsetSec()*1e6); *count = 0; } if(*count == 20) // The *20* depends on the tracker updating every C/A period. { *count = 0; nf->process(*tr, dp, (float)tr->localReplica.getCodePhaseOffsetSec()*1e6); } *count = *count + 1; } index++; dp++; } pthread_exit(NULL); return NULL; }