drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
206 stars 52 forks source link

Coherent PSK doesn't seem to have a Scatter Diagram #163

Closed ghost closed 3 years ago

ghost commented 3 years ago

I've been working on a side project, and it never produces a scatter plot in Mode 700C, so I tried generating one with:

./cohpsk_get_test_bits - 5600 | ./cohpsk_mod - - | ./cohpsk_ch - - -40 | ./cohpsk_demod - - -o cohpsk_demod.txt

and using octave

cohpsk_demod_plot("../build_linux/src/cohpsk_demod.txt")

Which shows the GUI scatter diagram correctly.

ghost commented 3 years ago

If I try

./cohpsk_get_test_bits - 56000 | ./cohpsk_mod - - | ./cohpsk_ch - /tmp/scatter.raw -40

and read that into FreeDV as a raw file, the waterfall and spectrum looks OK, but no scatter plot.

drowe67 commented 3 years ago

You might need to resample to 8000 Hz, cohpsk runs natively at Fs=7500 or something like that IIRC.

ghost commented 3 years ago

Thanks, I'll try that.

ghost commented 3 years ago

Thanks David, that was easy. Yes, scatter plot works fine resampled.

Maybe comments at top of cohpsk_mod.c change to:

  Given an input file of bits (note one bit per float, soft decision format),
  outputs a raw file (7500 Hz, 16 bit shorts) of COHPSK modem samples
  ready to send over a HF radio channel.