aboutsummaryrefslogtreecommitdiff
path: root/unittest/ofdm_fade.sh
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2025-07-25 10:17:14 +0300
committerMarin Ivanov <[email protected]>2026-01-18 20:09:26 +0200
commit0168586485e6310c598713c911b1dec5618d61a1 (patch)
tree6aabc2a12ef8fef70683f5389bea00f948015f77 /unittest/ofdm_fade.sh
Initial commitHEADmaster
* codec2 cut-down version 1.2.0 * Remove codebook and generation of sources * remove c2dec c2enc binaries * prepare for emscripten
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)"