Commit Graph

10 Commits

Author SHA1 Message Date
Harald Welte a7263b6474 Fix license headers.
We have licensed the code under GNU Afffero Public License,
and state that in the first paragraph as well as in the link
to the license.  However, a paragraph in the middle stated
"see the GNU General Public License", which is somewhat misleading.

Let's fix that.

Change-Id: I37e503b195fe43e1da42c080900504ca8e682e76
2024-02-17 10:21:30 +01:00
Vadim Yanitskiy 2c511d5755 copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
Change-Id: Ib0bed7a4196305e2b413ca657f4fa8fb6f0d39f6
2023-05-19 08:50:18 +00:00
Pau Espin c81b41c62e Support configuring TA loop SACCH block rate
Similar to what is already provided for power control loops. However,
there's no existing way to communicate TA control parameters from the
BSC to the BTS, so implement them locally in BTS vty.

Related: SYS#5371
Change-Id: I9fa71f836bb9a79b0ef2567bfcfdf38ff217840b
2021-09-14 11:42:58 +02:00
Pau Espin 132b67a7a0 TA Control Loop: Change toa256 switch threshold to 75% of a symbol
As per 3GPP TS 45.010 sec 5.6.3 Delay assessment error:
"""
the delay shall be assessed in such a way that the assessment error
(due to  noise and interference) is less than 1/2 normal symbol periods
for stationary MS. For MS moving at a speed up to 500  km/h the additional
error shall be less than 1/4 normal symbol period.
"""

Hence, required TA loop calculation should take into account an error of
up to 1/2 + 1/4 = 75% of a symbol. By changing the threshold variable
to that percentage we make sure we take into account bigger deviations
and update TA accordingly.

Related: SYS#5371
Change-Id: I4c5825df4291d3851a113027abf7566de343a190
2021-09-14 11:42:44 +02:00
Pau Espin 22a160bd24 lchan: Move TA CTRL param to its own substruct
Field is renamed to look similar to similar fields in power control
loop. This is a preparation commit, next one will add functionality to
skip SACCH blocksi (P_CON_INTERVAL).

Related: SYS#5371
Change-Id: I169ce58ab827e38b64f4b15f935097a9118fa118
2021-09-13 12:53:44 +02:00
Pau Espin f54a7462dd ta_control: Allow switching TA quicker
From TS 45.010 5.6.1 (delay tracking for circuit switched channels):
"""
Restricting the change in timing advance to 1 symbol period at a time
gives the simplest implementation of the BTS.  However the BTS may use
a larger change than this but great care must then be used in the BTS design.
"""

In general 1 TA at a time (every 480ms of SACCH block) should be enough,
since section 5.6.3 states:
"""
The control loop for the timing advance shall be implemented in such a way that it will cope with MSs moving at a
speed up to 500 km/h
"""
Which is ~140 m/s, and 1 TA step around 500m, so most of the time we
should be save and no steps of more than 1 TA should be required.
However, unlikely changes from reflected to direct signal or vice versa
could produce higher increments, so let's increase the maximum step size
allowed to 2 in order to give more room.

Change-Id: I9e48faabf3090588233e274b2b39065cf85fbec7
2021-09-13 12:53:22 +02:00
Pau Espin f21b9231dd 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
2021-09-13 12:25:32 +02:00
Vadim Yanitskiy 8777b63ef8 ta_control: fix Timing Advance control for SDCCH channels
The check in lchan_ms_ta_ctrl() breaks Timing Advance control on
SDCCH channels, because 'num_ul_meas' wraps and never reaches 4.
Neither this check makes any sense for other channel types,
because lchan_ms_ta_ctrl() is always called in the end of the
measurement period.  Let's drop it.

Change-Id: I0b86d49ec00b38d0f309c56b2519e5d487f0b65b
Fixes: If7ddf74db3abc9b9872abe620a0aeebe3327e70a
Related: OS#5024
2021-02-20 22:46:24 +01:00
Vadim Yanitskiy 7d29ff9345 ta_control: cosmetic: use correct naming for MIN/MAX constraints
Change-Id: I112e0b51df06984e2e3f9b567d6d9897e9f9ba28
2021-02-15 10:58:54 +00:00
Philipp Maier a0403d3769 ta_control: move timing advance code from osmo-bts-trx to common
The timing advance controller that is implemented in loops.c of
osmo-bts-trx only works for osmo-bts-trx and not for any of the phy
based bts. Lets move the timing advance controller into the common part
and make it available for every bts. Also lets add a unit-test.

Change-Id: If7ddf74db3abc9b9872abe620a0aeebe3327e70a
Related: SYS#4567
2020-01-20 14:33:49 +00:00