Skip to content

Commit 63f0cb5

Browse files
committed
tweaked ch command line help and comments
1 parent 50528d9 commit 63f0cb5

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/ch.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
AUTHOR......: David Rowe
55
DATE CREATED: May 2015
66
7-
Channel impairment program for testing command line versions of modems.
7+
Channel simulation program for testing command line versions of modems.
88
99
\*---------------------------------------------------------------------------*/
1010

@@ -92,15 +92,17 @@ int main(int argc, char *argv[])
9292

9393
if (argc < 3) {
9494
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"
9698
"\n"
9799
" real int16 input -> Gain -> Hilbert Transform -> clipper -> freq shift ->\n"
98100
" Multipath -> AWGN noise -> SSB filter -> real int16 output\n"
99101
"\n"
100102
"[--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"
102104
"[--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"
104106
"[--fading_dir Path] path to multipath fading files (default 'unittest')\n"
105107
"[--Fs SampleRateHz] Sample rate of simulation (default 8000 Hz)\n"
106108
"[--gain G] Linear gain (default 1.0)\n"
@@ -301,11 +303,11 @@ int main(int argc, char *argv[])
301303
frames++;
302304

303305
/* 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.
306308
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[].
309311
*/
310312

311313
for(i=0, j=HT_N; i<BUF_N; i++,j++) {
@@ -363,7 +365,7 @@ int main(int argc, char *argv[])
363365
ch_fdm_delay[i] = ch_fdm[j];
364366

365367
/* combine direct and delayed paths, both multiplied by
366-
"spreading" (doppler) functions */
368+
"spreading" (Doppler) functions */
367369

368370
for(i=0; i<BUF_N; i++) {
369371
ret = fread(&aspread, sizeof(COMP), 1, ffading);
@@ -465,7 +467,7 @@ int main(int argc, char *argv[])
465467
if (ffading != NULL) fclose(ffading);
466468
if (ch_fdm_delay != NULL) FREE(ch_fdm_delay);
467469
if (ctest) {
468-
/* special ctest modes, check CPAPR is around 0dB */
470+
/* special ctest mode: check CPAPR is around 0dB */
469471
if (fabs(papr) < 0.7) return 0; else return 1;
470472
}
471473
else return 0;

0 commit comments

Comments
 (0)