Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openairinterface-6g
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
openairinterface-6g
Commits
a72abe3c
Commit
a72abe3c
authored
Sep 19, 2025
by
Robert Schmidt
Committed by
Rakesh Mundlamuri
Nov 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor dl_toa setting to separate function
parent
825c6803
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+11
-4
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
a72abe3c
...
@@ -71,6 +71,11 @@ void peak_estimator(c16_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *
...
@@ -71,6 +71,11 @@ void peak_estimator(c16_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *
}
}
}
}
void
set_prs_dl_toa
(
prs_meas_t
*
prs_meas
,
float
dl_toa
)
{
prs_meas
->
dl_toa
=
dl_toa
;
}
int
nr_prs_channel_estimation
(
uint8_t
gNB_id
,
int
nr_prs_channel_estimation
(
uint8_t
gNB_id
,
uint8_t
rsc_id
,
uint8_t
rsc_id
,
uint8_t
rep_num
,
uint8_t
rep_num
,
...
@@ -448,9 +453,9 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -448,9 +453,9 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
prs_meas
[
rxAnt
]
->
slot
=
proc
->
nr_slot_rx
;
prs_meas
[
rxAnt
]
->
slot
=
proc
->
nr_slot_rx
;
prs_meas
[
rxAnt
]
->
rxAnt_idx
=
rxAnt
;
prs_meas
[
rxAnt
]
->
rxAnt_idx
=
rxAnt
;
prs_meas
[
rxAnt
]
->
dl_aoa
=
rsc_id
;
prs_meas
[
rxAnt
]
->
dl_aoa
=
rsc_id
;
prs_meas
[
rxAnt
]
->
dl_toa
=
prs_toa
/
(
float
)
NR_PRS_IDFT_OVERSAMP_FACTOR
;
float
dl_toa
=
prs_toa
/
(
float
)
NR_PRS_IDFT_OVERSAMP_FACTOR
;
if
((
frame_params
->
ofdm_symbol_size
-
prs_meas
[
rxAnt
]
->
dl_toa
)
<
frame_params
->
ofdm_symbol_size
/
2
)
if
((
frame_params
->
ofdm_symbol_size
-
dl_toa
)
<
frame_params
->
ofdm_symbol_size
/
2
)
prs_meas
[
rxAnt
]
->
dl_toa
-=
(
frame_params
->
ofdm_symbol_size
);
dl_toa
-=
(
frame_params
->
ofdm_symbol_size
);
LOG_I
(
PHY
,
LOG_I
(
PHY
,
"[gNB %d][rsc %d][Rx %d][sfn %d][slot %d] DL PRS ToA ==> %.1f / %d samples, peak channel power %.1f dBm, SNR %+.1f dB, rsrp %+.1f dBm
\n
"
,
"[gNB %d][rsc %d][Rx %d][sfn %d][slot %d] DL PRS ToA ==> %.1f / %d samples, peak channel power %.1f dBm, SNR %+.1f dB, rsrp %+.1f dBm
\n
"
,
gNB_id
,
gNB_id
,
...
@@ -458,12 +463,14 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -458,12 +463,14 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
rxAnt
,
rxAnt
,
proc
->
frame_rx
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
,
proc
->
nr_slot_rx
,
prs_meas
[
rxAnt
]
->
dl_toa
,
dl_toa
,
frame_params
->
ofdm_symbol_size
,
frame_params
->
ofdm_symbol_size
,
ch_pwr_dbm
,
ch_pwr_dbm
,
prs_meas
[
rxAnt
]
->
snr
,
prs_meas
[
rxAnt
]
->
snr
,
prs_meas
[
rxAnt
]
->
rsrp_dBm
);
prs_meas
[
rxAnt
]
->
rsrp_dBm
);
set_prs_dl_toa
(
prs_meas
[
rxAnt
],
dl_toa
);
#ifdef DEBUG_PRS_CHEST
#ifdef DEBUG_PRS_CHEST
sprintf
(
filename
,
"%s%i%s"
,
"PRSpilot_"
,
rxAnt
,
".m"
);
sprintf
(
filename
,
"%s%i%s"
,
"PRSpilot_"
,
rxAnt
,
".m"
);
LOG_M
(
filename
,
"prs_loc"
,
mod_prs
,
num_pilots
,
1
,
1
);
LOG_M
(
filename
,
"prs_loc"
,
mod_prs
,
num_pilots
,
1
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment