aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ta_control
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-09-06 19:00:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-09-13 12:25:32 +0200
commitf21b9231dde39d69d4d85c857fe1ec8859d7287b (patch)
treea03415af43321cca20f1d393d19512fd329c9225 /tests/ta_control
parent494b2511092670b2315dc9b2a43f505b3fef1b3d (diff)
TA loop: Take into account UL SACCH 'Actual Timing advance' field
First step improving and reworking TA loop: Move trigger of the loop to similar place done by BS/MS Power Control Loop, that is, upon receivial of UL SACCH block, which contains information about the TA used to transmit the block encode in L1SACCH Header. Hence, from computed received TOA and TA used when transmitting from the MS, we can infer the desired TA to be used by the MS, which will send back to it later during DL SACCH block. The values taken are actually the ones calculated for the previous SACCH block and stored in lchan->meas.ms_toa256. That's because L1SACCH contains the TA used for the previous reporting period, similarly to what's specified for MS Power Control loop (TS 45.008 sec 4.2): """ The MS shall confirm the power control level that it is currently employing in the SACCH L1 header on each uplink channel. The indicated value shall be the power control level actually used by the mobile for the last burst of the previous SACCH period. """ (The reader may observe that currently this is not properly done for MS Power Control loop when calling lchan_ms_pwr_ctrl(): this is a bug.) This new method also permits changing TA quicker, since we have more confidence that the TA we request is aligned with the one used to transmit, and we don't simply increment/decrement based on the value we request to transmit. Related: SYS#5371 Change-Id: I2d0f128c8dcac93ee382283a1c91fca76623b8fc
Diffstat (limited to 'tests/ta_control')
-rw-r--r--tests/ta_control/ta_control_test.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/ta_control/ta_control_test.c b/tests/ta_control/ta_control_test.c
index 2e981b38..12305cb2 100644
--- a/tests/ta_control/ta_control_test.c
+++ b/tests/ta_control/ta_control_test.c
@@ -35,9 +35,6 @@ void lchan_ms_ta_ctrl_test(int16_t toa256_start, unsigned int steps)
uint8_t rqd_ta_before;
int16_t toa256 = toa256_start;
- /* Arbitrary value, high enough so that a computation can happen. */
- lchan.meas.num_ul_meas = 10;
-
printf("toa256_start = %u / 256 = %u, steps = %u\n", toa256_start,
toa256_start / 256, steps);
@@ -49,8 +46,7 @@ void lchan_ms_ta_ctrl_test(int16_t toa256_start, unsigned int steps)
rqd_ta_before = lchan.rqd_ta;
- lchan.meas.ms_toa256 = toa256;
- lchan_ms_ta_ctrl(&lchan);
+ lchan_ms_ta_ctrl(&lchan, rqd_ta_before, toa256);
rqd_ta_after = lchan.rqd_ta;
toa256 -= (rqd_ta_after - rqd_ta_before) * 256;