Olivia and Contestia demodulator (compatible with fldigi): the PCM audio data is written to the decoder and the decoded characters are written to the output. The input can be 8, 16 or 32 bit signed samples with any number of channels (only OliviaConfig::channel is evaluated).
More...
#include <OliviaDecoder.h>
|
| | OliviaDecoder ()=default |
| | OliviaDecoder (Print &out) |
| OliviaConfig | defaultConfig () |
| | Provides a default configuration: olivia-32-1000.
|
| void | setAudioInfo (audio_tools::AudioInfo info) override |
| | Defines the format of the input audio data.
|
| audio_tools::AudioInfo | audioInfo () override |
| bool | begin (OliviaConfig config) |
| | Starts the processing with the indicated configuration.
|
| bool | begin () override |
| void | end () override |
| | Processes the remaining samples and reports the end of the carrier.
|
| void | flush () override |
| | Processes the remaining samples (e.g. at the end of the input).
|
| size_t | write (const uint8_t *data, size_t len) override |
| | Provide PCM data to the decoder.
|
| bool | isCarrier () override |
| | true while a transmission is received
|
| bool | isFinished () override |
| | true if the decoding was stopped (rx_one)
|
| float | signalToNoise () |
| | Signal to noise ratio of the synchronizer.
|
| float | frequencyOffset () |
| | Frequency offset of the received signal in Hz.
|
| OliviaConfig & | config () |
| | The configuration which was provided in begin().
|
| | operator bool () override |
| void | setStatusOutput (Print &out) |
| | Defines the output for the ### CARRIER / ### NOCARRIER messages.
|
| void | setQuiet (bool quiet) |
| | Suppresses the status messages.
|
| const char * | mime () override |
|
| void | resetState () |
| void | resetSync () |
| | Forgets the timing and frequency of the last transmission.
|
| float | noise () |
| | uniform random value in the range -0.5 to 0.5
|
| void | addSample8k (float x) |
| void | processSlice () |
| | FFT over the last symbol_len samples and decoding of all offsets.
|
| void | softDecode (const float *tone_energy, int8_t *out) |
| | Soft bits of a symbol from the tone energies (like fldigi).
|
| int | repeatedSymbols (const int8_t *block) |
| | Number of symbols which are equal to the previous symbol (hard decision).
|
| void | linearize (const int8_t *buffer, int8_t *block) |
| | Copies the circular soft bit buffer: the oldest symbol first.
|
| void | evaluateBlock () |
| | Provides the best block if the signal to noise ratio is sufficient.
|
| void | outputChar (uint8_t ch) |
| void | startOfCarrier () |
| void | endOfCarrier () |
| void | status (const char *fmt,...) |
|
| static constexpr int | SLICES = 2 |
| static constexpr float | BLOCK_THRESHOLD = 1.0f |
| | minimum signal to noise ratio of a block relative to the sync threshold
|
Olivia and Contestia demodulator (compatible with fldigi): the PCM audio data is written to the decoder and the decoded characters are written to the output. The input can be 8, 16 or 32 bit signed samples with any number of channels (only OliviaConfig::channel is evaluated).
The input is converted to 8000 Hz. Twice per symbol the tone energies are measured with an FFT and converted to soft bits for each possible frequency offset (+/- OliviaConfig::sync_margin FFT bins). For each time slice and frequency offset the last FEC block is decoded after every symbol. The synchronizer integrates the signal and noise of the decoded blocks over OliviaConfig::sync_integration blocks and selects the block timing and the frequency offset with the strongest signal. A block is provided if its signal to noise ratio is above OliviaConfig::sync_threshold. The idle character 0 is not provided.
Memory: about (2 * sync_margin + 1) * 3 * symbolsPerBlock() * (bits per symbol + 16) bytes plus 20 * symbolLen() bytes, e.g. 30 kB for olivia-32-1000.
- Copyright
- GPLv3
◆ OliviaDecoder() [1/2]
| tinymodem::OliviaDecoder::OliviaDecoder |
( |
| ) |
|
|
default |
◆ OliviaDecoder() [2/2]
| tinymodem::OliviaDecoder::OliviaDecoder |
( |
Print & | out | ) |
|
|
inline |
◆ addSample8k()
| void tinymodem::OliviaDecoder::addSample8k |
( |
float | x | ) |
|
|
inlineprotected |
◆ audioInfo()
| audio_tools::AudioInfo tinymodem::OliviaDecoder::audioInfo |
( |
| ) |
|
|
inlineoverride |
◆ begin() [1/2]
| bool tinymodem::OliviaDecoder::begin |
( |
| ) |
|
|
inlineoverride |
◆ begin() [2/2]
Starts the processing with the indicated configuration.
◆ config()
The configuration which was provided in begin().
◆ defaultConfig()
Provides a default configuration: olivia-32-1000.
◆ end()
| void tinymodem::OliviaDecoder::end |
( |
| ) |
|
|
inlineoverride |
Processes the remaining samples and reports the end of the carrier.
◆ endOfCarrier()
| void tinymodem::OliviaDecoder::endOfCarrier |
( |
| ) |
|
|
inlineprotected |
◆ evaluateBlock()
| void tinymodem::OliviaDecoder::evaluateBlock |
( |
| ) |
|
|
inlineprotected |
Provides the best block if the signal to noise ratio is sufficient.
◆ flush()
| void tinymodem::OliviaDecoder::flush |
( |
| ) |
|
|
inlineoverridevirtual |
◆ frequencyOffset()
| float tinymodem::OliviaDecoder::frequencyOffset |
( |
| ) |
|
|
inline |
Frequency offset of the received signal in Hz.
◆ isCarrier()
| bool tinymodem::OliviaDecoder::isCarrier |
( |
| ) |
|
|
inlineoverridevirtual |
◆ isFinished()
| bool tinymodem::OliviaDecoder::isFinished |
( |
| ) |
|
|
inlineoverridevirtual |
◆ linearize()
| void tinymodem::OliviaDecoder::linearize |
( |
const int8_t * | buffer, |
|
|
int8_t * | block ) |
|
inlineprotected |
Copies the circular soft bit buffer: the oldest symbol first.
◆ noise()
| float tinymodem::OliviaDecoder::noise |
( |
| ) |
|
|
inlineprotected |
uniform random value in the range -0.5 to 0.5
◆ operator bool()
| tinymodem::OliviaDecoder::operator bool |
( |
| ) |
|
|
inlineoverride |
◆ outputChar()
| void tinymodem::OliviaDecoder::outputChar |
( |
uint8_t | ch | ) |
|
|
inlineprotected |
◆ processSlice()
| void tinymodem::OliviaDecoder::processSlice |
( |
| ) |
|
|
inlineprotected |
FFT over the last symbol_len samples and decoding of all offsets.
◆ repeatedSymbols()
| int tinymodem::OliviaDecoder::repeatedSymbols |
( |
const int8_t * | block | ) |
|
|
inlineprotected |
Number of symbols which are equal to the previous symbol (hard decision).
◆ resetState()
| void tinymodem::OliviaDecoder::resetState |
( |
| ) |
|
|
inlineprotected |
◆ resetSync()
| void tinymodem::OliviaDecoder::resetSync |
( |
| ) |
|
|
inlineprotected |
Forgets the timing and frequency of the last transmission.
◆ setAudioInfo()
| void tinymodem::OliviaDecoder::setAudioInfo |
( |
audio_tools::AudioInfo | info | ) |
|
|
inlineoverride |
Defines the format of the input audio data.
◆ signalToNoise()
| float tinymodem::OliviaDecoder::signalToNoise |
( |
| ) |
|
|
inline |
Signal to noise ratio of the synchronizer.
◆ softDecode()
| void tinymodem::OliviaDecoder::softDecode |
( |
const float * | tone_energy, |
|
|
int8_t * | out ) |
|
inlineprotected |
Soft bits of a symbol from the tone energies (like fldigi).
◆ startOfCarrier()
| void tinymodem::OliviaDecoder::startOfCarrier |
( |
| ) |
|
|
inlineprotected |
◆ write()
| size_t tinymodem::OliviaDecoder::write |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
|
inlineoverride |
Provide PCM data to the decoder.
◆ best_noise
| float tinymodem::OliviaDecoder::best_noise = 0 |
|
protected |
◆ best_offset
| int tinymodem::OliviaDecoder::best_offset = 0 |
|
protected |
◆ best_phase
| int tinymodem::OliviaDecoder::best_phase = 0 |
|
protected |
◆ best_signal
| float tinymodem::OliviaDecoder::best_signal = 0 |
|
protected |
◆ bits
| int tinymodem::OliviaDecoder::bits = 5 |
|
protected |
◆ block_len
| int tinymodem::OliviaDecoder::block_len = 64 |
|
protected |
◆ block_snr
| audio_tools::Vector<float> tinymodem::OliviaDecoder::block_snr |
|
protected |
◆ BLOCK_THRESHOLD
| float tinymodem::OliviaDecoder::BLOCK_THRESHOLD = 1.0f |
|
staticconstexprprotected |
minimum signal to noise ratio of a block relative to the sync threshold
◆ blocks
| audio_tools::Vector<uint64_t> tinymodem::OliviaDecoder::blocks |
|
protected |
◆ carrier
| bool tinymodem::OliviaDecoder::carrier = false |
|
protected |
◆ cfg
◆ codec
◆ converter
◆ energy
| audio_tools::Vector<float> tinymodem::OliviaDecoder::energy |
|
protected |
◆ escape
| bool tinymodem::OliviaDecoder::escape = false |
|
protected |
◆ fft
◆ fft_im
| audio_tools::Vector<float> tinymodem::OliviaDecoder::fft_im |
|
protected |
◆ fft_re
| audio_tools::Vector<float> tinymodem::OliviaDecoder::fft_re |
|
protected |
◆ first_bin
| int tinymodem::OliviaDecoder::first_bin = 0 |
|
protected |
◆ input
| PcmInput tinymodem::OliviaDecoder::input |
|
protected |
◆ is_active
| bool tinymodem::OliviaDecoder::is_active = false |
|
protected |
◆ is_finished
| bool tinymodem::OliviaDecoder::is_finished = false |
|
protected |
◆ margin
| int tinymodem::OliviaDecoder::margin = 8 |
|
protected |
◆ nblocks
| unsigned tinymodem::OliviaDecoder::nblocks = 0 |
|
protected |
◆ ndata
| unsigned tinymodem::OliviaDecoder::ndata = 0 |
|
protected |
◆ noise_seed
| uint32_t tinymodem::OliviaDecoder::noise_seed = 1 |
|
protected |
◆ offsets
| int tinymodem::OliviaDecoder::offsets = 17 |
|
protected |
◆ phase
| int tinymodem::OliviaDecoder::phase = 0 |
|
protected |
◆ phases
| int tinymodem::OliviaDecoder::phases = 128 |
|
protected |
◆ sample_pos
| int tinymodem::OliviaDecoder::sample_pos = 0 |
|
protected |
◆ samples
| audio_tools::Vector<float> tinymodem::OliviaDecoder::samples |
|
protected |
◆ slice
| int tinymodem::OliviaDecoder::slice = 0 |
|
protected |
◆ slice_countdown
| int tinymodem::OliviaDecoder::slice_countdown = 0 |
|
protected |
◆ SLICES
| int tinymodem::OliviaDecoder::SLICES = 2 |
|
staticconstexprprotected |
◆ snr
| float tinymodem::OliviaDecoder::snr = 0 |
|
protected |
◆ snr_total
| float tinymodem::OliviaDecoder::snr_total = 0 |
|
protected |
◆ soft
| audio_tools::Vector<int8_t> tinymodem::OliviaDecoder::soft |
|
protected |
◆ soft_pos
| int tinymodem::OliviaDecoder::soft_pos = 0 |
|
protected |
◆ symbol_len
| int tinymodem::OliviaDecoder::symbol_len = 512 |
|
protected |
◆ sync_noise
| audio_tools::Vector<float> tinymodem::OliviaDecoder::sync_noise |
|
protected |
◆ sync_signal
| audio_tools::Vector<float> tinymodem::OliviaDecoder::sync_signal |
|
protected |
◆ tones
| int tinymodem::OliviaDecoder::tones = 32 |
|
protected |
◆ width
| int tinymodem::OliviaDecoder::width = 0 |
|
protected |
◆ window
| audio_tools::Vector<float> tinymodem::OliviaDecoder::window |
|
protected |
The documentation for this class was generated from the following file: