aboutsummaryrefslogtreecommitdiff
path: root/unittest/ofdm_fade.sh
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/ofdm_fade.sh')
-rwxr-xr-xunittest/ofdm_fade.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/unittest/ofdm_fade.sh b/unittest/ofdm_fade.sh
new file mode 100755
index 0000000..03f290e
--- /dev/null
+++ b/unittest/ofdm_fade.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+#
+# David June 2019
+# Tests 700D OFDM modem fading channel performance, using a simulated channel
+
+results=$(mktemp)
+fading_dir=$1
+# BER should be around 4% for this test (it's better for larger interleavers but no one uses interleaving in practice)
+ofdm_mod --in /dev/zero --ldpc 1 --testframes 60 --txbpf | ch - - --No -24 -f -10 --mpp --fading_dir $fading_dir | ofdm_demod --out /dev/null --testframes --verbose 2 --ldpc 1 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)"