mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
File cleaning
This commit is contained in:
parent
29a910df30
commit
6cc1de7118
@ -55,7 +55,6 @@ public:
|
|||||||
// google::protobuf::ShutdownProtobufLibrary();
|
// google::protobuf::ShutdownProtobufLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
inline Serdes_Monitor_Pvt(Serdes_Monitor_Pvt&& other) //!< Copy constructor
|
inline Serdes_Monitor_Pvt(Serdes_Monitor_Pvt&& other) //!< Copy constructor
|
||||||
{
|
{
|
||||||
this->monitor_ = other.monitor_;
|
this->monitor_ = other.monitor_;
|
||||||
@ -63,12 +62,7 @@ public:
|
|||||||
|
|
||||||
inline Serdes_Monitor_Pvt& operator=(const Serdes_Monitor_Pvt& rhs) //!< Copy assignment operator
|
inline Serdes_Monitor_Pvt& operator=(const Serdes_Monitor_Pvt& rhs) //!< Copy assignment operator
|
||||||
{
|
{
|
||||||
// Only do assignment if RHS is a different object from this.
|
this->monitor_ = rhs.monitor_;
|
||||||
if (this != &rhs)
|
|
||||||
{
|
|
||||||
// Deallocate, allocate new space, copy values...
|
|
||||||
this->monitor_ = rhs.monitor_;
|
|
||||||
}
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +78,7 @@ public:
|
|||||||
this->monitor_ = std::move(other.monitor_);
|
this->monitor_ = std::move(other.monitor_);
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
inline std::string createProtobuffer(const Monitor_Pvt& monitor) //!< Serialization into a string
|
inline std::string createProtobuffer(const Monitor_Pvt& monitor) //!< Serialization into a string
|
||||||
{
|
{
|
||||||
|
@ -31,11 +31,8 @@
|
|||||||
|
|
||||||
#include "beamformer.h"
|
#include "beamformer.h"
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
|
|
||||||
#define GNSS_SDR_BEAMFORMER_CHANNELS 8
|
|
||||||
|
|
||||||
beamformer_sptr make_beamformer_sptr()
|
beamformer_sptr make_beamformer_sptr()
|
||||||
{
|
{
|
||||||
return beamformer_sptr(new beamformer());
|
return beamformer_sptr(new beamformer());
|
||||||
@ -47,22 +44,6 @@ beamformer::beamformer()
|
|||||||
gr::io_signature::make(GNSS_SDR_BEAMFORMER_CHANNELS, GNSS_SDR_BEAMFORMER_CHANNELS, sizeof(gr_complex)),
|
gr::io_signature::make(GNSS_SDR_BEAMFORMER_CHANNELS, GNSS_SDR_BEAMFORMER_CHANNELS, sizeof(gr_complex)),
|
||||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||||
{
|
{
|
||||||
//initialize weight vector
|
|
||||||
|
|
||||||
if (posix_memalign(reinterpret_cast<void **>(&weight_vector), 16, GNSS_SDR_BEAMFORMER_CHANNELS * sizeof(gr_complex)) == 0)
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
for (int i = 0; i < GNSS_SDR_BEAMFORMER_CHANNELS; i++)
|
|
||||||
{
|
|
||||||
weight_vector[i] = gr_complex(1, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
beamformer::~beamformer()
|
|
||||||
{
|
|
||||||
free(weight_vector);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -86,7 +67,7 @@ int beamformer::work(int noutput_items, gr_vector_const_void_star &input_items,
|
|||||||
for (int n = 0; n < noutput_items; n++)
|
for (int n = 0; n < noutput_items; n++)
|
||||||
{
|
{
|
||||||
sum = gr_complex(0, 0);
|
sum = gr_complex(0, 0);
|
||||||
for (int i = 0; i < GNSS_SDR_BEAMFORMER_CHANNELS; i++)
|
for (int i = 0; i < weight_vector.size(); i++)
|
||||||
{
|
{
|
||||||
sum = sum + (reinterpret_cast<const gr_complex *>(input_items[i]))[n] * weight_vector[i];
|
sum = sum + (reinterpret_cast<const gr_complex *>(input_items[i]))[n] * weight_vector[i];
|
||||||
}
|
}
|
||||||
|
@ -32,26 +32,30 @@
|
|||||||
#define GNSS_SDR_BEAMFORMER_H
|
#define GNSS_SDR_BEAMFORMER_H
|
||||||
|
|
||||||
#include <gnuradio/sync_block.h>
|
#include <gnuradio/sync_block.h>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class beamformer;
|
class beamformer;
|
||||||
|
|
||||||
using beamformer_sptr = boost::shared_ptr<beamformer>;
|
using beamformer_sptr = boost::shared_ptr<beamformer>;
|
||||||
|
|
||||||
beamformer_sptr make_beamformer_sptr();
|
beamformer_sptr make_beamformer_sptr();
|
||||||
|
|
||||||
|
const int GNSS_SDR_BEAMFORMER_CHANNELS = 8;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a real-time software-defined spatial filter using the CTTC GNSS experimental antenna array input and a set of dynamically reloadable weights
|
* \brief This class implements a real-time software-defined spatial filter using the CTTC GNSS experimental antenna array input and a set of dynamically reloadable weights
|
||||||
*/
|
*/
|
||||||
class beamformer : public gr::sync_block
|
class beamformer : public gr::sync_block
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~beamformer();
|
~beamformer() = default;
|
||||||
int work(int noutput_items, gr_vector_const_void_star &input_items,
|
int work(int noutput_items, gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items);
|
gr_vector_void_star &output_items);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend beamformer_sptr make_beamformer_sptr();
|
friend beamformer_sptr make_beamformer_sptr();
|
||||||
beamformer();
|
beamformer();
|
||||||
gr_complex *weight_vector;
|
std::vector<gr_complex> weight_vector = std::vector<gr_complex>(GNSS_SDR_BEAMFORMER_CHANNELS, gr_complex(1.0, 0.0));
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -48,13 +48,6 @@ Exponential_Smoother::Exponential_Smoother()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Exponential_Smoother::~Exponential_Smoother() = default;
|
|
||||||
|
|
||||||
|
|
||||||
// Move assignment operator
|
|
||||||
Exponential_Smoother& Exponential_Smoother::operator=(Exponential_Smoother&& other) = default;
|
|
||||||
|
|
||||||
|
|
||||||
void Exponential_Smoother::set_alpha(float alpha)
|
void Exponential_Smoother::set_alpha(float alpha)
|
||||||
{
|
{
|
||||||
alpha_ = alpha;
|
alpha_ = alpha;
|
||||||
|
@ -48,7 +48,7 @@ class Exponential_Smoother
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Exponential_Smoother(); //!< Constructor
|
Exponential_Smoother(); //!< Constructor
|
||||||
~Exponential_Smoother(); //!< Destructor
|
~Exponential_Smoother() = default; //!< Destructor
|
||||||
void set_alpha(float alpha); //!< 0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001
|
void set_alpha(float alpha); //!< 0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001
|
||||||
void set_samples_for_initialization(int num_samples); //!< Number of samples averaged for initialization. Default value: 200
|
void set_samples_for_initialization(int num_samples); //!< Number of samples averaged for initialization. Default value: 200
|
||||||
void reset();
|
void reset();
|
||||||
@ -56,7 +56,8 @@ public:
|
|||||||
void set_offset(float offset);
|
void set_offset(float offset);
|
||||||
float smooth(float raw);
|
float smooth(float raw);
|
||||||
double smooth(double raw);
|
double smooth(double raw);
|
||||||
Exponential_Smoother& operator=(Exponential_Smoother&& other); //!< Move assignment operator
|
Exponential_Smoother(Exponential_Smoother&&) = default; //!< Move operator
|
||||||
|
Exponential_Smoother& operator=(Exponential_Smoother&& /*other*/) = default; //!< Move assignment operator
|
||||||
private:
|
private:
|
||||||
float alpha_; // takes value 0.0001 if not set
|
float alpha_; // takes value 0.0001 if not set
|
||||||
int samples_for_initialization_;
|
int samples_for_initialization_;
|
||||||
|
@ -68,13 +68,6 @@ Tracking_loop_filter::Tracking_loop_filter()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tracking_loop_filter::~Tracking_loop_filter() = default;
|
|
||||||
|
|
||||||
|
|
||||||
// Move assignment operator
|
|
||||||
Tracking_loop_filter& Tracking_loop_filter::operator=(Tracking_loop_filter&& other) = default;
|
|
||||||
|
|
||||||
|
|
||||||
float Tracking_loop_filter::apply(float current_input)
|
float Tracking_loop_filter::apply(float current_input)
|
||||||
{
|
{
|
||||||
// Now apply the filter coefficients:
|
// Now apply the filter coefficients:
|
||||||
@ -238,6 +231,7 @@ void Tracking_loop_filter::set_update_interval(float update_interval)
|
|||||||
update_coefficients();
|
update_coefficients();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float Tracking_loop_filter::get_update_interval(void) const
|
float Tracking_loop_filter::get_update_interval(void) const
|
||||||
{
|
{
|
||||||
return d_update_interval;
|
return d_update_interval;
|
||||||
|
@ -45,13 +45,14 @@ class Tracking_loop_filter
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Tracking_loop_filter();
|
Tracking_loop_filter();
|
||||||
~Tracking_loop_filter();
|
~Tracking_loop_filter() = default;
|
||||||
|
|
||||||
Tracking_loop_filter(float update_interval, float noise_bandwidth,
|
Tracking_loop_filter(float update_interval, float noise_bandwidth,
|
||||||
int loop_order = 2,
|
int loop_order = 2,
|
||||||
bool include_last_integrator = false);
|
bool include_last_integrator = false);
|
||||||
|
|
||||||
Tracking_loop_filter& operator=(Tracking_loop_filter&& other); //!< Move assignment operator
|
Tracking_loop_filter(Tracking_loop_filter&&) = default; //!< Move operator
|
||||||
|
Tracking_loop_filter& operator=(Tracking_loop_filter&& /*other*/) = default; //!< Move assignment operator
|
||||||
|
|
||||||
float get_noise_bandwidth(void) const;
|
float get_noise_bandwidth(void) const;
|
||||||
float get_update_interval(void) const;
|
float get_update_interval(void) const;
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
{
|
{
|
||||||
google::protobuf::ShutdownProtobufLibrary();
|
google::protobuf::ShutdownProtobufLibrary();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
inline Serdes_Gnss_Synchro(Serdes_Gnss_Synchro&& other) //!< Copy constructor
|
inline Serdes_Gnss_Synchro(Serdes_Gnss_Synchro&& other) //!< Copy constructor
|
||||||
{
|
{
|
||||||
this->observables = other.observables;
|
this->observables = other.observables;
|
||||||
@ -64,12 +64,7 @@ public:
|
|||||||
|
|
||||||
inline Serdes_Gnss_Synchro& operator=(const Serdes_Gnss_Synchro& rhs) //!< Copy assignment operator
|
inline Serdes_Gnss_Synchro& operator=(const Serdes_Gnss_Synchro& rhs) //!< Copy assignment operator
|
||||||
{
|
{
|
||||||
// Only do assignment if RHS is a different object from this.
|
this->observables = rhs.observables;
|
||||||
if (this != &rhs)
|
|
||||||
{
|
|
||||||
// Deallocate, allocate new space, copy values...
|
|
||||||
this->observables = rhs.observables;
|
|
||||||
}
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +80,7 @@ public:
|
|||||||
this->observables = std::move(other.observables);
|
this->observables = std::move(other.observables);
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
inline std::string createProtobuffer(const std::vector<Gnss_Synchro>& vgs) //!< Serialization into a string
|
inline std::string createProtobuffer(const std::vector<Gnss_Synchro>& vgs) //!< Serialization into a string
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user