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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
06c0374e
Commit
06c0374e
authored
Sep 02, 2024
by
Roberto Rosca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added UE support for position coordinates taken from conf files
parent
054506f5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
2 deletions
+86
-2
CMakeLists.txt
CMakeLists.txt
+1
-0
executables/nr-ue.c
executables/nr-ue.c
+2
-0
executables/position_interface.c
executables/position_interface.c
+33
-0
executables/position_interface.h
executables/position_interface.h
+38
-0
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+6
-2
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
+6
-0
No files found.
CMakeLists.txt
View file @
06c0374e
...
...
@@ -2079,6 +2079,7 @@ add_executable(nr-uesoftmodem
${
rrc_h
}
${
s1ap_h
}
${
OPENAIR_DIR
}
/executables/nr-uesoftmodem.c
${
OPENAIR_DIR
}
/executables/position_interface.c
${
OPENAIR_DIR
}
/executables/nr-ue.c
${
OPENAIR_DIR
}
/executables/softmodem-common.c
${
OPENAIR_DIR
}
/radio/COMMON/common_lib.c
...
...
executables/nr-ue.c
View file @
06c0374e
...
...
@@ -41,6 +41,7 @@
#include "PHY/MODULATION/nr_modulation.h"
#include "instrumentation.h"
#include "common/utils/threadPool/notified_fifo.h"
#include "position_interface.h"
/*
* NR SLOT PROCESSING SEQUENCE
...
...
@@ -157,6 +158,7 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue, uint8_t UE_id)
ue
->
target_Nid_cell
=
-
1
;
ue
->
timing_advance
=
ue
->
frame_parms
.
samples_per_subframe
*
get_nrUE_params
()
->
ntn_ta_common
;
check_position
(
UE_id
);
// initialize all signal buffers
init_nr_ue_signal
(
ue
,
nb_connected_gNB
);
...
...
executables/position_interface.c
0 → 100644
View file @
06c0374e
#include "position_interface.h"
extern
uint16_t
NB_UE_INST
;
static
position_t
**
positionArray
=
0
;
position_t
*
check_position
(
int
Mod_id
)
{
AssertFatal
(
Mod_id
<
NB_UE_INST
,
"Mod_id must be less than NB_UE_INST. Mod_id:%d NB_UE_INST:%d"
,
Mod_id
,
NB_UE_INST
);
if
(
positionArray
==
NULL
)
{
positionArray
=
(
position_t
**
)
calloc
(
1
,
sizeof
(
position_t
*
)
*
NB_UE_INST
);
}
if
(
!
positionArray
[
Mod_id
])
{
char
positionName
[
64
];
sprintf
(
positionName
,
"position%d"
,
Mod_id
);
positionArray
[
Mod_id
]
=
(
void
*
)
init_position
(
positionName
);
}
return
(
position_t
*
)
positionArray
[
Mod_id
];
}
position_t
*
init_position
(
char
*
sectionName
)
{
position_t
*
position
=
(
position_t
*
)
calloc
(
sizeof
(
position_t
),
1
);
paramdef_t
position_params
[]
=
POSITION_CONFIG_PARAMS_DEF
;
int
ret
=
config_get
(
config_get_if
(),
position_params
,
sizeofArray
(
position_params
),
sectionName
);
AssertFatal
(
ret
>=
0
,
"configuration couldn't be performed for position name: %s"
,
sectionName
);
return
position
;
}
position_t
*
get_position
(
int
Mod_id
)
{
return
positionArray
[
Mod_id
];
}
\ No newline at end of file
executables/position_interface.h
0 → 100644
View file @
06c0374e
#ifndef __POSITION_INTERFACE__H__
#define __POSITION_INTERFACE__H__
#include <executables/nr-softmodem-common.h>
#include <executables/softmodem-common.h>
#include "PHY/defs_nr_UE.h"
#include "executables/nr-uesoftmodem.h"
/* position configuration parameters name */
#define CONFIG_STRING_POSITION_X "x"
#define CONFIG_STRING_POSITION_Y "y"
#define CONFIG_STRING_POSITION_Z "z"
#define HELP_STRING_POSITION "Postion coordinates (x, y, z) config params"
// Position parameters config
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* position configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
// clang-format off
#define POSITION_CONFIG_PARAMS_DEF { \
{CONFIG_STRING_POSITION_X, HELP_STRING_POSITION, 0, .dblptr=&(position->positionX), .defuintval=0, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_POSITION_Y, HELP_STRING_POSITION, 0, .dblptr=&(position->positionY), .defuintval=0, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_POSITION_Z, HELP_STRING_POSITION, 0, .dblptr=&(position->positionZ), .defuintval=0, TYPE_DOUBLE, 0} \
}
// clang-format on
typedef
struct
{
double
positionX
;
double
positionY
;
double
positionZ
;
}
position_t
;
position_t
*
check_position
(
int
Mod_id
);
position_t
*
init_position
(
char
*
sectionName
);
position_t
*
get_position
(
int
Mod_id
);
#endif
\ No newline at end of file
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
06c0374e
...
...
@@ -41,10 +41,14 @@
#include <executables/softmodem-common.h>
#include "openair2/LAYER2/RLC/rlc.h"
#include "nr-uesoftmodem.h"
static
double
get_ta_Common_ms
(
NR_NTN_Config_r17_t
*
ntn_Config_r17
)
{
if
(
ntn_Config_r17
&&
ntn_Config_r17
->
ta_Info_r17
)
return
ntn_Config_r17
->
ta_Info_r17
->
ta_Common_r17
*
4.072e-6
;
// ta_Common_r17 is in units of 4.072e-3 µs
if
(
ntn_Config_r17
&&
ntn_Config_r17
->
ta_Info_r17
)
{
// ta_Common_r17 is in units of 4.072e-3 µs
return
(
ntn_Config_r17
->
ta_Info_r17
->
ta_Common_r17
*
4.072e-6
+
get_nrUE_params
()
->
ntn_ta_common
)
*
2
;
}
return
0
.
0
;
}
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
View file @
06c0374e
...
...
@@ -6,3 +6,9 @@ dnn= "oai";
nssai_sst
=
1
;
nssai_sd
=
1
;
}
position0
= {
x
=
0
.
0
;
y
=
0
.
0
;
z
=
6371400
.
0
;
}
\ No newline at end of file
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