NR_UE: make NTN parameter ta_CommonDrift_r17 configurable via command line parameter --ntn-ta-commondrift
While we don't have SIB19 support yet, UE gets this parameter from command line, just like --ntn-koffset and --ntn-ta-common. We use this value to initialize the UE's time-tracking PI controller accumulator. This allows to correctly track the time even if the delay is changing significantly (e.g. due to LEO satellite movement). We also use it to compensate for the time drift that happenes while performing the initial sync.
This commit is contained in:
@@ -88,7 +88,7 @@ void nr_ue_init_mac(NR_UE_MAC_INST_t *mac)
|
||||
|
||||
// Fake SIB19 reception for NTN
|
||||
// TODO: remove this and implement the actual SIB19 reception instead!
|
||||
if (get_nrUE_params()->ntn_koffset || get_nrUE_params()->ntn_ta_common) {
|
||||
if (get_nrUE_params()->ntn_koffset || get_nrUE_params()->ntn_ta_common || get_nrUE_params()->ntn_ta_commondrift) {
|
||||
NR_SIB19_r17_t *sib19_r17 = calloc(1, sizeof(*sib19_r17));
|
||||
sib19_r17->ntn_Config_r17 = calloc(1, sizeof(*sib19_r17->ntn_Config_r17));
|
||||
|
||||
@@ -98,9 +98,11 @@ void nr_ue_init_mac(NR_UE_MAC_INST_t *mac)
|
||||
}
|
||||
|
||||
// NTN ta-Common-r17
|
||||
if (get_nrUE_params()->ntn_ta_common) {
|
||||
if (get_nrUE_params()->ntn_ta_common || get_nrUE_params()->ntn_ta_commondrift) {
|
||||
sib19_r17->ntn_Config_r17->ta_Info_r17 = calloc(1, sizeof(*sib19_r17->ntn_Config_r17->ta_Info_r17));
|
||||
sib19_r17->ntn_Config_r17->ta_Info_r17->ta_Common_r17 = get_nrUE_params()->ntn_ta_common / 4.072e-6; // ta-Common-r17 is in units of 4.072e-3 µs, ntn_ta_common is in ms
|
||||
if (get_nrUE_params()->ntn_ta_commondrift)
|
||||
asn1cCallocOne(sib19_r17->ntn_Config_r17->ta_Info_r17->ta_CommonDrift_r17, get_nrUE_params()->ntn_ta_commondrift / 0.2e-3); // is in units of 0.2e-3 µs/s, ntn_ta_commondrift is in µs/s
|
||||
}
|
||||
|
||||
nr_rrc_mac_config_req_sib19_r17(mac->ue_id, sib19_r17);
|
||||
|
||||
Reference in New Issue
Block a user