Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NextPowerOf2 ¶
Types ¶
type Decoder ¶
type Decoder struct { Cfg PacketConfig Decimation int DecCfg PacketConfig Signal []float64 Filtered []float64 Quantized []byte // contains filtered or unexported fields }
Decoder contains buffers and radio configuration.
func NewDecoder ¶
func NewDecoder(cfg PacketConfig, decimation int) (d Decoder)
Create a new decoder with the given packet configuration.
func (Decoder) Decode ¶
Decode accepts a sample block and performs various DSP techniques to extract a packet.
func (Decoder) Filter ¶
Matched filter for Manchester coded signals. Output signal's sign at each sample determines the bit-value since Manchester symbols have odd symmetry.
func (*Decoder) Search ¶
For each sample offset look for the preamble. Return a list of indexes the preamble is found at. Indexes are absolute in the unsliced quantized buffer.
func (Decoder) Slice ¶ added in v0.6.1
Given a list of indeces the preamble exists at, sample the appropriate bits of the signal's bit-decision. Pack bits of each index into an array of byte arrays and return.
func (*Decoder) Transpose ¶ added in v0.8.0
Transpose quantized signal into slices such that the first rank represents sample offsets and the second represents the value of each symbol from the given offset.
Transforms: <--Sym1--><--Sym2--><--Sym3--><--Sym4--><--Sym5--><--Sym6--><--Sym7--><--Sym8--> <12345678><12345678><12345678><12345678><12345678><12345678><12345678><12345678> to: <11111111><22222222><33333333><44444444><55555555><66666666><77777777><88888888>
type Demodulator ¶ added in v0.6.1
A Demodulator knows how to demodulate an array of uint8 IQ samples into an array of float64 samples.
type MagLUT ¶
type MagLUT []float64
Default Magnitude Lookup Table
type PacketConfig ¶
type PacketConfig struct { DataRate int BlockSize, BlockSize2 int SymbolLength, SymbolLength2 int SampleRate int PreambleSymbols, PacketSymbols int PreambleLength, PacketLength int Preamble string BufferLength int CenterFreq uint32 }
PacketConfig specifies packet-specific radio configuration.
func (PacketConfig) Decimate ¶ added in v0.6.2
func (cfg PacketConfig) Decimate(decimation int) PacketConfig