Giter Club home page Giter Club logo

wspr-cui's Introduction

WSPR CUI code

  • Based on wsprd and wsprcode source taken from WSJT-X 2.7.1
  • wsprsimwav derived from wsprsim
  • Code of CUI interface for WSPR TX/RX is at wspr-trx/

Requirements

How to build

cd wsprd
make clean && make

Code formatting

Use make format to format the code.

Tips

Note: tips for only WSPR-2 minute protocol are described unless otherwise noted

For generating wav file

  • Use wsprsimwav for generating a 48kHz mono WAV file, directly usable for transmission over USB transmitter
  • The first and last 20 milliseconds parts of the sound generated by wsprsimwav are faded in/out with the raised-cosine envelope to reduce spurious emission

For reading wav file by wsprd

  • WAV header (first 22 bytes) are ignored
  • Format: fixed to S16_LE, 12000Hz, monaural (1 channel)
  • Length: 114 seconds (see readwavfile() in wsprd.c)

.c2 file format by wsprd

  • Length per file: 360026 bytes
  • Header: 26 bytes
    • Filename: first 14 bytes as char
    • WSPR type: next 4 bytes as int (2 for WSPR-2, 15 for WSPR-15)
    • Frequency: next 8 bytes as double in MHz
  • Interleaved IQ signal
    • Strictly 45000 frames for 120 seconds of 375 frames/second
    • each frame has two float numbers (4 x 2 = 8 bytes / frame)
    • frame data: I, and -Q (negated Q)

For generating .c2 file

  • wsprsim generates no noise if SNR is 40 or more
  • wsprsim generates reverse shift signal of -f option when processed with the following csdr script

Make .c2 file audible

  • Note: this sound output does not decode on WSJT-X
  • Do not use this output for sending WSPR on the air
# upsample from 375Hz to 12000Hz sampling rate (with +-120Hz LPF)
# then shifting up 1500Hz (for make the signal audible)
# Output level: -6dB rms 
tail -c +27 201223_0000.c2 | 
    csdr plain_interpolate_cc 32 | 
    csdr bandpass_fir_fft_cc -0.01 0.01 0.001 | 
    csdr gain_ff 16 | csdr shift_math_cc 0.125 | 
    play --buffer=1024 -t raw -e floating-point -b32 -r 12000 -c 2 -q -

WSPR-2 timing and frequency

  • The channel symbol output corresponds to lowest to highest frequencies, from 0 to 3, with 1.46484375 (= 12000/8192) Hz frequency shift, respectively.
  • The channel spacing diagram from the center frequency:
    • Symbol 0: -2.197265625 Hz ( = -18000/8192 Hz)
    • Symbol 1: -0.732421875 Hz ( = -6000/8192 Hz)
    • Symbol 2: +0.732421875 Hz ( = +6000/8192 Hz)
    • Symbol 3: +2.197265625 Hz ( = +18000/8192 Hz)
  • Transmission rate: 1.46484375 baud = 0.682666667 second/symbol = 8192/12000 second
  • Each transmission contains 162 symbols for 110.592 seconds
  • Each transmission starts +1 second after even UTC minute (e.g., 00:01, 02:01)

LICENSE

GPLv3

wspr-cui's People

Contributors

jj1bdx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wspr-cui's Issues

Hard crack in wsprsimwav file

Hi!

There seems to be a hard crack in the .wav files generated by wsprsimwav just at the point that it transitions from silence to modulation (see image). Unfortunately this causes some splatter on my SDR so I was wondering what I can do, or can be done, to make this a little better?

I've tried with 0 db, -6db, -9db output and its mostly the same.

-- Essell

image

Missing overview of dependencies

It would help the user to see the dependencies before running into make errors.

  • gfortran
  • maybe others not fulfilled on a clean Raspbian image
    Thank you,
    de Erwin

Making .c2 files decodable (not the same as audible)

Dear Kenji-san,

I take this opportunity to ask you a question on your interesting work on wsprd.

I would like to be able to recover a .wav file from a .c2 file my Red Pitaya FPGA is producing. For wspr or FT8 I can directly decode the .c2 file with wsprd or ft8d. But the FST4W decoder jt9 does not accept .c2 files, only .wav files.
Your information tells me you can make a .c2 file audible but not decodable.
Do you have a clue why it is not so far recovered that it can be decoded ?
Is that 'just' the 1500 Hz shift or is more at stake?

Thank you kindly for your reaction,
Erwin

User error or other in python3 wspr-trx-event-loop.py

~/wspr-cui/wspr-trx $ python3 wspr-trx-event-loop.py
Traceback (most recent call last):
File "wspr-trx-event-loop.py", line 5, in
from apscheduler.schedulers.blocking import BlockingScheduler
ModuleNotFoundError: No module named 'apscheduler'

Alsa error when trying to play the wspr file - can't encode 0-bit Unknown or not applicable

~/wspr-cui $ tail -c +27 wspr_5_14095599_1_220216_1414.c2 | csdr plain_interpolate_cc 32 | csdr bandpass_fir_fft_cc -0.01 0.01 0.001 | csdr gain_ff 16 | csdr shift_math_cc 0.125 | play --buffer=1024 -t raw -e floating-point -b32 -r 12000 -c 2 -q -
csdr bandpass_fir_fft_cc: window = HAMMING
csdr bandpass_fir_fft_cc: (fft_size = 8192) = (taps_length = 3999) + (input_size = 4194) - 1
(overlap_length = 3998) = taps_length - 1
play WARN alsa: can't encode 0-bit Unknown or not applicable
csdr bandpass_fir_fft_cc: filter initialized, low_cut = -0.01, high_cut = 0.01
play WARN alsa: under-run
Other wav files like music can be played on the system

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.