From acefd0586e5d463b2e7a6a039131994bc12573fc Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 27 Feb 2018 16:58:46 +0100 Subject: L1SAP: Increase resolution of reported burst timing Before this patch we had: * osmo-bts-trx internally using 1/256th bit/symbol period * osmo-bts-sysmo internally using 1/4 bit/smbol period * PCU interface using 1/4 * L1SAP interface using 1/4 * measurement processing code on top of L1SAP using 1/256 So for sysmo/lc15/octphy we are not loosing resolution, but for osmo-bts-trx we're arbitrarily reducing the resolution via L1SAP only then to compute with higher resolution again. Let's change L1SAP to use 1/256 bits and hence not loose any resolution. This requires a corresponding change in libosmocore for l1sap.h, which is found in Change-Id Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d Change-Id: If9b0f617845ba6c4aa47969f521734388197c9a7 --- src/osmo-bts-sysmo/l1_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/osmo-bts-sysmo') diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 08f584b2..46db69c3 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -904,7 +904,7 @@ static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, PRIM_OP_INDICATION, NULL); l1sap.u.info.type = PRIM_INFO_MEAS; l1sap.u.info.u.meas_ind.chan_nr = chan_nr; - l1sap.u.info.u.meas_ind.ta_offs_qbits = m->i16BurstTiming; + l1sap.u.info.u.meas_ind.ta_offs_256bits = m->i16BurstTiming * 64; l1sap.u.info.u.meas_ind.ber10k = (unsigned int) (m->fBer * 10000); l1sap.u.info.u.meas_ind.inv_rssi = (uint8_t) (m->fRssi * -1); l1sap.u.info.u.meas_ind.fn = fn; @@ -965,7 +965,7 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i l1sap->u.data.rssi = (int8_t) (data_ind->measParam.fRssi); if (!pcu_direct) { /* FIXME: if pcu_direct=1, then this is not set, what to do in pcu_tx_data_ind() in this case ?*/ l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_qbits = data_ind->measParam.i16BurstTiming; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; } /* copy data from L1 primitive to L1SAP primitive */ -- cgit v1.2.3