sigproc: Setup downlink bursts at 156.25 duration with 4 SPS
Instead of extending 156/157 symbol sized bursts to 624/628 when 4 samples-per-symbol are used, use a fixed size of 625 samples, or 625.25 us. This is a breaking timing change.
This commit is contained in:
parent
6512812e43
commit
2518186b45
|
@ -44,6 +44,9 @@ using namespace GSM;
|
||||||
/* Clipping detection threshold */
|
/* Clipping detection threshold */
|
||||||
#define CLIP_THRESH 30000.0f
|
#define CLIP_THRESH 30000.0f
|
||||||
|
|
||||||
|
/* GSM 4 sps burst length */
|
||||||
|
#define GSM_BURST_LEN_4SPS 625
|
||||||
|
|
||||||
/** Lookup tables for trigonometric approximation */
|
/** Lookup tables for trigonometric approximation */
|
||||||
float cosTable[TABLESIZE+1]; // add 1 element for wrap around
|
float cosTable[TABLESIZE+1]; // add 1 element for wrap around
|
||||||
float sinTable[TABLESIZE+1];
|
float sinTable[TABLESIZE+1];
|
||||||
|
@ -697,27 +700,22 @@ static signalVector *rotateBurst(const BitVector &wBurst,
|
||||||
return shaped;
|
return shaped;
|
||||||
}
|
}
|
||||||
|
|
||||||
static signalVector *modulateBurstLaurent(const BitVector &bits,
|
/*
|
||||||
int guard_len, int sps)
|
* Laurent decomposition based GMSK modulator - 4 SPS only
|
||||||
|
*/
|
||||||
|
static signalVector *modulateBurstLaurent(const BitVector &bits)
|
||||||
{
|
{
|
||||||
int burst_len;
|
const int burst_len = GSM_BURST_LEN_4SPS;
|
||||||
|
const int sps = 4;
|
||||||
|
|
||||||
float phase;
|
float phase;
|
||||||
signalVector *c0_pulse, *c1_pulse, *c0_burst;
|
signalVector *c0_pulse, *c1_pulse, *c0_burst;
|
||||||
signalVector *c1_burst, *c0_shaped, *c1_shaped;
|
signalVector *c1_burst, *c0_shaped, *c1_shaped;
|
||||||
signalVector::iterator c0_itr, c1_itr;
|
signalVector::iterator c0_itr, c1_itr;
|
||||||
|
|
||||||
/*
|
|
||||||
* Apply before and after bits to reduce phase error at burst edges.
|
|
||||||
* Make sure there is enough room in the burst to accomodate all bits.
|
|
||||||
*/
|
|
||||||
if (guard_len < 4)
|
|
||||||
guard_len = 4;
|
|
||||||
|
|
||||||
c0_pulse = GSMPulse->c0;
|
c0_pulse = GSMPulse->c0;
|
||||||
c1_pulse = GSMPulse->c1;
|
c1_pulse = GSMPulse->c1;
|
||||||
|
|
||||||
burst_len = sps * (bits.size() + guard_len);
|
|
||||||
|
|
||||||
c0_burst = new signalVector(burst_len, c0_pulse->size());
|
c0_burst = new signalVector(burst_len, c0_pulse->size());
|
||||||
c0_burst->isReal(true);
|
c0_burst->isReal(true);
|
||||||
c0_itr = c0_burst->begin();
|
c0_itr = c0_burst->begin();
|
||||||
|
@ -826,7 +824,7 @@ signalVector *modulateBurst(const BitVector &wBurst, int guardPeriodLength,
|
||||||
if (emptyPulse)
|
if (emptyPulse)
|
||||||
return rotateBurst(wBurst, guardPeriodLength, sps);
|
return rotateBurst(wBurst, guardPeriodLength, sps);
|
||||||
else if (sps == 4)
|
else if (sps == 4)
|
||||||
return modulateBurstLaurent(wBurst, guardPeriodLength, sps);
|
return modulateBurstLaurent(wBurst);
|
||||||
else
|
else
|
||||||
return modulateBurstBasic(wBurst, guardPeriodLength, sps);
|
return modulateBurstBasic(wBurst, guardPeriodLength, sps);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue