|
TinyModem
Header-only software audio modem library
|
Configuration of the Olivia and Contestia modems (OliviaEncoder, OliviaDecoder): MFSK with 2 to 256 tones and a strong forward error correction (Walsh-Hadamard codes over blocks of 64 or 32 symbols), as designed by Pawel Jalocha and implemented by fldigi. More...
#include <Olivia.h>


Public Member Functions | |
| OliviaConfig () | |
| bool | setMode (const char *mode) |
| int | bitsPerSymbol () const |
| number of bits per symbol (log2 of the tones) | |
| int | symbolLen () const |
| FFT length (window of a symbol) in samples at 8000 Hz. | |
| int | symbolSepar () const |
| distance of two symbols in samples at 8000 Hz | |
| int | symbolsPerBlock () const |
| symbols per FEC block: 64 for Olivia, 32 for Contestia | |
| int | bitsPerCharacter () const |
| bits per character: 7 for Olivia, 6 for Contestia | |
| int | firstCarrier () const |
| lowest tone as FFT bin (like fldigi) | |
| float | toneFreq (int tone) const |
| frequency of a tone in Hz | |
| float | symbolRate () const |
| symbols per second | |
| float | charRate () const |
| characters per second | |
| bool | isValid () const |
| Checks the configuration: returns false (and logs the reason) if invalid. | |
Static Public Member Functions | |
| static bool | isMode (const char *mode) |
| true if the mode is an Olivia or Contestia mode | |
Public Attributes | |
| int | tones = 32 |
| number of tones (power of 2: 2 - 256) | |
| int | bandwidth = 1000 |
| bandwidth in Hz: 125, 250, 500, 1000 or 2000 | |
| float | center_freq = 1500.0f |
| center frequency in Hz | |
| bool | contestia = false |
| Contestia instead of Olivia. | |
| float | volume = 1.0f |
| transmit amplitude (0.0 - 1.0) | |
| bool | start_tones = true |
| transmitter: send the start and stop tones (like fldigi) | |
| int | sync_margin = 8 |
| int | sync_integration = 4 |
| receiver: integration period of the synchronizer in FEC blocks | |
| float | sync_threshold = 3.0f |
| receiver: minimum signal to noise ratio of the synchronizer | |
| bool | rx_one = false |
| receiver: stop after the first transmission | |
| uint8_t | channel = 0 |
| receiver: input channel which is used for the decoding | |
| float | rx_noise = 0.0f |
| receiver: (testing only) amplitude of added uniform noise | |
Static Public Attributes | |
| static constexpr float | BASE_RATE = 8000.0f |
| internal sample rate which defines the signal | |
| static constexpr int | MAX_SYMBOL_LEN = 2048 |
| largest supported FFT length | |
Static Protected Member Functions | |
| static bool | parseMode (const char *mode, int &tones, int &bandwidth, bool &contestia) |
| static bool | startsWith (const char *str, const char *prefix) |
Configuration of the Olivia and Contestia modems (OliviaEncoder, OliviaDecoder): MFSK with 2 to 256 tones and a strong forward error correction (Walsh-Hadamard codes over blocks of 64 or 32 symbols), as designed by Pawel Jalocha and implemented by fldigi.
setMode() selects "olivia-T-B" or "contestia-T-B" with T tones and a bandwidth B of 125, 250, 500, 1000 or 2000 Hz (also written as 1k or 2k), e.g. "olivia-8-250" or "olivia-32-1000". "olivia" is "olivia-32-1000", "contestia" is "contestia-8-250". Olivia sends 7 bit characters (and 8 bit characters escaped with 127 like fldigi), Contestia sends upper case text with 6 bit characters at twice the speed: a line break is sent as '\r' (which fldigi shows as new line), '\r' is ignored.
The signal is defined at 8000 Hz: other sample rates are converted.
|
inline |
|
inline |
bits per character: 7 for Olivia, 6 for Contestia
|
inline |
number of bits per symbol (log2 of the tones)
|
inline |
characters per second
|
inline |
lowest tone as FFT bin (like fldigi)
|
inlinestatic |
true if the mode is an Olivia or Contestia mode
|
inline |
Checks the configuration: returns false (and logs the reason) if invalid.
|
inlinestaticprotected |
|
inline |
Selects e.g. "olivia-32-1000", "olivia-8-250" or "contestia-8-250": returns false if invalid. The other settings are kept.
|
inlinestaticprotected |
|
inline |
FFT length (window of a symbol) in samples at 8000 Hz.
|
inline |
symbols per second
|
inline |
distance of two symbols in samples at 8000 Hz
|
inline |
symbols per FEC block: 64 for Olivia, 32 for Contestia
|
inline |
frequency of a tone in Hz
| int tinymodem::OliviaConfig::bandwidth = 1000 |
bandwidth in Hz: 125, 250, 500, 1000 or 2000
|
staticconstexpr |
internal sample rate which defines the signal
| float tinymodem::OliviaConfig::center_freq = 1500.0f |
center frequency in Hz
| uint8_t tinymodem::OliviaConfig::channel = 0 |
receiver: input channel which is used for the decoding
| bool tinymodem::OliviaConfig::contestia = false |
Contestia instead of Olivia.
|
staticconstexpr |
largest supported FFT length
| float tinymodem::OliviaConfig::rx_noise = 0.0f |
receiver: (testing only) amplitude of added uniform noise
| bool tinymodem::OliviaConfig::rx_one = false |
receiver: stop after the first transmission
| bool tinymodem::OliviaConfig::start_tones = true |
transmitter: send the start and stop tones (like fldigi)
| int tinymodem::OliviaConfig::sync_integration = 4 |
receiver: integration period of the synchronizer in FEC blocks
| int tinymodem::OliviaConfig::sync_margin = 8 |
receiver: search range for the frequency in tone spacings / 2 (fldigi: tune margin): limited to the available audio band
| float tinymodem::OliviaConfig::sync_threshold = 3.0f |
receiver: minimum signal to noise ratio of the synchronizer
| int tinymodem::OliviaConfig::tones = 32 |
number of tones (power of 2: 2 - 256)
| float tinymodem::OliviaConfig::volume = 1.0f |
transmit amplitude (0.0 - 1.0)