Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NextPowerOf2 ¶
Types ¶
type AlphaMaxBetaMinLUT ¶
type AlphaMaxBetaMinLUT []float64
Alpha*Max + Beta*Min Magnitude Approximation Lookup Table.
func NewAlphaMaxBetaMinLUT ¶
func NewAlphaMaxBetaMinLUT() (lut AlphaMaxBetaMinLUT)
Pre-computes absolute values with most common DC offset for rtl-sdr dongles.
func (AlphaMaxBetaMinLUT) Execute ¶
func (lut AlphaMaxBetaMinLUT) Execute(input []byte, output []float64)
Calculates complex magnitude on given IQ stream writing result to output.
type Decoder ¶
type Decoder struct {
Cfg PacketConfig
IQ []byte
Signal []float64
Filtered []float64
Quantized []byte
// contains filtered or unexported fields
}
Decoder contains buffers and radio configuration.
func NewDecoder ¶
func NewDecoder(cfg PacketConfig, fastMag bool) (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) Pack ¶
Packs 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.
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
func NewSqrtMagLUT ¶
func NewSqrtMagLUT() (lut MagLUT)
Pre-computes normalized squares with most common DC offset for rtl-sdr dongles.
type PacketConfig ¶
type PacketConfig struct {
DataRate int
BlockSize, BlockSize2 int
SymbolLength, SymbolLength2 int
SampleRate int
PreambleSymbols, PacketSymbols int
PreambleLength, PacketLength int
BufferLength int
Preamble string
CenterFreq uint32
}
PacketConfig specifies packet-specific radio configuration.
func (PacketConfig) Log ¶
func (cfg PacketConfig) Log()