Skip to content

Commit 9a25dc4

Browse files
committed
Fixed the size of outputs of the turbo encoder.
1 parent c8a53e2 commit 9a25dc4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commpy/channelcoding/turbo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def turbo_encode(msg_bits, trellis1, trellis2, interleaver):
5151
puncture_matrix = array([[0, 1]])
5252
non_sys_stream_2 = conv_encode(interlv_msg_bits, trellis2, 'rsc', puncture_matrix)
5353

54-
non_sys_stream_2 = non_sys_stream_2[0:-2]
54+
sys_stream = sys_stream[0:-trellis1.total_memory]
55+
non_sys_stream_1 = non_sys_stream_1[0:-trellis1.total_memory]
56+
non_sys_stream_2 = non_sys_stream_2[0:-trellis2.total_memory]
5557

5658
return [sys_stream, non_sys_stream_1, non_sys_stream_2]
5759

0 commit comments

Comments
 (0)