Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
e7a5fb5d
Commit
e7a5fb5d
authored
Dec 19, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4c8d7492
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
50 deletions
+0
-50
software/ors-amarisoft/k/ssb_nr_arfcn_test.py
software/ors-amarisoft/k/ssb_nr_arfcn_test.py
+0
-50
No files found.
software/ors-amarisoft/k/ssb_nr_arfcn_test.py
deleted
100755 → 0
View file @
4c8d7492
#!/usr/bin/env python
# test dl_nr_arfcn -> ssb_nr_arfcn calculation
import
nrarfcn
as
nr
khz
=
1e-3
# we work in MHz
def
default_ssb_nr_arfcn
(
dl_nr_arfcn
,
scs_khz
):
f
=
nr
.
get_frequency
(
nrarfcn
=
dl_nr_arfcn
)
gscn
=
nr
.
get_gscn_by_frequency
(
f
)
if
nr
.
get_frequency_by_gscn
(
gscn
)
>
f
:
gscn
-=
1
# align fg to be multiple of scs
scs
=
scs_khz
*
khz
while
1
:
fg
=
nr
.
get_frequency_by_gscn
(
gscn
)
# check `fg % scs == 0` with tolerating fp rounding
r
=
(
fg
%
scs
)
/
scs
#print('gscn %d\tfg %.16g %%scs %.16g·scs' % (gscn, fg, r))
if
abs
(
r
-
round
(
r
))
<
1e-5
:
break
gscn
-=
1
fg_arfcn
=
nr
.
get_nrarfcn
(
fg
)
return
fg_arfcn
def
_
(
dl_nr_arfcn
,
scs_khz
):
ssb_nr_arfcn
=
default_ssb_nr_arfcn
(
dl_nr_arfcn
,
scs_khz
)
f
=
nr
.
get_frequency
(
dl_nr_arfcn
)
fssb
=
nr
.
get_frequency
(
ssb_nr_arfcn
)
gssb
=
nr
.
get_gscn_by_frequency
(
fssb
)
scs
=
scs_khz
*
khz
# subcarrier spacing
fssb_div_scs
=
fssb
/
scs
fssb_mod_scs
=
fssb
%
scs
print
(
"%d %d -> %d
\
t
; %.16g MHz
\
t
-> %.16g Mhz
\
t
gscn %d
\
t
/scs %.16g %%scs %.16g·scs"
%
(
dl_nr_arfcn
,
scs_khz
,
ssb_nr_arfcn
,
f
,
fssb
,
gssb
,
fssb_div_scs
,
fssb_mod_scs
/
scs
))
print
(
'# dl_nr_arfcn scs -> ssb_nr_arfcn'
)
_
(
633300
,
30
)
_
(
632628
,
30
)
_
(
630336
,
30
)
_
(
627300
,
30
)
_
(
624288
,
30
)
_
(
532000
,
30
)
_
(
530890
,
30
)
_
(
526000
,
30
)
_
(
524650
,
30
)
_
(
523020
,
30
)
_
(
437000
,
30
)
_
(
176300
,
30
)
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