dsp

package
v0.0.0-...-744b870 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

rtldavis, an rtl-sdr receiver for Davis Instruments weather stations. Copyright (C) 2015 Douglas Hall

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const IQBYTES_PER_BLOCK = SAMPLES_PER_BLOCK * IQBYTES_PER_SAMPLE
View Source
const IQBYTES_PER_SAMPLE = 2
View Source
const SAMPLES_PER_BLOCK = 512

Variables

This section is empty.

Functions

func FIR9

func FIR9(in, out []complex128)

func Quantize

func Quantize(input []float64, output []byte)

Types

type ByteToCmplxLUT

type ByteToCmplxLUT [256]float64

func NewByteToCmplxLUT

func NewByteToCmplxLUT() (lut ByteToCmplxLUT)

func (*ByteToCmplxLUT) Execute

func (l *ByteToCmplxLUT) Execute(in []byte, out []complex128)

type Demodulator

type Demodulator struct {
	Cfg *PacketConfig

	Raw           []byte
	IQ            []complex128
	Filtered      []complex128
	Discriminated []float64
	Quantized     []byte
	// contains filtered or unexported fields
}

func NewDemodulator

func NewDemodulator(cfg *PacketConfig) (d Demodulator)

func (*Demodulator) Demodulate

func (d *Demodulator) Demodulate(input []byte) []Packet

func (*Demodulator) Discriminate

func (d *Demodulator) Discriminate(in []complex128, out []float64)

func (*Demodulator) Pack

func (d *Demodulator) Pack(input []byte)

func (*Demodulator) Reset

func (d *Demodulator) Reset()

func (*Demodulator) Search

func (d *Demodulator) Search() (indexes []int)

func (*Demodulator) Slice

func (d *Demodulator) Slice(indices []int) (pkts []Packet)

type Packet

type Packet struct {
	Idx  int
	Data []byte
}

type PacketConfig

type PacketConfig struct {
	SymbolsPerByte int

	BitRate                        int
	SymbolLength                   int
	PreambleSymbols, PacketSymbols int

	Preamble       string
	PreambleBytes  []byte
	PreambleFinder *byteFinder

	SampleRate                   int
	BlockSize, BlockSize2        int
	PreambleLength, PacketLength int
	BufferLength                 int
}

PacketConfig specifies packet-specific radio configuration.

func NewPacketConfig

func NewPacketConfig(symbolsPerByte, bitRate, symbolLength, preambleSymbols, packetSymbols int, preamble string) PacketConfig

func (PacketConfig) Log

func (cfg PacketConfig) Log()

type UnitDelay

type UnitDelay struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL