Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
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
Libraries
UERANSIM
Commits
fee3c028
Commit
fee3c028
authored
Apr 03, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE SAS dev.
parent
52eb0de5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
src/gnb/sas/handler.cpp
src/gnb/sas/handler.cpp
+3
-1
src/ue/sas/measurement.cpp
src/ue/sas/measurement.cpp
+2
-12
No files found.
src/gnb/sas/handler.cpp
View file @
fee3c028
...
...
@@ -9,7 +9,7 @@
#include "task.hpp"
#include <cmath>
static
int
MIN_ALLOWED_DBM
=
-
1
0
0
;
static
int
MIN_ALLOWED_DBM
=
-
1
2
0
;
static
int
EstimateSimulatedDbm
(
const
Vector3
&
myPos
,
const
Vector3
&
uePos
)
{
...
...
@@ -18,6 +18,8 @@ static int EstimateSimulatedDbm(const Vector3 &myPos, const Vector3 &uePos)
int
deltaZ
=
myPos
.
z
-
uePos
.
z
;
int
distance
=
static_cast
<
int
>
(
std
::
sqrt
(
deltaX
*
deltaX
+
deltaY
*
deltaY
+
deltaZ
*
deltaZ
));
if
(
distance
==
0
)
return
-
1
;
// 0 may be confusing for people
return
-
distance
;
}
...
...
src/ue/sas/measurement.cpp
View file @
fee3c028
...
...
@@ -9,8 +9,6 @@
#include "task.hpp"
#include <utils/common.hpp>
static
int
DBM_STRONG_STRENGTH_THRESHOLD
=
-
70
;
namespace
nr
::
ue
{
...
...
@@ -22,20 +20,12 @@ void UeSasTask::onMeasurement()
// compare active and pending measurements
for
(
auto
&
m
:
m_activeMeasurements
)
{
bool
oldStrong
=
m
.
second
.
dbm
>=
DBM_STRONG_STRENGTH_THRESHOLD
;
if
(
m_pendingMeasurements
.
count
(
m
.
first
))
{
bool
newStrong
=
m_pendingMeasurements
[
m
.
first
].
dbm
>=
DBM_STRONG_STRENGTH_THRESHOLD
;
if
(
newStrong
^
oldStrong
)
(
newStrong
?
entered
:
exited
).
push_back
(
m
.
first
);
}
else
if
(
oldStrong
)
if
(
!
m_pendingMeasurements
.
count
(
m
.
first
))
exited
.
push_back
(
m
.
first
);
}
for
(
auto
&
m
:
m_pendingMeasurements
)
{
bool
newStrong
=
m_pendingMeasurements
[
m
.
first
].
dbm
>=
DBM_STRONG_STRENGTH_THRESHOLD
;
if
(
!
m_activeMeasurements
.
count
(
m
.
first
)
&&
newStrong
)
if
(
!
m_activeMeasurements
.
count
(
m
.
first
))
entered
.
push_back
(
m
.
first
);
}
if
(
!
entered
.
empty
()
||
!
exited
.
empty
())
...
...
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