From 14bb9c923d8c967e8ce114a868923e9566be51e5 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Wed, 16 Apr 2014 23:10:12 -0400 Subject: Transceiver52M: Add FCCH based frequency correction Enable frequency detection and correction by buffering the previous frame to allow FCCH measurement and compensation after frame timing is locked using the SCH. When the SCH is detected and symbol timing matched, measure the FCCH burst from one frame prior and compensate by baseband tuning the DDC on the device. Avoid appying frequency corrections to the RF portion due to possible tuning delays, which is not an issue with DDC tuning. Signed-off-by: Thomas Tsou --- Transceiver52M/Transceiver.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Transceiver52M/Transceiver.h') diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h index 170af77..8f3e47b 100644 --- a/Transceiver52M/Transceiver.h +++ b/Transceiver52M/Transceiver.h @@ -80,7 +80,11 @@ struct TransceiverState { /* Received noise energy levels */ float mNoiseLev; - noiseVector mNoises; + avgVector mNoises; + avgVector mFreqOffsets; + + /* Store pointers to previous frame */ + radioVector *prevFrame[8]; /* Transceiver mode */ int mode; @@ -156,6 +160,7 @@ private: complex &, float &toa); bool decodeSCH(SoftVector *burst, GSM::Time *time); + bool correctFCCH(TransceiverState *state, signalVector *burst); /** Detect normal bursts */ bool detectTSC(TransceiverState *state, -- cgit v1.2.3