|
4 | 4 | AUTHOR......: David Rowe |
5 | 5 | DATE CREATED: May 2015 |
6 | 6 |
|
7 | | - Channel impairment program for testing command line versions of modems. |
| 7 | + Channel simulation program for testing command line versions of modems. |
8 | 8 |
|
9 | 9 | \*---------------------------------------------------------------------------*/ |
10 | 10 |
|
@@ -92,15 +92,17 @@ int main(int argc, char *argv[]) |
92 | 92 |
|
93 | 93 | if (argc < 3) { |
94 | 94 | helpmsg: |
95 | | - fprintf(stderr, "usage: %s InputRealModemRawFile OutputRealModemRawFile [Options]\n" |
| 95 | + fprintf(stderr, "Command line channel simulation tool.\n" |
| 96 | + "\n" |
| 97 | + "usage: %s InputRealModemRawFile OutputRealModemRawFile [Options]\n" |
96 | 98 | "\n" |
97 | 99 | " real int16 input -> Gain -> Hilbert Transform -> clipper -> freq shift ->\n" |
98 | 100 | " Multipath -> AWGN noise -> SSB filter -> real int16 output\n" |
99 | 101 | "\n" |
100 | 102 | "[--clip int16] Hilbert clipper (clip complex signal magnitude, default 32767)\n" |
101 | | - "[--complexout] Optional int16 IQ complex output (default real)\n" |
| 103 | + "[--complexout] Optional int16 IQ complex output (default real int16)\n" |
102 | 104 | "[--ctest] Check PAPR is around 0dB, used to support ctests\n" |
103 | | - "[--freqq FoffHz] Frequency offset (default 0Hz)\n" |
| 105 | + "[--freq FoffHz] Frequency offset (default 0Hz)\n" |
104 | 106 | "[--fading_dir Path] path to multipath fading files (default 'unittest')\n" |
105 | 107 | "[--Fs SampleRateHz] Sample rate of simulation (default 8000 Hz)\n" |
106 | 108 | "[--gain G] Linear gain (default 1.0)\n" |
@@ -301,11 +303,11 @@ int main(int argc, char *argv[]) |
301 | 303 | frames++; |
302 | 304 |
|
303 | 305 | /* Hilbert Transform to produce complex signal so we can do |
304 | | - single sided freq shifts, HF channel modemsl, and analog compression. |
305 | | - Allows us to use real signal I/O which is handy. |
| 306 | + single sided freq shifts, HF channel models, and analog |
| 307 | + compression. Allows us to use real signal I/O. |
306 | 308 |
|
307 | | - As the real and imag filters both have unity gain, ch_in[] has twice |
308 | | - the power of the real input signal buf[]. |
| 309 | + As the real and imag filters both have unity gain, ch_in[] |
| 310 | + has twice the power of the real input signal buf[]. |
309 | 311 | */ |
310 | 312 |
|
311 | 313 | for(i=0, j=HT_N; i<BUF_N; i++,j++) { |
@@ -363,7 +365,7 @@ int main(int argc, char *argv[]) |
363 | 365 | ch_fdm_delay[i] = ch_fdm[j]; |
364 | 366 |
|
365 | 367 | /* combine direct and delayed paths, both multiplied by |
366 | | - "spreading" (doppler) functions */ |
| 368 | + "spreading" (Doppler) functions */ |
367 | 369 |
|
368 | 370 | for(i=0; i<BUF_N; i++) { |
369 | 371 | ret = fread(&aspread, sizeof(COMP), 1, ffading); |
@@ -465,7 +467,7 @@ int main(int argc, char *argv[]) |
465 | 467 | if (ffading != NULL) fclose(ffading); |
466 | 468 | if (ch_fdm_delay != NULL) FREE(ch_fdm_delay); |
467 | 469 | if (ctest) { |
468 | | - /* special ctest modes, check CPAPR is around 0dB */ |
| 470 | + /* special ctest mode: check CPAPR is around 0dB */ |
469 | 471 | if (fabs(papr) < 0.7) return 0; else return 1; |
470 | 472 | } |
471 | 473 | else return 0; |
|
0 commit comments