From 4dfd64aa9e76af012b3cc0b6a73bbbcf3644d8e1 Mon Sep 17 00:00:00 2001 From: Tom Tsou Date: Sun, 6 Mar 2016 20:31:51 -0800 Subject: sigproc: Always use 625 sample length bursts with 4 SPS At 4 samples per symbol, we don't need to maintain the 156/157 sample slot structure to account for the GSM 156.25 sample burst length. Set the 4 SPS Laurent modulator to ignore the guard interval setting and always output 625 sample sized bursts. The EDGE 8-PSK modulator already has this behavior. Signed-off-by: Tom Tsou --- Transceiver52M/sigProcLib.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Transceiver52M') diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp index f846950..1a15e51 100644 --- a/Transceiver52M/sigProcLib.cpp +++ b/Transceiver52M/sigProcLib.cpp @@ -789,26 +789,26 @@ static void rotateBurst2(signalVector &burst, double phase) burst[i] = burst[i] * rot; } -static signalVector *modulateBurstLaurent(const BitVector &bits, - int guard_len, int sps) +/* + * Ignore the guard length argument in the GMSK modulator interface + * because it results in 624/628 sized bursts instead of the preferred + * burst length of 625. Only 4 SPS is supported. + */ +static signalVector *modulateBurstLaurent(const BitVector &bits) { - int burst_len; + int burst_len, sps = 4; float phase; signalVector *c0_pulse, *c1_pulse, *c0_burst; signalVector *c1_burst, *c0_shaped, *c1_shaped; 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 = GSMPulse4->c0; c1_pulse = GSMPulse4->c1; - burst_len = sps * (bits.size() + guard_len); + if (bits.size() > 156) + return NULL; + + burst_len = 625; c0_burst = new signalVector(burst_len, c0_pulse->size()); c0_burst->isReal(true); @@ -1083,7 +1083,7 @@ signalVector *modulateBurst(const BitVector &wBurst, int guardPeriodLength, if (emptyPulse) return rotateBurst(wBurst, guardPeriodLength, sps); else if (sps == 4) - return modulateBurstLaurent(wBurst, guardPeriodLength, sps); + return modulateBurstLaurent(wBurst); else return modulateBurstBasic(wBurst, guardPeriodLength, sps); } -- cgit v1.2.3