Lines Matching defs:sp

475  * The station structure (sp) is used to acquire the minute pulse from
929 struct sync *sp, *rp;
1120 sp = &up->mitig[up->achan].wwv;
1121 sp->amp = sqrt(ciamp * ciamp + cqamp * cqamp) / SYNCYC;
1123 wwv_qrz(peer, sp, (int)(pp->fudgetime1 * WWV_SEC));
1204 sp = up->sptr;
1205 if (sp->metric >= TTHR && epoch == sp->mepoch % WWV_SEC)
1207 up->rsec = (60 - sp->mepoch / WWV_SEC) % 60;
1297 struct sync *sp, /* sync channel structure */
1317 if (sp->amp > sp->maxeng) {
1318 sp->maxeng = sp->amp;
1319 sp->pos = epoch;
1321 sp->noieng += sp->amp;
1331 sp->synmax = sp->maxeng;
1332 sp->synsnr = wwv_snr(sp->synmax, (sp->noieng -
1333 sp->synmax) / WWV_MIN);
1334 if (sp->count == 0)
1335 sp->lastpos = sp->pos;
1336 epoch = (sp->pos - sp->lastpos) % WWV_MIN;
1337 sp->reach <<= 1;
1338 if (sp->reach & (1 << AMAX))
1339 sp->count--;
1340 if (sp->synmax > ATHR && sp->synsnr > ASNR) {
1342 sp->reach |= 1;
1343 sp->count++;
1344 sp->mepoch = sp->lastpos = sp->pos;
1345 } else if (sp->count == 1) {
1346 sp->lastpos = sp->pos;
1350 sp->metric = 0;
1352 sp->metric = wwv_metric(sp);
1356 up->status, up->gain, sp->refid,
1357 sp->reach & 0xffff, sp->metric, sp->synmax,
1358 sp->synsnr, sp->pos % WWV_SEC, epoch);
1365 sp->maxeng = sp->noieng = 0;
1757 struct sync *sp, *rp;
1832 sp = &cp->wwv;
1833 sp->synsnr = wwv_snr(sp->synmax, sp->amp);
1834 sp->reach <<= 1;
1835 if (sp->reach & (1 << AMAX))
1836 sp->count--;
1837 if (sp->synmax >= QTHR && sp->synsnr >= QSNR &&
1839 sp->reach |= 1;
1840 sp->count++;
1842 sp->metric = wwv_metric(sp);
1864 sp->refid, sp->reach & 0xffff,
1865 sp->metric, sp->synmax, sp->synsnr,
2401 struct sync *sp, *rp;
2412 sp = NULL;
2420 sp = rp;
2427 sp = rp;
2450 up->sptr = sp;
2451 memcpy(&pp->refid, sp->refid, 4);
2454 if (sp->select & SELV) {
2457 } else if (sp->select & SELH) {
2543 struct sync *sp /* station pointer */
2548 dtemp = sp->count * MAXAMP;
2549 if (sp->synmax < MAXAMP)
2550 dtemp += sp->synmax;
2622 struct sync *sp;
2653 sp = up->sptr;
2655 up->watch, up->mitig[up->dchan].gain, sp->refid,
2656 sp->metric, up->errcnt, up->freq / WWV_SEC * 1e6,