Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
48525be2
Commit
48525be2
authored
Nov 07, 2016
by
Bilel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix-18' into 'develop1B'
[OAI-UE] fix for issue#18: Cell sync issue See merge request !6
parents
ca6ddf90
b831f156
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
+8
-7
openair1/PHY/LTE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_TRANSPORT/initial_sync.c
+7
-0
No files found.
openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
View file @
48525be2
...
@@ -102,7 +102,7 @@ int lte_est_freq_offset(int **dl_ch_estimates,
...
@@ -102,7 +102,7 @@ int lte_est_freq_offset(int **dl_ch_estimates,
{
{
int
ch_offset
,
omega
,
dl_ch_shift
;
int
ch_offset
,
omega
,
dl_ch_shift
;
struct
complex16
*
omega_cpx
;
struct
complex16
omega_cpx
;
double
phase_offset
;
double
phase_offset
;
int
freq_offset_est
;
int
freq_offset_est
;
unsigned
char
aa
;
unsigned
char
aa
;
...
@@ -142,9 +142,8 @@ int lte_est_freq_offset(int **dl_ch_estimates,
...
@@ -142,9 +142,8 @@ int lte_est_freq_offset(int **dl_ch_estimates,
// printf("Computing freq_offset\n");
// printf("Computing freq_offset\n");
omega
=
dot_product
(
dl_ch
,
dl_ch_prev
,(
frame_parms
->
N_RB_DL
/
2
-
1
)
*
12
,
dl_ch_shift
);
omega
=
dot_product
(
dl_ch
,
dl_ch_prev
,(
frame_parms
->
N_RB_DL
/
2
-
1
)
*
12
,
dl_ch_shift
);
//omega = dot_product(dl_ch,dl_ch_prev,frame_parms->ofdm_symbol_size,15);
//omega = dot_product(dl_ch,dl_ch_prev,frame_parms->ofdm_symbol_size,15);
omega_cpx
=
(
struct
complex16
*
)
&
omega
;
omega_cpx
.
r
=
((
struct
complex16
*
)
&
omega
)
->
r
;
omega_cpx
.
i
=
((
struct
complex16
*
)
&
omega
)
->
i
;
// printf("omega (%d,%d)\n",omega_cpx->r,omega_cpx->i);
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[
aa
][(((
frame_parms
->
N_RB_DL
/
2
)
+
1
)
*
12
)
+
ch_offset
];
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[
aa
][(((
frame_parms
->
N_RB_DL
/
2
)
+
1
)
*
12
)
+
ch_offset
];
...
@@ -155,10 +154,12 @@ int lte_est_freq_offset(int **dl_ch_estimates,
...
@@ -155,10 +154,12 @@ int lte_est_freq_offset(int **dl_ch_estimates,
// calculate omega = angle(conj(dl_ch)*dl_ch_prev))
// calculate omega = angle(conj(dl_ch)*dl_ch_prev))
omega
=
dot_product
(
dl_ch
,
dl_ch_prev
,((
frame_parms
->
N_RB_DL
/
2
)
-
1
)
*
12
,
dl_ch_shift
);
omega
=
dot_product
(
dl_ch
,
dl_ch_prev
,((
frame_parms
->
N_RB_DL
/
2
)
-
1
)
*
12
,
dl_ch_shift
);
omega_cpx
->
r
+=
((
struct
complex16
*
)
&
omega
)
->
r
;
omega_cpx
->
i
+=
((
struct
complex16
*
)
&
omega
)
->
i
;
omega_cpx
.
r
+=
((
struct
complex16
*
)
&
omega
)
->
r
;
omega_cpx
.
i
+=
((
struct
complex16
*
)
&
omega
)
->
i
;
// phase_offset += atan2((double)omega_cpx->i,(double)omega_cpx->r);
// phase_offset += atan2((double)omega_cpx->i,(double)omega_cpx->r);
phase_offset
+=
atan2
((
double
)
omega_cpx
->
i
,(
double
)
omega_cpx
->
r
);
phase_offset
+=
atan2
((
double
)
omega_cpx
.
i
,(
double
)
omega_cpx
.
r
);
// LOG_I(PHY,"omega (%d,%d) -> %f\n",omega_cpx->r,omega_cpx->i,phase_offset);
// LOG_I(PHY,"omega (%d,%d) -> %f\n",omega_cpx->r,omega_cpx->i,phase_offset);
}
}
...
...
openair1/PHY/LTE_TRANSPORT/initial_sync.c
View file @
48525be2
...
@@ -462,6 +462,13 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -462,6 +462,13 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
}
}
}
}
/* Consider this is a false detection if the offset is > 1000 Hz */
if
(
(
abs
(
ue
->
common_vars
.
freq_offset
)
>
1000
)
&&
(
ret
==
0
)
)
{
ret
=-
1
;
LOG_E
(
HW
,
"Ignore MIB with high freq offset [%d Hz] estimation
\n
"
,
ue
->
common_vars
.
freq_offset
);
}
if
(
ret
==
0
)
{
// PBCH found so indicate sync to higher layers and configure frame parameters
if
(
ret
==
0
)
{
// PBCH found so indicate sync to higher layers and configure frame parameters
//#ifdef DEBUG_INITIAL_SYNCH
//#ifdef DEBUG_INITIAL_SYNCH
...
...
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