mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-24 21:28:41 -05:00
733630d7f3
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6527 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
42 lines
1.2 KiB
Bash
Executable File
42 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# jt65 end-to-end simulator. Run enough cases to get a given
|
|
# number of successful decodes or a given number of errors
|
|
# For better performance, copy this script and jt65, jt65sim
|
|
# executables to a ramdisk and run from there.
|
|
|
|
mode=C
|
|
spread=4.0
|
|
|
|
for i in `seq 0 21`;
|
|
do
|
|
nruns=0
|
|
ndecodes=0
|
|
ngood=0
|
|
nbad=0
|
|
snr=$((-25+$i))
|
|
#while [ $[ $nruns - $ngood ] -lt 200 ]
|
|
#while [ $ngood -lt 200 ]
|
|
while [ $nruns -lt 1000 ]
|
|
do
|
|
rm 000000_0001.wav
|
|
./jt65sim -m $mode -n 1 -d $spread -s \\$snr > /dev/null
|
|
rm decoded.txt
|
|
./jt65 -m $mode -a 10 -f 1500 -n 1000 -s 000000_0001.wav > decoded.txt
|
|
if [ -e decoded.txt ]; then
|
|
nd=$( wc -l < decoded.txt )
|
|
ng=$( grep "K1ABC" decoded.txt | wc -l )
|
|
nb=$[$nd-$ng]
|
|
ndecodes=$[$ndecodes + $nd]
|
|
ngood=$[$ngood + $ng]
|
|
nbad=$[$nbad + $nb]
|
|
fi
|
|
nruns=$[$nruns + 1]
|
|
nmissed=$[$nruns-$ngood]
|
|
pe=$( echo "scale=5; $nmissed/$nruns" | bc -l )
|
|
ps=$( echo "scale=5; $ngood/$nruns" | bc -l )
|
|
echo -en snr: $snr nruns: $nruns ndecodes: $ndecodes ngood: $ngood nbad: $nbad nmissed: $nmissed wer: $pe success: $ps"\r"
|
|
done
|
|
echo snr: $snr nruns: $nruns ndecodes: $ndecodes ngood: $ngood nbad: $nbad nmissed: $nmissed wer: $pe success: $ps
|
|
done
|