diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-27 16:58:46 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-27 20:00:16 +0100 |
commit | acefd0586e5d463b2e7a6a039131994bc12573fc (patch) | |
tree | 9d7b22f8a0453c4fb20d69835717a20db02e7a90 /src/osmo-bts-virtual/l1_if.c | |
parent | c092f4e1ded65447061198ea1c57458becc71574 (diff) |
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
Diffstat (limited to 'src/osmo-bts-virtual/l1_if.c')
-rw-r--r-- | src/osmo-bts-virtual/l1_if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 6904fe68..d0c368ee 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -145,7 +145,7 @@ static void virt_um_rcv_cb(struct virt_um_inst *vui, struct msgb *msg) l1sap.u.data.fn = fn; l1sap.u.data.rssi = 0; /* Radio Signal Strength Indicator. Best -> 0 */ l1sap.u.data.ber10k = 0; /* Bit Error Rate in 0.01%. Best -> 0 */ - l1sap.u.data.ta_offs_qbits = 0; /* Burst time of arrival in quarter bits. Probably used for Timing Advance calc. Best -> 0 */ + l1sap.u.data.ta_offs_256bits = 0; /* Burst time of arrival in quarter bits. Probably used for Timing Advance calc. Best -> 0 */ l1sap.u.data.lqual_cb = 10 * signal_dbm; /* Link quality in centiBel = 10 * dB. */ l1sap.u.data.pdch_presence_info = PRES_INFO_BOTH; l1if_process_meas_res(pinst->trx, timeslot, fn, chan_nr, 0, 0, 0, 0); @@ -303,7 +303,7 @@ static void l1if_fill_meas_res(struct osmo_phsap_prim *l1sap, uint8_t chan_nr, f 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 = (int16_t)(ta*4); + l1sap->u.info.u.meas_ind.ta_offs_256bits = (int16_t)(ta*4); l1sap->u.info.u.meas_ind.ber10k = (unsigned int) (ber * 10000); l1sap->u.info.u.meas_ind.inv_rssi = (uint8_t) (rssi * -1); l1sap->u.info.u.meas_ind.fn = fn; |