10 #ifndef INCLUDED_SATELLITES_DOPPLER_CORRECTION_IMPL_H
11 #define INCLUDED_SATELLITES_DOPPLER_CORRECTION_IMPL_H
13 #include <gnuradio/math.h>
19 namespace satellites {
26 size_t d_current_index;
29 std::vector<double> times;
30 std::vector<double> freqs_rad_per_sample;
31 std::vector<tag_t> d_tags;
34 const pmt::pmt_t d_rx_time_key;
37 const pmt::pmt_t d_pck_n_key;
38 const pmt::pmt_t d_full_key;
39 const pmt::pmt_t d_frac_key;
42 const bool d_timesync_enabled;
43 const pmt::pmt_t d_timesync_key;
45 double d_current_time;
46 double d_current_freq;
51 while (d_phase > (2 * GR_M_PI))
52 d_phase -= 2 * GR_M_PI;
53 while (d_phase < (-2 * GR_M_PI))
54 d_phase += 2 * GR_M_PI;
59 void adjust_current_index()
61 while ((d_current_index > 0) && (times[d_current_index] > d_t0)) {
66 void read_doppler_file(
const char* filename);
72 const char* timesync_tag);
79 gr::thread::scoped_lock guard(d_setlock);
80 return d_current_time;
85 gr::thread::scoped_lock guard(d_setlock);
86 return d_current_freq * d_samp_rate / (2.0 * GR_M_PI);
89 int work(
int noutput_items,
90 gr_vector_const_void_star& input_items,
91 gr_vector_void_star& output_items)
override;
Definition: doppler_correction_impl.h:22
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) override
double frequency() override
Returns the current frequency in Hz.
Definition: doppler_correction_impl.h:83
doppler_correction_impl(const char *filename, double samp_rate, double t0, const char *timesync_tag)
~doppler_correction_impl()
void set_time(double) override
Sets the current time.
double time() override
Returns the current time.
Definition: doppler_correction_impl.h:77
Performs Doppler correction using a frequency vs. time file.
Definition: doppler_correction.h:53
Definition: ax100_decode.h:17