mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-26 02:20:20 -04:00 
			
		
		
		
	git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6437 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
		
			
				
	
	
		
			22 lines
		
	
	
		
			945 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			945 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| # Example of coding using a (7,4) Hamming code, with transmission through
 | |
| # a Binary Symmetric Channel with error probability of 0.05.
 | |
| #
 | |
| # This example shows how random source messages can be encoded as codewords, 
 | |
| # transmitted through the simulated channel, decoded, and the message bits
 | |
| # extracted from the codewords.  The final result is in ex-ham7b.ext, which can
 | |
| # be compared to ex-ham7b.src.
 | |
| 
 | |
| set -e  # Stop if an error occurs
 | |
| set -v  # Echo commands as they are read
 | |
|   
 | |
| make-pchk ex-ham7b.pchk 3 7 0:0 0:3 0:4 0:5 1:1 1:3 1:4 1:6 2:2 2:4 2:5 2:6
 | |
| make-gen  ex-ham7b.pchk ex-ham7b.gen dense
 | |
| rand-src  ex-ham7b.src 1 4x1000
 | |
| encode    ex-ham7b.pchk ex-ham7b.gen ex-ham7b.src ex-ham7b.enc
 | |
| transmit  ex-ham7b.enc ex-ham7b.rec 1 bsc 0.05
 | |
| decode    ex-ham7b.pchk ex-ham7b.rec ex-ham7b.dec bsc 0.05 enum-bit ex-ham7b.gen
 | |
| verify    ex-ham7b.pchk ex-ham7b.dec ex-ham7b.gen ex-ham7b.src
 | |
| extract   ex-ham7b.gen ex-ham7b.dec ex-ham7b.ext
 |