| Crates.io | wspr |
| lib.rs | wspr |
| version | 0.1.0 |
| created_at | 2025-03-31 01:03:56.590751+00 |
| updated_at | 2025-03-31 01:03:56.590751+00 |
| description | WSPR encoder |
| homepage | |
| repository | https://github.com/jhlywa/wspr |
| max_upload_size | |
| id | 1612916 |
| size | 18,471 |
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.
The wspr crate is no_std by default.
The wspr crate provides the following optional Cargo features:
defmt-03: Implements defmt::Format for wspr::Error
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();
}