File: ofdm_fade_dpsk.sh

package info (click to toggle)
codec2 1.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 121,056 kB
  • sloc: ansic: 414,118; sh: 2,612; objc: 2,574; python: 2,105; cpp: 2,091; asm: 683; makefile: 598
file content (15 lines) | stat: -rwxr-xr-x 651 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
#
# David Sep 2019
# Tests 2020 OFDM modem fading channel performance in DPSK mode, using a simulated faster (2Hz) high SNR fading channel

fading_dir=$1
results=$(mktemp)

# Coded BER should be < 1% for this test
ofdm_mod --in /dev/zero --testframes 300 --mode 2020 --ldpc --verbose 1 --dpsk | \
ch - - --No -40 -f 10 --ssbfilt 1 --mpd --fading_dir $fading_dir --multipath_delay 2 | \
ofdm_demod --out /dev/null --testframes --mode 2020 --verbose 1 --ldpc --dpsk 2> $results
cat $results
cber=$(cat $results | sed -n "s/^Coded BER.* \([0-9..]*\) Tbits.*/\1/p")
python3 -c "import sys; sys.exit(0) if $cber<=0.05 else sys.exit(1)"