2016-05-11 20:17:58 +02:00
|
|
|
/* -*- c++ -*- */
|
|
|
|
/*
|
|
|
|
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_SATNOGS_COARSE_DOPPLER_CORRECTION_CC_IMPL_H
|
|
|
|
#define INCLUDED_SATNOGS_COARSE_DOPPLER_CORRECTION_CC_IMPL_H
|
|
|
|
|
|
|
|
#include <satnogs/coarse_doppler_correction_cc.h>
|
|
|
|
#include <gnuradio/fxpt_nco.h>
|
|
|
|
|
2019-09-12 15:25:10 +02:00
|
|
|
namespace gr {
|
|
|
|
namespace satnogs {
|
|
|
|
|
|
|
|
class coarse_doppler_correction_cc_impl : public coarse_doppler_correction_cc {
|
|
|
|
private:
|
|
|
|
double d_target_freq;
|
2019-12-12 20:53:39 +01:00
|
|
|
const double d_offset;
|
2019-09-12 15:25:10 +02:00
|
|
|
const double d_samp_rate;
|
|
|
|
const size_t d_buf_items;
|
|
|
|
double d_freq_diff;
|
|
|
|
|
|
|
|
gr::fxpt_nco d_nco;
|
|
|
|
gr_complex *d_nco_buff;
|
|
|
|
|
|
|
|
void
|
|
|
|
new_freq(pmt::pmt_t msg);
|
|
|
|
|
|
|
|
public:
|
|
|
|
coarse_doppler_correction_cc_impl(double target_freq,
|
2019-12-12 20:53:39 +01:00
|
|
|
double offset,
|
2019-09-12 15:25:10 +02:00
|
|
|
double sampling_rate);
|
|
|
|
~coarse_doppler_correction_cc_impl();
|
|
|
|
|
|
|
|
// Where all the action really happens
|
|
|
|
int
|
|
|
|
work(int noutput_items, gr_vector_const_void_star &input_items,
|
|
|
|
gr_vector_void_star &output_items);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace satnogs
|
2016-05-11 20:17:58 +02:00
|
|
|
} // namespace gr
|
|
|
|
|
|
|
|
#endif /* INCLUDED_SATNOGS_COARSE_DOPPLER_CORRECTION_CC_IMPL_H */
|
|
|
|
|