18 #ifndef INCLUDE_CHANALYZERNG_H 19 #define INCLUDE_CHANALYZERNG_H 38 #define ssbFftLen 1024 87 m_sampleRate(sampleRate),
88 m_centerFrequency(centerFrequency)
135 virtual void feed(
const SampleVector::const_iterator& begin,
const SampleVector::const_iterator& end,
bool positiveOnly);
136 virtual void start();
141 virtual void getTitle(QString& title) { title = objectName(); }
144 virtual QByteArray
serialize()
const {
return QByteArray(); }
145 virtual bool deserialize(
const QByteArray& data) { (void) data;
return false; }
153 (void) sinkElseSource;
194 void setFilters(
int sampleRate,
float bandwidth,
float lowCutoff);
203 if (m_settings.
m_ssb & !m_usb) {
214 if (m_settings.
m_ssb & !m_usb) {
215 m_sampleBuffer.push_back(
Sample(a.imag(), a.real()));
217 m_sampleBuffer.push_back(
Sample(a.real(), a.imag()));
224 if (m_settings.
m_ssb & !m_usb) {
225 m_sampleBuffer.push_back(
Sample(s.imag(), s.real()));
227 m_sampleBuffer.push_back(
Sample(s.real(), s.imag()));
235 #endif // INCLUDE_CHANALYZERNG_H
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)
double getMagSqAvg() const
std::vector< Sample > SampleVector
virtual int getNbSinkStreams() const
DownChannelizer * m_channelizer
float getDeltaPhi() const
MovingAverageUtil< double, double, 480 > m_channelPowerAvg
Real m_interpolatorDistanceRemain
virtual bool handleMessage(const Message &cmd)
Processing of a message. Returns true if message has actually been processed.
void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force=false)
static MsgReportChannelSampleRateChanged * create()
std::complex< float > cmplx
SampleVector m_sampleBuffer
virtual ~ChannelAnalyzer()
MsgReportChannelSampleRateChanged()
static const QString m_channelId
Real getPllFrequency() const
#define MESSAGE_CLASS_DECLARATION
void applySettings(const ChannelAnalyzerSettings &settings, bool force=false)
void setSampleSink(BasebandSampleSink *sampleSink)
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
virtual qint64 getCenterFrequency() const
Applies to a default stream.
DownChannelizer * getChannelizer()
virtual bool deserialize(const QByteArray &data)
virtual void getTitle(QString &title)
int m_inputFrequencyOffset
void feedOneSample(const fftfilt::cmplx &s, const fftfilt::cmplx &pll)
virtual void getIdentifier(QString &id)
Interpolator m_interpolator
void processOneSample(Complex &c, fftfilt::cmplx *sideband)
virtual int getNbSourceStreams() const
BasebandSampleSink * m_sampleSink
int getInputSampleRate() const
ThreadedBasebandSampleSink * m_threadedChannelizer
Real getPllDeltaPhase() const
Real m_interpolatorDistance
ChannelAnalyzerSettings m_settings
virtual QByteArray serialize() const
std::complex< Real > Complex
int getChannelSampleRate() const
static const QString m_channelIdURI
int run(const cmplx &inA, const cmplx *inB, cmplx **out)
if inB = 0 then run auto-correlation
void setFilters(int sampleRate, float bandwidth, float lowCutoff)
ChannelAnalyzer(DeviceAPI *deviceAPI)
int getDecimation() const