Merge remote-tracking branch 'origin/nr_ue_sib19_ta' into integration_2025_w50 (!3638)

NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled

To achieve the goal, the hyper frame number (HFN) is introduced at the NR UE
PHY, MAC and RRC layers.

Besides this, we also implemented an orbit propagation to improve the accuracy
of N_UE_TA_adj, and a fix to keep the N_TA from RAR and MAC CE.

Fixes #981
This commit is contained in:
Jaroslava Fiedlerova
2025-12-08 12:04:31 +01:00
30 changed files with 313 additions and 181 deletions
@@ -24,6 +24,7 @@
#include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_nr.h"
#include "common/utils/nr/nr_common.h"
#include "executables/position_interface.h"
#define NFAPI_UE_MAX_NUM_CB 8
#define NFAPI_MAX_NUM_UL_PDU 255
@@ -562,18 +563,26 @@ typedef struct {
} fapi_nr_ta_command_pdu;
typedef struct {
int epoch_hfn;
int epoch_sfn;
int epoch_subframe;
// orbital angular velocity in rad/ms
double omega;
// satellite position at epoch time
position_t pos_sat_0;
// satellite position at 90° orbit
position_t pos_sat_90;
// N_common_ta_adj represents common round-trip-time between gNB and SAT received in SIB19 (ms)
double N_common_ta_adj;
// drift rate of common ta in µs/s
double N_common_ta_drift;
// change rate of common ta drift in µs/s²
double N_common_ta_drift_variant;
// cell scheduling offset expressed in terms of 15kHz SCS
long cell_specific_k_offset;
// ntn_total_time_advance_ms represents the complete round-trip-time between gNB and UE via SAT
double ntn_total_time_advance_ms;
// drift rate of ntn_total_time_advance_ms in µs/s
double ntn_total_time_advance_drift;
// change rate of ntn_total_time_advance_ms drift in µs/s²
double ntn_total_time_advance_drift_variant;
} fapi_nr_dl_ntn_config_command_pdu;
typedef struct {