Merge remote-tracking branch 'origin/nr_ue_sib19_doppler' into integration_2025_w52 (!3663)

NR UE: calculate DL and UL Doppler based on SIB19 information in NTN mode, fixing LEO reestablishment
This commit is contained in:
Robert Schmidt
2025-12-23 09:21:42 +01:00
18 changed files with 359 additions and 234 deletions
-2
View File
@@ -337,8 +337,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
free_and_zero(ue->prs_vars[idx]);
}
free_and_zero(ue->ntn_config_message);
sl_ue_free(ue);
}
+1 -1
View File
@@ -119,7 +119,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
if (ue && ue->cont_fo_comp) {
start_meas_nr_ue_phy(ue, RX_FO_COMPENSATION_STATS);
nr_fo_compensation(ue->freq_offset,
nr_fo_compensation(ue->dl_Doppler_shift + ue->freq_offset,
frame_parms->samples_per_subframe,
rx_offset,
rxdata_symb_ptr[aa],
+4 -8
View File
@@ -329,11 +329,6 @@ typedef struct UE_NR_SCAN_INFO_s {
int32_t freq_offset_Hz[3][10];
} UE_NR_SCAN_INFO_t;
typedef struct {
bool update;
fapi_nr_dl_ntn_config_command_pdu ntn_config_params;
} ntn_config_message_t;
/// Top-level PHY Data Structure for UE
typedef struct PHY_VARS_NR_UE_s {
openair0_config_t openair0_cfg[MAX_CARDS];
@@ -462,8 +457,10 @@ typedef struct PHY_VARS_NR_UE_s {
double initial_fo; /// initial frequency offset provided by the user
int cont_fo_comp; /// flag enabling the continuous frequency offset estimation and compensation
double freq_offset; /// currently compensated frequency offset
double freq_off_acc; /// accumulated frequency error (for PI controller)
double freq_offset; /// currently compensated DL frequency offset (without dl_Doppler_shift)
double freq_off_acc; /// accumulated DL frequency error (for PI controller)
double dl_Doppler_shift; /// calculated DL Doppler shift
double ul_Doppler_shift; /// calculated UL Doppler shift
/// Timing Advance updates variables
/// Timing advance update computed from the TA command signalled from gNB
@@ -525,7 +522,6 @@ typedef struct PHY_VARS_NR_UE_s {
Actor_t sync_actor;
Actor_t *dl_actors;
Actor_t *ul_actors;
ntn_config_message_t* ntn_config_message;
pthread_t main_thread;
pthread_t stat_thread;
} PHY_VARS_NR_UE;
-26
View File
@@ -90,29 +90,6 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
}
}
static void configure_ntn_params(PHY_VARS_NR_UE *ue, fapi_nr_dl_ntn_config_command_pdu* ntn_params_message)
{
if (!ue->ntn_config_message) {
ue->ntn_config_message = CALLOC(1, sizeof(*ue->ntn_config_message));
}
ue->ntn_config_message->ntn_config_params.epoch_hfn = ntn_params_message->epoch_hfn;
ue->ntn_config_message->ntn_config_params.epoch_sfn = ntn_params_message->epoch_sfn;
ue->ntn_config_message->ntn_config_params.epoch_subframe = ntn_params_message->epoch_subframe;
ue->ntn_config_message->ntn_config_params.omega = ntn_params_message->omega;
ue->ntn_config_message->ntn_config_params.pos_sat_0 = ntn_params_message->pos_sat_0;
ue->ntn_config_message->ntn_config_params.pos_sat_90 = ntn_params_message->pos_sat_90;
ue->ntn_config_message->ntn_config_params.N_common_ta_adj = ntn_params_message->N_common_ta_adj;
ue->ntn_config_message->ntn_config_params.N_common_ta_drift = ntn_params_message->N_common_ta_drift;
ue->ntn_config_message->ntn_config_params.N_common_ta_drift_variant = ntn_params_message->N_common_ta_drift_variant;
ue->ntn_config_message->ntn_config_params.cell_specific_k_offset = ntn_params_message->cell_specific_k_offset;
ue->ntn_config_message->update = true;
}
static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command_pdu)
{
/* Time Alignment procedure
@@ -229,9 +206,6 @@ static void nr_ue_scheduled_response_dl(NR_UE_MAC_INST_t *mac,
case FAPI_NR_CONFIG_TA_COMMAND:
configure_ta_command(phy, &pdu->ta_command_pdu);
break;
case FAPI_NR_DL_NTN_CONFIG_PARAMS:
configure_ntn_params(phy, &pdu->ntn_config_command_pdu);
break;
default:
LOG_W(PHY, "unhandled dl pdu type %d \n", pdu->pdu_type);
}