K-offset updated with configured sub carrier spacing

According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in number of slots as per 15Khz SCS
Koffset before being applied, needs to be updated to the slots according to the configured subcarrier spacing.
This commit is contained in:
Raghavendra Dinavahi
2025-03-28 16:44:51 +01:00
parent 1d479b2aa9
commit b141faaf30
5 changed files with 44 additions and 30 deletions
+14 -10
View File
@@ -872,18 +872,22 @@ static inline void apply_ntn_config(PHY_VARS_NR_UE *UE,
if (*update_ntn_system_information) {
*update_ntn_system_information = false;
*duration_rx_to_tx = NR_UE_CAPABILITY_SLOT_RX_TO_TX + UE->ntn_config_message->ntn_config_params.cell_specific_k_offset;
UE->timing_advance = fp->samples_per_subframe * UE->ntn_config_message->ntn_config_params.ntn_total_time_advance_ms;
*timing_advance +=
fp->get_samples_slot_timestamp(slot_nr,
fp,
UE->ntn_config_message->ntn_config_params.cell_specific_k_offset - *ntn_koffset);
*ntn_koffset = UE->ntn_config_message->ntn_config_params.cell_specific_k_offset;
double total_ta_ms = UE->ntn_config_message->ntn_config_params.ntn_total_time_advance_ms;
UE->timing_advance = fp->samples_per_subframe * total_ta_ms;
int mu = fp->numerology_index;
int koffset = UE->ntn_config_message->ntn_config_params.cell_specific_k_offset;
if (*ntn_koffset != koffset) {
*duration_rx_to_tx = NR_UE_CAPABILITY_SLOT_RX_TO_TX + (koffset << mu);
*timing_advance += fp->get_samples_slot_timestamp(slot_nr, fp, (koffset - *ntn_koffset) << mu);
*ntn_koffset = koffset;
}
LOG_I(PHY,
"cell_specific_k_offset = %d ms, ntn_total_time_advance_ms = %f ms (%d samples)\n",
"k_offset = %d ms (%d slots), ntn_total_time_advance_ms = %f ms (%d samples)\n",
*ntn_koffset,
UE->ntn_config_message->ntn_config_params.ntn_total_time_advance_ms,
*ntn_koffset << mu,
total_ta_ms,
UE->timing_advance);
}
}
@@ -1080,7 +1084,7 @@ void *UE_thread(void *arg)
if (UE->ntn_config_message->update) {
UE->ntn_config_message->update = false;
update_ntn_system_information = true;
nr_slot_tx_offset = UE->ntn_config_message->ntn_config_params.cell_specific_k_offset;
nr_slot_tx_offset = UE->ntn_config_message->ntn_config_params.cell_specific_k_offset << fp->numerology_index;
}
int slot_nr = absolute_slot % nb_slot_frame;