mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-20 22:08:07 +00:00
Move Transceiver::detectBurst() to sigProcLib to make it reusable.
Change-Id: I3cbe8e6e4f39dde02c945e6c9086c040e276845c
This commit is contained in:
@@ -1925,6 +1925,38 @@ int detectEdgeBurst(signalVector &burst, unsigned tsc, float threshold,
|
||||
return rc;
|
||||
}
|
||||
|
||||
int detectAnyBurst(signalVector &burst, unsigned tsc, float threshold,
|
||||
int sps, CorrType type, complex &, float &toa,
|
||||
unsigned max_toa)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
switch (type) {
|
||||
case EDGE:
|
||||
rc = detectEdgeBurst(burst, tsc, threshold, sps,
|
||||
amp, toa, max_toa);
|
||||
if (rc > 0)
|
||||
break;
|
||||
else
|
||||
type = TSC;
|
||||
case TSC:
|
||||
rc = analyzeTrafficBurst(burst, tsc, threshold, sps,
|
||||
amp, toa, max_toa);
|
||||
break;
|
||||
case RACH:
|
||||
rc = detectRACHBurst(burst, threshold, sps, amp, toa,
|
||||
max_toa);
|
||||
break;
|
||||
default:
|
||||
LOG(ERR) << "Invalid correlation type";
|
||||
}
|
||||
|
||||
if (rc > 0)
|
||||
return type;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
signalVector *downsampleBurst(signalVector &burst)
|
||||
{
|
||||
signalVector *in, *out;
|
||||
|
||||
Reference in New Issue
Block a user