From 36d94733571d5dd96fbd941cab3e9c2ca351accc Mon Sep 17 00:00:00 2001 From: Piotr Krysik Date: Fri, 12 Jun 2009 10:04:37 +0200 Subject: other changes --- src/lib/Assert.h | 2 +- src/lib/gsm.i | 7 -- src/lib/gsm_constants.h | 14 +-- src/lib/gsm_receiver_cf.h | 246 +++++++++++++++++++++++++--------------------- 4 files changed, 142 insertions(+), 127 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Assert.h b/src/lib/Assert.h index dd222b0..acfb3f7 100644 --- a/src/lib/Assert.h +++ b/src/lib/Assert.h @@ -26,7 +26,7 @@ #include "stdio.h" #include -// #define NDEBUG +#define NDEBUG /**@name Macros for standard messages. */ //@{ diff --git a/src/lib/gsm.i b/src/lib/gsm.i index dc0be34..9a9e8ea 100644 --- a/src/lib/gsm.i +++ b/src/lib/gsm.i @@ -36,13 +36,6 @@ // ---------------------------------------------------------------- -/* - * First arg is the package prefix. - * Second arg is the name of the class minus the prefix. - * - * This does some behind-the-scenes magic so we can - * access howto_square_ff from python as howto.square_ff - */ GR_SWIG_BLOCK_MAGIC(gsm,receiver_cf); gsm_receiver_cf_sptr gsm_make_receiver_cf ( gr_feval_dd *tuner, int osr); diff --git a/src/lib/gsm_constants.h b/src/lib/gsm_constants.h index bc16902..cf9f059 100644 --- a/src/lib/gsm_constants.h +++ b/src/lib/gsm_constants.h @@ -23,7 +23,7 @@ #define FCCH_POS TAIL_BITS #define SYNC_POS 39 #define TRAIN_POS ( TAIL_BITS + DATA_BITS + 5) //first 5 bits of a training sequence -//aren't used for channel impulse response estimation + //aren't used for channel impulse response estimation #define TRAIN_BEGINNING 5 #define SAFETY_MARGIN 6 // @@ -41,11 +41,11 @@ static const unsigned char SYNC_BITS[] = { }; const unsigned FCCH_FRAMES[] = {0, 10, 20, 30, 40}; -const unsigned SCH_FRAMES[] = {1,11,21,31,41}; +const unsigned SCH_FRAMES[] = {1, 11, 21, 31, 41}; -const unsigned BCCH_FRAMES[] = {2,3,4,5}; //!!the receiver shouldn't care about logical -const unsigned TRAFFIC_CHANNEL_F[] = {0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24}; - //!!channels so this will be removed from this header +const unsigned BCCH_FRAMES[] = {2, 3, 4, 5}; //!!the receiver shouldn't care about logical +const unsigned TRAFFIC_CHANNEL_F[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}; +//!!channels so this will be removed from this header const unsigned TEST[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}; // Sync : .+...++.+..+++.++++++.++++++....++.+..+.+.+++.+.+...+..++++..+.. // Diff Encoded Sync: .++..+.+++.+..++.....++.....+...+.+++.+++++..+++++..++.+...+.++. @@ -106,8 +106,8 @@ static const unsigned char dummy_burst[] = { * COMPACT) the center frequency. One can use this spike with a narrow * band filter to accurately determine the center of the channel. */ -static const unsigned char fc_fb[] = { //I don't use this tables, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //I copied this here from burst_types.h because +static const unsigned char fc_fb[] = { //I don't use this tables, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //I copied this here from burst_types.h because 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //the description is very informative - p.krysik 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/lib/gsm_receiver_cf.h b/src/lib/gsm_receiver_cf.h index d35e4da..b937f76 100644 --- a/src/lib/gsm_receiver_cf.h +++ b/src/lib/gsm_receiver_cf.h @@ -37,8 +37,9 @@ typedef std::vector vector_complex; gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, int osr); /** GSM Receiver GNU Radio block + * * GSM Receiver class supports frequency correction, synchronisation and - * MLSE (Maximum Likelihood Sequence Estimation) estimation of synchronisation + * MLSE (Maximum Likelihood Sequence Estimation) estimation of synchronisation * bursts and normal bursts. * \ingroup block */ @@ -46,148 +47,169 @@ gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, int osr); class gsm_receiver_cf : public gr_block { private: - - const int d_OSR; - const int d_chan_imp_length; + + /**@name Configuration of the receiver */ + //@{ + const int d_OSR; ///< oversampling ratio + const int d_chan_imp_length; ///< channel impulse length + //@} gr_complex d_sch_training_seq[N_SYNC_BITS]; ///