NR UE: calculate the epoch_hfn whenever an ntn_Config_r17 is received
This commit is contained in:
committed by
francescomani
parent
0bf99d9d16
commit
654fadb116
@@ -562,6 +562,7 @@ typedef struct {
|
|||||||
} fapi_nr_ta_command_pdu;
|
} fapi_nr_ta_command_pdu;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
int epoch_hfn;
|
||||||
int epoch_sfn;
|
int epoch_sfn;
|
||||||
int epoch_subframe;
|
int epoch_subframe;
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ static void configure_ntn_params(PHY_VARS_NR_UE *ue, fapi_nr_dl_ntn_config_comma
|
|||||||
ue->ntn_config_message = CALLOC(1, sizeof(*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_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.epoch_subframe = ntn_params_message->epoch_subframe;
|
||||||
ue->ntn_config_message->ntn_config_params.cell_specific_k_offset = ntn_params_message->cell_specific_k_offset;
|
ue->ntn_config_message->ntn_config_params.cell_specific_k_offset = ntn_params_message->cell_specific_k_offset;
|
||||||
|
|||||||
@@ -318,6 +318,10 @@ static void configure_ntn_ta(module_id_t module_id,
|
|||||||
// epochTime_r17 must be present (this is assured by function `eval_epoch_time()`)
|
// epochTime_r17 must be present (this is assured by function `eval_epoch_time()`)
|
||||||
const NR_EpochTime_r17_t *epoch_time_r17 = ntn_Config_r17->epochTime_r17;
|
const NR_EpochTime_r17_t *epoch_time_r17 = ntn_Config_r17->epochTime_r17;
|
||||||
AssertFatal(epoch_time_r17, "epoch_time_r17 should not be NULL here\n");
|
AssertFatal(epoch_time_r17, "epoch_time_r17 should not be NULL here\n");
|
||||||
|
if (epoch_time_r17->sfn_r17 >= frame)
|
||||||
|
ntn_ta->epoch_hfn = hfn;
|
||||||
|
else
|
||||||
|
ntn_ta->epoch_hfn = hfn + 1;
|
||||||
ntn_ta->epoch_sfn = epoch_time_r17->sfn_r17;
|
ntn_ta->epoch_sfn = epoch_time_r17->sfn_r17;
|
||||||
ntn_ta->epoch_subframe = epoch_time_r17->subFrameNR_r17;
|
ntn_ta->epoch_subframe = epoch_time_r17->subFrameNR_r17;
|
||||||
|
|
||||||
@@ -368,9 +372,11 @@ static void configure_ntn_ta(module_id_t module_id,
|
|||||||
|
|
||||||
ntn_ta->ntn_params_changed = true;
|
ntn_ta->ntn_params_changed = true;
|
||||||
|
|
||||||
LOG_D(NR_MAC,
|
LOG_I(NR_MAC,
|
||||||
"SIB19 Rxd. Epoch SFN: %d, Epoch Subframe: %d, k_offset: %ldms, N_Common_Ta: %fms, drift: %fµs/s, variant %fµs/s², "
|
"SIB19 Rxd. Epoch HFN: %d, Epoch SFN: %d, Epoch Subframe: %d, k_offset: %ldms, "
|
||||||
|
"N_Common_Ta: %fms, drift: %fµs/s, variant %fµs/s², "
|
||||||
"N_UE_TA: %fms, drift: %fµs/s, variant %fµs/s²\n",
|
"N_UE_TA: %fms, drift: %fµs/s, variant %fµs/s²\n",
|
||||||
|
ntn_ta->epoch_hfn,
|
||||||
ntn_ta->epoch_sfn,
|
ntn_ta->epoch_sfn,
|
||||||
ntn_ta->epoch_subframe,
|
ntn_ta->epoch_subframe,
|
||||||
ntn_ta->cell_specific_k_offset,
|
ntn_ta->cell_specific_k_offset,
|
||||||
|
|||||||
@@ -543,6 +543,7 @@ typedef struct {
|
|||||||
} si_schedInfo_t;
|
} si_schedInfo_t;
|
||||||
|
|
||||||
typedef struct ntn_timing_advance_components {
|
typedef struct ntn_timing_advance_components {
|
||||||
|
int epoch_hfn;
|
||||||
int epoch_sfn;
|
int epoch_sfn;
|
||||||
int epoch_subframe;
|
int epoch_subframe;
|
||||||
|
|
||||||
|
|||||||
@@ -2849,6 +2849,7 @@ static void schedule_ntn_config_command(fapi_nr_dl_config_request_t *dl_config,
|
|||||||
{
|
{
|
||||||
fapi_nr_dl_ntn_config_command_pdu *ntn_config_command_pdu = &dl_config->dl_config_list[dl_config->number_pdus].ntn_config_command_pdu;
|
fapi_nr_dl_ntn_config_command_pdu *ntn_config_command_pdu = &dl_config->dl_config_list[dl_config->number_pdus].ntn_config_command_pdu;
|
||||||
|
|
||||||
|
ntn_config_command_pdu->epoch_hfn = mac->ntn_ta.epoch_hfn;
|
||||||
ntn_config_command_pdu->epoch_sfn = mac->ntn_ta.epoch_sfn;
|
ntn_config_command_pdu->epoch_sfn = mac->ntn_ta.epoch_sfn;
|
||||||
ntn_config_command_pdu->epoch_subframe = mac->ntn_ta.epoch_subframe;
|
ntn_config_command_pdu->epoch_subframe = mac->ntn_ta.epoch_subframe;
|
||||||
ntn_config_command_pdu->cell_specific_k_offset = mac->ntn_ta.cell_specific_k_offset;
|
ntn_config_command_pdu->cell_specific_k_offset = mac->ntn_ta.cell_specific_k_offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user