Documentation ¶
Overview ¶
Package kerberos contains the KerberosSDR driver for hz.tools/sdr
Index ¶
- type CoherentReadCloser
- type CoherentSdr
- type OffsetSdr
- type Sdr
- func (k Sdr) Close() error
- func (k Sdr) GetCenterFrequency() (rf.Hz, error)
- func (k Sdr) GetGain(gainStage sdr.GainStage) (float32, error)
- func (k Sdr) GetGainStages() (sdr.GainStages, error)
- func (k Sdr) GetPPM() int
- func (k Sdr) GetSampleRate() (uint, error)
- func (k Sdr) HardwareInfo() sdr.HardwareInfo
- func (k Sdr) ResetBuffer() error
- func (k Sdr) SampleFormat() sdr.SampleFormat
- func (k Sdr) SetAutomaticGain(automatic bool) error
- func (k Sdr) SetBiasT(on bool) error
- func (k Sdr) SetBiasTGPIO(pin int, on bool) error
- func (k Sdr) SetCenterFrequency(freq rf.Hz) error
- func (k Sdr) SetGain(gainStage sdr.GainStage, gain float32) error
- func (k Sdr) SetPPM(ppm int) error
- func (k Sdr) SetSampleRate(sps uint) error
- func (k Sdr) SetTestMode(on bool) error
- func (k Sdr) Tuner() rtl.Tuner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoherentReadCloser ¶
type CoherentReadCloser sdr.ReadClosers
CoherentReadCloser is a slice of ReadClosers, which are in sample lock.
func (CoherentReadCloser) Close ¶
func (cr CoherentReadCloser) Close() error
Close will close all the ReadClosers.
func (CoherentReadCloser) ReadersC64 ¶
func (cr CoherentReadCloser) ReadersC64() ([]sdr.Reader, error)
ReadersC64 will return a Reader slice, but converting to C64 while writing them out.
type CoherentSdr ¶
type CoherentSdr struct { *Sdr // contains filtered or unexported fields }
CoherentSdr will return a "meta-sdr" that tunes each of the 4 Kerberos SDR dongles to the same frequency, and allow for a StartCoherentRx call.
func NewCoherent ¶
NewCoherent will create a new CoherentSdr.
func (*CoherentSdr) StartCoherentRx ¶
func (c *CoherentSdr) StartCoherentRx() (sdr.ReadClosers, error)
StartCoherentRx will start all the RTL dongles, align the Readers, and return a slice of CoherentReadCloser objects.
This will toggle the BiasT feature (RNG), and also flip the AGC on. If the AGC is not needed, it needs to be explicitly turned off after this function call.
type OffsetSdr ¶
type OffsetSdr struct { *CoherentSdr // contains filtered or unexported fields }
OffsetSdr will return a "meta-sdr" that tunes each of the 4 Kerberos SDR dongles to adjacent frequency bands, and combine those SDRs into a single SDR at 4 times the sample rate.
func (*OffsetSdr) GetSampleRate ¶
GetSampleRate implements the sdr.Sdr interface.
func (*OffsetSdr) SetCenterFrequency ¶
SetCenterFrequency will set the 4 RTL tuners to adjacent frequency bands to allow for capture at a higher sample rate.
func (*OffsetSdr) SetSampleRate ¶
SetSampleRate implements the sdr.Sdr interface.
func (*OffsetSdr) StartRx ¶
func (k *OffsetSdr) StartRx() (sdr.ReadCloser, error)
StartRx will start a coherent receive, align the buffers, and return a reader which will stream at 4 times the sample rate of the underlying SDR objects.
Mismatched sample rates, changing frequencies under the hood or changing things manually during the RX may result in some seriously weird shit.
type Sdr ¶
Sdr is a Kerberos SDR, 4 RTL-SDR dongles in one!
func (Sdr) GetCenterFrequency ¶
GetCenterFrequency implements the sdr.Sdr interface.
func (Sdr) GetGainStages ¶
func (k Sdr) GetGainStages() (sdr.GainStages, error)
GetGainStages implements the sdr.Sdr interface.
func (Sdr) GetSampleRate ¶
GetSampleRate implements the sdr.Sdr interface.
func (Sdr) HardwareInfo ¶
func (k Sdr) HardwareInfo() sdr.HardwareInfo
HardwareInfo implements the sdr.Sdr interface.
func (Sdr) ResetBuffer ¶
ResetBuffer will reset the rtl-sdr Buffers.
func (Sdr) SampleFormat ¶
func (k Sdr) SampleFormat() sdr.SampleFormat
SampleFormat implements the sdr.Sdr interface.
func (Sdr) SetAutomaticGain ¶
SetAutomaticGain implements the sdr.Sdr interface.
func (Sdr) SetBiasTGPIO ¶
SetBiasTGPIO will toggle a GPIO Pin.
func (Sdr) SetCenterFrequency ¶
SetCenterFrequency implements the sdr.Sdr interface.
func (Sdr) SetSampleRate ¶
SetSampleRate implements the sdr.Sdr interface.
func (Sdr) SetTestMode ¶
SetTestMode will turn the RTL-SDR into a test mode.