aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2016-07-14 11:44:45 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2016-07-14 11:44:45 +0200
commit938cda4686d808103bde05f97839a6df923c5635 (patch)
tree191a8c1ba01f59fa47326a253a44147113c59922 /lib
parent2fef1611e87ece0dd2ab900a137b65c0762b65c9 (diff)
Simplified uplink fix for the dehopper
Diffstat (limited to 'lib')
-rw-r--r--lib/receiver/cx_channel_hopper_impl.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/receiver/cx_channel_hopper_impl.cc b/lib/receiver/cx_channel_hopper_impl.cc
index 2818278..27a0cae 100644
--- a/lib/receiver/cx_channel_hopper_impl.cc
+++ b/lib/receiver/cx_channel_hopper_impl.cc
@@ -141,20 +141,10 @@ namespace gr {
{
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
gsmtap_hdr *header = (gsmtap_hdr *)pmt::blob_data(header_plus_burst);
- bool uplink_burst = (be16toh(header->arfcn) & 0x4000) ? true : false;
uint32_t frame_nr = be32toh(header->frame_number);
- uint16_t frame_ca;
-
- // FIXED for uplink
- if (uplink_burst)
- {
- frame_ca = be16toh(header->arfcn)-16384; //16384 = 0x4000
- }
- else
- {
- frame_ca = be16toh(header->arfcn);
- }
+ uint16_t frame_ca = be16toh(header->arfcn) & 0x3FFF; //change highest bits to '0'
+ //in order to leave only ARFCN number
int mai = calculate_ma_sfh(d_maio, d_hsn, d_narfcn, frame_nr);