mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Changing names to emphasize that they are complex types
This commit is contained in:
parent
75ee6c1bf5
commit
bd01c841c9
@ -34,8 +34,8 @@
|
|||||||
#include <gnuradio/blocks/file_sink.h>
|
#include <gnuradio/blocks/file_sink.h>
|
||||||
#include <volk/volk.h>
|
#include <volk/volk.h>
|
||||||
#include "direct_resampler_conditioner_cc.h"
|
#include "direct_resampler_conditioner_cc.h"
|
||||||
#include "direct_resampler_conditioner_ss.h"
|
#include "direct_resampler_conditioner_cs.h"
|
||||||
#include "direct_resampler_conditioner_bb.h"
|
#include "direct_resampler_conditioner_cb.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
|
|||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(lv_16sc_t);
|
item_size_ = sizeof(lv_16sc_t);
|
||||||
resampler_ = direct_resampler_make_conditioner_ss(sample_freq_in_, sample_freq_out_);
|
resampler_ = direct_resampler_make_conditioner_cs(sample_freq_in_, sample_freq_out_);
|
||||||
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
|
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
|
||||||
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
|
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
|
||||||
DLOG(INFO) << "Item size " << item_size_;
|
DLOG(INFO) << "Item size " << item_size_;
|
||||||
@ -76,7 +76,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
|
|||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(lv_8sc_t);
|
item_size_ = sizeof(lv_8sc_t);
|
||||||
resampler_ = direct_resampler_make_conditioner_bb(sample_freq_in_, sample_freq_out_);
|
resampler_ = direct_resampler_make_conditioner_cb(sample_freq_in_, sample_freq_out_);
|
||||||
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
|
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
|
||||||
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
|
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
|
||||||
DLOG(INFO) << "Item size " << item_size_;
|
DLOG(INFO) << "Item size " << item_size_;
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
set(RESAMPLER_GR_BLOCKS_SOURCES
|
set(RESAMPLER_GR_BLOCKS_SOURCES
|
||||||
direct_resampler_conditioner_cc.cc
|
direct_resampler_conditioner_cc.cc
|
||||||
direct_resampler_conditioner_ss.cc
|
direct_resampler_conditioner_cs.cc
|
||||||
direct_resampler_conditioner_bb.cc
|
direct_resampler_conditioner_cb.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file direct_resampler_conditioner_bb.cc
|
* \file direct_resampler_conditioner_cb.cc
|
||||||
* \brief Nearest neighborhood resampler with std::complex<signed char>
|
* \brief Nearest neighborhood resampler with std::complex<signed char>
|
||||||
* input and std::complex<signed char> output
|
* input and std::complex<signed char> output
|
||||||
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "direct_resampler_conditioner_bb.h"
|
#include "direct_resampler_conditioner_cb.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
@ -41,18 +41,18 @@
|
|||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
direct_resampler_conditioner_bb_sptr direct_resampler_make_conditioner_bb(
|
direct_resampler_conditioner_cb_sptr direct_resampler_make_conditioner_cb(
|
||||||
double sample_freq_in, double sample_freq_out)
|
double sample_freq_in, double sample_freq_out)
|
||||||
{
|
{
|
||||||
|
|
||||||
return direct_resampler_conditioner_bb_sptr(
|
return direct_resampler_conditioner_cb_sptr(
|
||||||
new direct_resampler_conditioner_bb(sample_freq_in,
|
new direct_resampler_conditioner_cb(sample_freq_in,
|
||||||
sample_freq_out));
|
sample_freq_out));
|
||||||
}
|
}
|
||||||
|
|
||||||
direct_resampler_conditioner_bb::direct_resampler_conditioner_bb(
|
direct_resampler_conditioner_cb::direct_resampler_conditioner_cb(
|
||||||
double sample_freq_in, double sample_freq_out) :
|
double sample_freq_in, double sample_freq_out) :
|
||||||
gr::block("direct_resampler_make_conditioner_bb", gr::io_signature::make(1,
|
gr::block("direct_resampler_make_conditioner_cb", gr::io_signature::make(1,
|
||||||
1, sizeof(lv_8sc_t)), gr::io_signature::make(1, 1, sizeof(lv_8sc_t))),
|
1, sizeof(lv_8sc_t)), gr::io_signature::make(1, 1, sizeof(lv_8sc_t))),
|
||||||
d_sample_freq_in(sample_freq_in), d_sample_freq_out(
|
d_sample_freq_in(sample_freq_in), d_sample_freq_out(
|
||||||
sample_freq_out), d_phase(0), d_lphase(0), d_history(1)
|
sample_freq_out), d_phase(0), d_lphase(0), d_history(1)
|
||||||
@ -72,12 +72,12 @@ direct_resampler_conditioner_bb::direct_resampler_conditioner_bb(
|
|||||||
set_output_multiple(1);
|
set_output_multiple(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
direct_resampler_conditioner_bb::~direct_resampler_conditioner_bb()
|
direct_resampler_conditioner_cb::~direct_resampler_conditioner_cb()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void direct_resampler_conditioner_bb::forecast(int noutput_items,
|
void direct_resampler_conditioner_cb::forecast(int noutput_items,
|
||||||
gr_vector_int &ninput_items_required)
|
gr_vector_int &ninput_items_required)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ void direct_resampler_conditioner_bb::forecast(int noutput_items,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int direct_resampler_conditioner_bb::general_work(int noutput_items,
|
int direct_resampler_conditioner_cb::general_work(int noutput_items,
|
||||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items)
|
gr_vector_void_star &output_items)
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file direct_resampler_conditioner_bb.h
|
* \file direct_resampler_conditioner_cb.h
|
||||||
* \brief Nearest neighborhood resampler with
|
* \brief Nearest neighborhood resampler with
|
||||||
* std::complex<signed char> input and std::complex<signed char> output
|
* std::complex<signed char> input and std::complex<signed char> output
|
||||||
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
@ -29,30 +29,30 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_BB_H
|
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H
|
||||||
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_BB_H
|
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H
|
||||||
|
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
|
|
||||||
class direct_resampler_conditioner_bb;
|
class direct_resampler_conditioner_cb;
|
||||||
typedef boost::shared_ptr<direct_resampler_conditioner_bb>
|
typedef boost::shared_ptr<direct_resampler_conditioner_cb>
|
||||||
direct_resampler_conditioner_bb_sptr;
|
direct_resampler_conditioner_cb_sptr;
|
||||||
|
|
||||||
direct_resampler_conditioner_bb_sptr
|
direct_resampler_conditioner_cb_sptr
|
||||||
direct_resampler_make_conditioner_bb(double sample_freq_in,
|
direct_resampler_make_conditioner_cb(double sample_freq_in,
|
||||||
double sample_freq_out);
|
double sample_freq_out);
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a direct resampler conditioner for std::complex<signed char>
|
* \brief This class implements a direct resampler conditioner for std::complex<signed char>
|
||||||
*
|
*
|
||||||
* Direct resampling without interpolation
|
* Direct resampling without interpolation
|
||||||
*/
|
*/
|
||||||
class direct_resampler_conditioner_bb: public gr::block
|
class direct_resampler_conditioner_cb: public gr::block
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
friend direct_resampler_conditioner_bb_sptr
|
friend direct_resampler_conditioner_cb_sptr
|
||||||
direct_resampler_make_conditioner_bb(double sample_freq_in,
|
direct_resampler_make_conditioner_cb(double sample_freq_in,
|
||||||
double sample_freq_out);
|
double sample_freq_out);
|
||||||
|
|
||||||
double d_sample_freq_in;
|
double d_sample_freq_in;
|
||||||
@ -62,12 +62,12 @@ private:
|
|||||||
unsigned int d_phase_step;
|
unsigned int d_phase_step;
|
||||||
unsigned int d_history;
|
unsigned int d_history;
|
||||||
|
|
||||||
direct_resampler_conditioner_bb(double sample_freq_in,
|
direct_resampler_conditioner_cb(double sample_freq_in,
|
||||||
double sample_freq_out);
|
double sample_freq_out);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~direct_resampler_conditioner_bb();
|
~direct_resampler_conditioner_cb();
|
||||||
|
|
||||||
unsigned int sample_freq_in() const
|
unsigned int sample_freq_in() const
|
||||||
{
|
{
|
||||||
@ -83,4 +83,4 @@ public:
|
|||||||
gr_vector_void_star &output_items);
|
gr_vector_void_star &output_items);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H */
|
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H */
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file direct_resampler_conditioner_ss.cc
|
* \file direct_resampler_conditioner_cs.cc
|
||||||
* \brief Nearest neighborhood resampler with
|
* \brief Nearest neighborhood resampler with
|
||||||
* complex short input and complex short output
|
* complex short input and complex short output
|
||||||
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "direct_resampler_conditioner_ss.h"
|
#include "direct_resampler_conditioner_cs.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
@ -41,18 +41,18 @@
|
|||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
direct_resampler_conditioner_ss_sptr direct_resampler_make_conditioner_ss(
|
direct_resampler_conditioner_cs_sptr direct_resampler_make_conditioner_cs(
|
||||||
double sample_freq_in, double sample_freq_out)
|
double sample_freq_in, double sample_freq_out)
|
||||||
{
|
{
|
||||||
|
|
||||||
return direct_resampler_conditioner_ss_sptr(
|
return direct_resampler_conditioner_cs_sptr(
|
||||||
new direct_resampler_conditioner_ss(sample_freq_in,
|
new direct_resampler_conditioner_cs(sample_freq_in,
|
||||||
sample_freq_out));
|
sample_freq_out));
|
||||||
}
|
}
|
||||||
|
|
||||||
direct_resampler_conditioner_ss::direct_resampler_conditioner_ss(
|
direct_resampler_conditioner_cs::direct_resampler_conditioner_cs(
|
||||||
double sample_freq_in, double sample_freq_out) :
|
double sample_freq_in, double sample_freq_out) :
|
||||||
gr::block("direct_resampler_make_conditioner_ss", gr::io_signature::make(1,
|
gr::block("direct_resampler_make_conditioner_cs", gr::io_signature::make(1,
|
||||||
1, sizeof(lv_16sc_t)), gr::io_signature::make(1, 1, sizeof(lv_16sc_t))),
|
1, sizeof(lv_16sc_t)), gr::io_signature::make(1, 1, sizeof(lv_16sc_t))),
|
||||||
d_sample_freq_in(sample_freq_in), d_sample_freq_out(
|
d_sample_freq_in(sample_freq_in), d_sample_freq_out(
|
||||||
sample_freq_out), d_phase(0), d_lphase(0), d_history(1)
|
sample_freq_out), d_phase(0), d_lphase(0), d_history(1)
|
||||||
@ -72,12 +72,12 @@ direct_resampler_conditioner_ss::direct_resampler_conditioner_ss(
|
|||||||
set_output_multiple(1);
|
set_output_multiple(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
direct_resampler_conditioner_ss::~direct_resampler_conditioner_ss()
|
direct_resampler_conditioner_cs::~direct_resampler_conditioner_cs()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void direct_resampler_conditioner_ss::forecast(int noutput_items,
|
void direct_resampler_conditioner_cs::forecast(int noutput_items,
|
||||||
gr_vector_int &ninput_items_required)
|
gr_vector_int &ninput_items_required)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ void direct_resampler_conditioner_ss::forecast(int noutput_items,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int direct_resampler_conditioner_ss::general_work(int noutput_items,
|
int direct_resampler_conditioner_cs::general_work(int noutput_items,
|
||||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items)
|
gr_vector_void_star &output_items)
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file direct_resampler_conditioner_ss.h
|
* \file direct_resampler_conditioner_cs.h
|
||||||
* \brief Nearest neighborhood resampler with
|
* \brief Nearest neighborhood resampler with
|
||||||
* std::complex<short> input and std::complex<short> output
|
* std::complex<short> input and std::complex<short> output
|
||||||
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
@ -29,30 +29,30 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H
|
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H
|
||||||
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H
|
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H
|
||||||
|
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
|
|
||||||
class direct_resampler_conditioner_ss;
|
class direct_resampler_conditioner_cs;
|
||||||
typedef boost::shared_ptr<direct_resampler_conditioner_ss>
|
typedef boost::shared_ptr<direct_resampler_conditioner_cs>
|
||||||
direct_resampler_conditioner_ss_sptr;
|
direct_resampler_conditioner_cs_sptr;
|
||||||
|
|
||||||
direct_resampler_conditioner_ss_sptr
|
direct_resampler_conditioner_cs_sptr
|
||||||
direct_resampler_make_conditioner_ss(double sample_freq_in,
|
direct_resampler_make_conditioner_cs(double sample_freq_in,
|
||||||
double sample_freq_out);
|
double sample_freq_out);
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a direct resampler conditioner for std::complex<short>
|
* \brief This class implements a direct resampler conditioner for std::complex<short>
|
||||||
*
|
*
|
||||||
* Direct resampling without interpolation
|
* Direct resampling without interpolation
|
||||||
*/
|
*/
|
||||||
class direct_resampler_conditioner_ss: public gr::block
|
class direct_resampler_conditioner_cs: public gr::block
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
friend direct_resampler_conditioner_ss_sptr
|
friend direct_resampler_conditioner_cs_sptr
|
||||||
direct_resampler_make_conditioner_ss(double sample_freq_in,
|
direct_resampler_make_conditioner_cs(double sample_freq_in,
|
||||||
double sample_freq_out);
|
double sample_freq_out);
|
||||||
|
|
||||||
double d_sample_freq_in;
|
double d_sample_freq_in;
|
||||||
@ -62,12 +62,12 @@ private:
|
|||||||
unsigned int d_phase_step;
|
unsigned int d_phase_step;
|
||||||
unsigned int d_history;
|
unsigned int d_history;
|
||||||
|
|
||||||
direct_resampler_conditioner_ss(double sample_freq_in,
|
direct_resampler_conditioner_cs(double sample_freq_in,
|
||||||
double sample_freq_out);
|
double sample_freq_out);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~direct_resampler_conditioner_ss();
|
~direct_resampler_conditioner_cs();
|
||||||
|
|
||||||
unsigned int sample_freq_in() const
|
unsigned int sample_freq_in() const
|
||||||
{
|
{
|
||||||
@ -83,4 +83,4 @@ public:
|
|||||||
gr_vector_void_star &output_items);
|
gr_vector_void_star &output_items);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H */
|
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H */
|
Loading…
Reference in New Issue
Block a user