Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
47e58872
提交
47e58872
authored
7月 22, 2014
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tweaks to the V.17 modem
上级
e5cad4d7
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
12 行增加
和
21 行删除
+12
-21
v17rx.c
libs/spandsp/src/v17rx.c
+12
-21
没有找到文件。
libs/spandsp/src/v17rx.c
浏览文件 @
47e58872
...
...
@@ -103,9 +103,9 @@
/*! The nominal baud or symbol rate */
#define BAUD_RATE 2400
/*! The adaption rate coefficient for the equalizer during initial training */
#define EQUALIZER_
DELTA 0.21f
/*! The adaption rate coefficient for the equalizer during
continuous
fine tuning */
#define EQUALIZER_SLOW_ADAPT
_RATIO 0.1f
#define EQUALIZER_
FAST_ADAPTION_DELTA (0.21f/V17_EQUALIZER_LEN)
/*! The adaption rate coefficient for the equalizer during fine tuning */
#define EQUALIZER_SLOW_ADAPT
ION_DELTA (0.1f*EQUALIZER_FAST_ADAPTION_DELTA)
/* Segments of the training sequence */
/*! The length of training segment 1, in symbols */
...
...
@@ -236,11 +236,11 @@ static void equalizer_restore(v17_rx_state_t *s)
#if defined(SPANDSP_USE_FIXED_POINTx)
cvec_copyi16
(
s
->
eq_coeff
,
s
->
eq_coeff_save
,
V17_EQUALIZER_LEN
);
cvec_zeroi16
(
s
->
eq_buf
,
V17_EQUALIZER_LEN
);
s
->
eq_delta
=
32768
.
0
f
*
EQUALIZER_SLOW_ADAPT
_RATIO
*
EQUALIZER_DELTA
/
V17_EQUALIZER_LEN
;
s
->
eq_delta
=
32768
.
0
f
*
EQUALIZER_SLOW_ADAPT
ION_DELTA
;
#else
cvec_copyf
(
s
->
eq_coeff
,
s
->
eq_coeff_save
,
V17_EQUALIZER_LEN
);
cvec_zerof
(
s
->
eq_buf
,
V17_EQUALIZER_LEN
);
s
->
eq_delta
=
EQUALIZER_SLOW_ADAPT
_RATIO
*
EQUALIZER_DELTA
/
V17_EQUALIZER_LEN
;
s
->
eq_delta
=
EQUALIZER_SLOW_ADAPT
ION_DELTA
;
#endif
s
->
eq_put_step
=
RX_PULSESHAPER_COEFF_SETS
*
10
/
(
3
*
2
)
-
1
;
...
...
@@ -258,14 +258,14 @@ static void equalizer_reset(v17_rx_state_t *s)
cvec_zeroi16
(
s
->
eq_coeff
,
V17_EQUALIZER_LEN
);
s
->
eq_coeff
[
V17_EQUALIZER_PRE_LEN
]
=
x
;
cvec_zeroi16
(
s
->
eq_buf
,
V17_EQUALIZER_LEN
);
s
->
eq_delta
=
32768
.
0
f
*
EQUALIZER_
DELTA
/
V17_EQUALIZER_LEN
;
s
->
eq_delta
=
32768
.
0
f
*
EQUALIZER_
FAST_ADAPTION_DELTA
;
#else
static
const
complexf_t
x
=
{
FP_CONSTELLATION_SCALE
(
3
.
0
f
),
FP_CONSTELLATION_SCALE
(
0
.
0
f
)};
cvec_zerof
(
s
->
eq_coeff
,
V17_EQUALIZER_LEN
);
s
->
eq_coeff
[
V17_EQUALIZER_PRE_LEN
]
=
x
;
cvec_zerof
(
s
->
eq_buf
,
V17_EQUALIZER_LEN
);
s
->
eq_delta
=
EQUALIZER_
DELTA
/
V17_EQUALIZER_LEN
;
s
->
eq_delta
=
EQUALIZER_
FAST_ADAPTION_DELTA
;
#endif
s
->
eq_put_step
=
RX_PULSESHAPER_COEFF_SETS
*
10
/
(
3
*
2
)
-
1
;
...
...
@@ -627,15 +627,6 @@ static __inline__ void symbol_sync(v17_rx_state_t *s)
/* A little integration will now filter away much of the HF noise */
s
->
baud_phase
-=
p
;
v
=
labs
(
s
->
baud_phase
);
if
(
v
>
FP_SYNC_SCALE_32
(
100
.
0
f
))
{
i
=
(
v
>
FP_SYNC_SCALE_32
(
1000
.
0
f
))
?
15
:
1
;
if
(
s
->
baud_phase
<
FP_SYNC_SCALE_32
(
0
.
0
f
))
i
=
-
i
;
//printf("v = %10.5f %5d - %f %f %d %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
s
->
eq_put_step
+=
i
;
s
->
total_baud_timing_correction
+=
i
;
}
#else
/* Cross correlate */
v
=
s
->
symbol_sync_low
[
1
]
*
s
->
symbol_sync_high
[
0
]
*
SYNC_LOW_BAND_EDGE_COEFF_2
...
...
@@ -648,6 +639,7 @@ static __inline__ void symbol_sync(v17_rx_state_t *s)
/* A little integration will now filter away much of the HF noise */
s
->
baud_phase
-=
p
;
v
=
fabsf
(
s
->
baud_phase
);
#endif
if
(
v
>
FP_SYNC_SCALE_32
(
100
.
0
f
))
{
i
=
(
v
>
FP_SYNC_SCALE_32
(
1000
.
0
f
))
?
15
:
1
;
...
...
@@ -657,7 +649,6 @@ static __inline__ void symbol_sync(v17_rx_state_t *s)
s
->
eq_put_step
+=
i
;
s
->
total_baud_timing_correction
+=
i
;
}
#endif
}
/*- End of function --------------------------------------------------------*/
...
...
@@ -747,7 +738,7 @@ static void process_half_baud(v17_rx_state_t *s, const complexf_t *sample)
out is the phase. */
/* Check if we just saw A or B */
/* atan(1/3) = 18.433 degrees */
if
((
uint32_t
)
(
angle
-
s
->
last_angles
[
0
])
<
0x80000000U
)
if
((
uint32_t
)
(
angle
-
s
->
last_angles
[
0
])
<
(
uint32_t
)
DDS_PHASE
(
180
.
0
f
)
)
{
angle
=
s
->
last_angles
[
0
];
s
->
last_angles
[
0
]
=
DDS_PHASE
(
270
.
0
f
+
18
.
433
f
);
...
...
@@ -887,7 +878,7 @@ static void process_half_baud(v17_rx_state_t *s, const complexf_t *sample)
{
/* Now the equaliser adaption should be getting somewhere, slow it down, or it will never
tune very well on a noisy signal. */
s
->
eq_delta
*=
EQUALIZER_SLOW_ADAPT_RATIO
;
s
->
eq_delta
=
EQUALIZER_SLOW_ADAPTION_DELTA
;
#if defined(SPANDSP_USE_FIXED_POINTx)
s
->
carrier_track_i
=
1000
;
#else
...
...
@@ -1188,7 +1179,7 @@ static __inline__ int signal_detect(v17_rx_state_t *s, int16_t amp)
{
if
(
++
s
->
low_samples
>
120
)
{
power_meter_init
(
&
(
s
->
power
)
,
4
);
power_meter_init
(
&
s
->
power
,
4
);
s
->
high_sample
=
0
;
s
->
low_samples
=
0
;
}
...
...
@@ -1471,7 +1462,7 @@ SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_trai
s
->
trellis_ptr
=
14
;
s
->
carrier_phase
=
0
;
power_meter_init
(
&
(
s
->
power
)
,
4
);
power_meter_init
(
&
s
->
power
,
4
);
if
(
s
->
short_train
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论