MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / pullRadioVector

Method pullRadioVector

Transceiver52M/Transceiver.cpp:326–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime,
327 int &RSSI,
328 int &timingOffset)
329{
330 bool needDFE = false;
331 bool success = false;
332 complex amplitude = 0.0;
333 float TOA = 0.0, avg = 0.0;
334
335 radioVector *rxBurst = (radioVector *) mReceiveFIFO->get();
336
337 if (!rxBurst) return NULL;
338
339 int timeslot = rxBurst->getTime().TN();
340
341 CorrType corrType = expectedCorrType(rxBurst->getTime());
342
343 if ((corrType==OFF) || (corrType==IDLE)) {
344 delete rxBurst;
345 return NULL;
346 }
347
348 signalVector *vectorBurst = rxBurst;
349
350 energyDetect(*vectorBurst, 20 * mSPSRx, 0.0, &avg);
351
352 // Update noise level
353 mNoiseLev = mNoises.avg();
354 avg = sqrt(avg);
355
356 // run the proper correlator
357 if (corrType==TSC) {
358 LOG(DEBUG) << "looking for TSC at time: " << rxBurst->getTime();
359 signalVector *channelResp;
360 double framesElapsed = rxBurst->getTime()-channelEstimateTime[timeslot];
361 bool estimateChannel = false;
362 if ((framesElapsed > 50) || (channelResponse[timeslot]==NULL)) {
363 if (channelResponse[timeslot]) delete channelResponse[timeslot];
364 if (DFEForward[timeslot]) delete DFEForward[timeslot];
365 if (DFEFeedback[timeslot]) delete DFEFeedback[timeslot];
366 channelResponse[timeslot] = NULL;
367 DFEForward[timeslot] = NULL;
368 DFEFeedback[timeslot] = NULL;
369 estimateChannel = true;
370 }
371 if (!needDFE) estimateChannel = false;
372 float chanOffset;
373 success = analyzeTrafficBurst(*vectorBurst,
374 mTSC,
375 5.0,
376 mSPSRx,
377 &amplitude,
378 &TOA,
379 mMaxExpectedDelay,
380 estimateChannel,
381 &channelResp,
382 &chanOffset);
383 if (success) {

Callers

nothing calls this directly

Calls 13

getTimeMethod · 0.80
avgMethod · 0.80
insertMethod · 0.80
energyDetectFunction · 0.70
analyzeTrafficBurstFunction · 0.70
scaleVectorFunction · 0.70
designDFEFunction · 0.70
detectRACHBurstFunction · 0.70
demodulateBurstFunction · 0.70
equalizeBurstFunction · 0.70
getMethod · 0.45
TNMethod · 0.45

Tested by

no test coverage detected