Documentation
  • Coverage
  • 16.67%
    1 out of 6 items documented0 out of 2 items with examples
  • Size
  • Source code size: 17.98 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • jhlywa/wspr
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jhlywa

WSPR

wspr is a Rust crate for encoding a callsign, a four character Maidenhead grid square, and a power level (in dBm) into the 162 symbols needed for a WSPR transmission. Each resulting symbol is in the range 0-3 and may be transmitted using 4 tone FSK.

Each tone is separated by 1.464Hz and is 683ms in length.

Only Type 1 WSPR messages are supported.

no_std

The wspr crate is no_std by default.

Optional Features

The wspr crate provides the following optional Cargo features:

  • defmt-03: Implements defmt::Format for wspr::Error

Example


if let Ok(symbols) = wspr::encode("KA1BCD", "FM17", 37) {
    // 20m WSPR dial frequency in KHz
    let dial = 14095.6;

    // WSPR transmit frequencies are 1.5KHz above the dial frequency
    let offset = 1.5;

    for symbol in symbols.iter() {
        let frequency = dial + offset + (0.001464 * symbol);
        // A notional WSPR transmission
        // set_frequency(frequency);
        // enable_tx();
        // sleep_ms(683);
    }
    // disable_tx();
}