Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
ZhouShuya
OpenXG-RAN
Commits
a820c55f
Commit
a820c55f
authored
Feb 25, 2015
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@6619
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
88e3d382
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
41 deletions
+43
-41
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
+43
-41
No files found.
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
View file @
a820c55f
...
@@ -172,47 +172,49 @@ void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue,
...
@@ -172,47 +172,49 @@ void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue,
phy_vars_ue
->
PHY_measurements
.
rssi
=
0
;
phy_vars_ue
->
PHY_measurements
.
rssi
=
0
;
phy_vars_ue
->
PHY_measurements
.
n0_power_tot
=
0
;
phy_vars_ue
->
PHY_measurements
.
n0_power_tot
=
0
;
if
((
phy_vars_ue
->
lte_frame_parms
.
frame_type
==
FDD
)
&&
if
(
abstraction_flag
==
0
)
{
((
slot
==
0
)
||
(
slot
==
10
)))
{
// FDD PSS/SSS, compute noise in DTX REs
if
((
phy_vars_ue
->
lte_frame_parms
.
frame_type
==
FDD
)
&&
if
(
phy_vars_ue
->
lte_frame_parms
.
Ncp
==
NORMAL
)
{
((
slot
==
0
)
||
(
slot
==
10
)))
{
// FDD PSS/SSS, compute noise in DTX REs
for
(
aarx
=
0
;
aarx
<
phy_vars_ue
->
lte_frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
if
(
phy_vars_ue
->
lte_frame_parms
.
Ncp
==
NORMAL
)
{
for
(
aarx
=
0
;
aarx
<
phy_vars_ue
->
lte_frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
rxF_sss
=
(
int16_t
*
)
&
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
[
aarx
][(
5
*
phy_vars_ue
->
lte_frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
[
aarx
][(
6
*
phy_vars_ue
->
lte_frame_parms
.
ofdm_symbol_size
)];
rxF_sss
=
(
int16_t
*
)
&
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
[
aarx
][(
5
*
phy_vars_ue
->
lte_frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
[
aarx
][(
6
*
phy_vars_ue
->
lte_frame_parms
.
ofdm_symbol_size
)];
//-ve spectrum from SSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
=
((
rxF_pss
[
-
72
]
*
rxF_pss
[
-
72
])
+
(
rxF_pss
[
-
71
]
*
rxF_pss
[
-
71
]));
//-ve spectrum from SSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
70
]
*
rxF_pss
[
-
70
])
+
(
rxF_pss
[
-
69
]
*
rxF_pss
[
-
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
=
((
rxF_pss
[
-
72
]
*
rxF_pss
[
-
72
])
+
(
rxF_pss
[
-
71
]
*
rxF_pss
[
-
71
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
68
]
*
rxF_pss
[
-
68
])
+
(
rxF_pss
[
-
67
]
*
rxF_pss
[
-
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
70
]
*
rxF_pss
[
-
70
])
+
(
rxF_pss
[
-
69
]
*
rxF_pss
[
-
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
66
]
*
rxF_pss
[
-
66
])
+
(
rxF_pss
[
-
65
]
*
rxF_pss
[
-
65
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
68
]
*
rxF_pss
[
-
68
])
+
(
rxF_pss
[
-
67
]
*
rxF_pss
[
-
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
64
]
*
rxF_pss
[
-
64
])
+
(
rxF_pss
[
-
63
]
*
rxF_pss
[
-
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
66
]
*
rxF_pss
[
-
66
])
+
(
rxF_pss
[
-
65
]
*
rxF_pss
[
-
65
]));
//+ve spectrum from SSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
64
]
*
rxF_pss
[
-
64
])
+
(
rxF_pss
[
-
63
]
*
rxF_pss
[
-
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
72
]
*
rxF_sss
[
2
+
72
])
+
(
rxF_sss
[
2
+
71
]
*
rxF_sss
[
2
+
71
]));
//+ve spectrum from SSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
70
]
*
rxF_sss
[
2
+
70
])
+
(
rxF_sss
[
2
+
69
]
*
rxF_sss
[
2
+
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
72
]
*
rxF_sss
[
2
+
72
])
+
(
rxF_sss
[
2
+
71
]
*
rxF_sss
[
2
+
71
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
68
]
*
rxF_sss
[
2
+
68
])
+
(
rxF_sss
[
2
+
67
]
*
rxF_sss
[
2
+
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
70
]
*
rxF_sss
[
2
+
70
])
+
(
rxF_sss
[
2
+
69
]
*
rxF_sss
[
2
+
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
66
]
*
rxF_sss
[
2
+
66
])
+
(
rxF_sss
[
2
+
65
]
*
rxF_sss
[
2
+
65
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
68
]
*
rxF_sss
[
2
+
68
])
+
(
rxF_sss
[
2
+
67
]
*
rxF_sss
[
2
+
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
64
]
*
rxF_sss
[
2
+
64
])
+
(
rxF_sss
[
2
+
63
]
*
rxF_sss
[
2
+
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
66
]
*
rxF_sss
[
2
+
66
])
+
(
rxF_sss
[
2
+
65
]
*
rxF_sss
[
2
+
65
]));
//+ve spectrum from PSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_sss
[
2
+
64
]
*
rxF_sss
[
2
+
64
])
+
(
rxF_sss
[
2
+
63
]
*
rxF_sss
[
2
+
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
72
]
*
rxF_pss
[
2
+
72
])
+
(
rxF_pss
[
2
+
71
]
*
rxF_pss
[
2
+
71
]));
//+ve spectrum from PSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
70
]
*
rxF_pss
[
2
+
70
])
+
(
rxF_pss
[
2
+
69
]
*
rxF_pss
[
2
+
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
72
]
*
rxF_pss
[
2
+
72
])
+
(
rxF_pss
[
2
+
71
]
*
rxF_pss
[
2
+
71
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
68
]
*
rxF_pss
[
2
+
68
])
+
(
rxF_pss
[
2
+
67
]
*
rxF_pss
[
2
+
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
70
]
*
rxF_pss
[
2
+
70
])
+
(
rxF_pss
[
2
+
69
]
*
rxF_pss
[
2
+
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
66
]
*
rxF_pss
[
2
+
66
])
+
(
rxF_pss
[
2
+
65
]
*
rxF_pss
[
2
+
65
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
68
]
*
rxF_pss
[
2
+
68
])
+
(
rxF_pss
[
2
+
67
]
*
rxF_pss
[
2
+
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
64
]
*
rxF_pss
[
2
+
64
])
+
(
rxF_pss
[
2
+
63
]
*
rxF_pss
[
2
+
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
66
]
*
rxF_pss
[
2
+
66
])
+
(
rxF_pss
[
2
+
65
]
*
rxF_pss
[
2
+
65
]));
//-ve spectrum from PSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
2
+
64
]
*
rxF_pss
[
2
+
64
])
+
(
rxF_pss
[
2
+
63
]
*
rxF_pss
[
2
+
63
]));
rxF_pss
=
(
int16_t
*
)
&
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
[
aarx
][(
7
*
phy_vars_ue
->
lte_frame_parms
.
ofdm_symbol_size
)];
//-ve spectrum from PSS
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
72
]
*
rxF_pss
[
-
72
])
+
(
rxF_pss
[
-
71
]
*
rxF_pss
[
-
71
]));
rxF_pss
=
(
int16_t
*
)
&
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
[
aarx
][(
7
*
phy_vars_ue
->
lte_frame_parms
.
ofdm_symbol_size
)];
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
70
]
*
rxF_pss
[
-
70
])
+
(
rxF_pss
[
-
69
]
*
rxF_pss
[
-
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
72
]
*
rxF_pss
[
-
72
])
+
(
rxF_pss
[
-
71
]
*
rxF_pss
[
-
71
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
68
]
*
rxF_pss
[
-
68
])
+
(
rxF_pss
[
-
67
]
*
rxF_pss
[
-
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
70
]
*
rxF_pss
[
-
70
])
+
(
rxF_pss
[
-
69
]
*
rxF_pss
[
-
69
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
66
]
*
rxF_pss
[
-
66
])
+
(
rxF_pss
[
-
65
]
*
rxF_pss
[
-
65
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
68
]
*
rxF_pss
[
-
68
])
+
(
rxF_pss
[
-
67
]
*
rxF_pss
[
-
67
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
64
]
*
rxF_pss
[
-
64
])
+
(
rxF_pss
[
-
63
]
*
rxF_pss
[
-
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
66
]
*
rxF_pss
[
-
66
])
+
(
rxF_pss
[
-
65
]
*
rxF_pss
[
-
65
]));
phy_vars_ue
->
PHY_measurements
.
n0_power_dB
[
aarx
]
=
(
unsigned
short
)
dB_fixed
(
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
/
10
);
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
+=
((
rxF_pss
[
-
64
]
*
rxF_pss
[
-
64
])
+
(
rxF_pss
[
-
63
]
*
rxF_pss
[
-
63
]));
phy_vars_ue
->
PHY_measurements
.
n0_power_tot
+=
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
];
phy_vars_ue
->
PHY_measurements
.
n0_power_dB
[
aarx
]
=
(
unsigned
short
)
dB_fixed
(
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
]
/
10
);
}
phy_vars_ue
->
PHY_measurements
.
n0_power_tot
+=
phy_vars_ue
->
PHY_measurements
.
n0_power
[
aarx
];
phy_vars_ue
->
PHY_measurements
.
n0_power_tot_dB
=
(
unsigned
short
)
dB_fixed
(
phy_vars_ue
->
PHY_measurements
.
n0_power_tot
/
20
);
}
phy_vars_ue
->
PHY_measurements
.
n0_power_tot_dBm
=
phy_vars_ue
->
PHY_measurements
.
n0_power_tot_dB
-
phy_vars_ue
->
rx_total_gain_dB
;
phy_vars_ue
->
PHY_measurements
.
n0_power_tot_dB
=
(
unsigned
short
)
dB_fixed
(
phy_vars_ue
->
PHY_measurements
.
n0_power_tot
/
20
);
phy_vars_ue
->
PHY_measurements
.
n0_power_tot_dBm
=
phy_vars_ue
->
PHY_measurements
.
n0_power_tot_dB
-
phy_vars_ue
->
rx_total_gain_dB
;
}
}
}
}
}
}
}
...
...
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