aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpiotr <Piotr Krysik pkrysik@elka.pw.edu.pl>2014-04-24 10:28:29 +0200
committerpiotr <Piotr Krysik pkrysik@elka.pw.edu.pl>2014-04-24 10:28:29 +0200
commitf502e0f99bc53d8eee310b3f5139c9d63cfbcc7a (patch)
treee60ccf4fb5f36f7be7ae70370b6897996b56579e /lib
parentce92f9825f9c3d58bc872aad552b2fc8690aac74 (diff)
Replaced nasty hack for training sequences 6 and 7 with a condition depending on the first symbol of training sequences. It's still a little bit of a hack because I don't know why exactly those starting points have to be used.
Diffstat (limited to 'lib')
-rw-r--r--lib/receiver_impl.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/receiver_impl.cc b/lib/receiver_impl.cc
index d0e3edd..49cf0f1 100644
--- a/lib/receiver_impl.cc
+++ b/lib/receiver_impl.cc
@@ -81,17 +81,7 @@ receiver_impl::receiver_impl(feval_dd * tuner, int osr, int arfcn)
gmsk_mapper(SYNC_BITS, N_SYNC_BITS, d_sch_training_seq, gr_complex(0.0, -1.0));
for (i = 0; i < TRAIN_SEQ_NUM; i++)
{
- gr_complex startpoint;
- if (i == 6 || i == 7) //this is nasty hack
- {
- startpoint = gr_complex(-1.0, 0.0); //if I don't change it here all bits of normal bursts for BTSes with bcc=6 will have reversed values
- }
- else
- {
- startpoint = gr_complex(1.0, 0.0); //I've checked this hack for bcc==0,1,2,3,4,6
- } //I don't know what about bcc==5 and 7 yet
- //TODO:find source of this situation - this is purely mathematical problem I guess
-
+ gr_complex startpoint = (train_seq[i][0]==0) ? gr_complex(1.0, 0.0) : gr_complex(-1.0, 0.0); //if first bit of the seqeunce ==0 first symbol ==1
gmsk_mapper(train_seq[i], N_TRAIN_BITS, d_norm_training_seq[i], startpoint);
}
message_port_register_out(pmt::mp("bursts"));