diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h index b40beada9..f21510254 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h @@ -34,7 +34,7 @@ #ifndef GNSS_SDR_HYBRID_OBSERVABLES_GS_H #define GNSS_SDR_HYBRID_OBSERVABLES_GS_H -#include // for boost::curcular_buffer +#include // for boost::circular_buffer #include // for boost::shared_ptr #include // for block #include // for gr_vector_int @@ -50,8 +50,12 @@ class Gnss_circular_deque; using hybrid_observables_gs_sptr = boost::shared_ptr; -hybrid_observables_gs_sptr -hybrid_observables_gs_make(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename); +hybrid_observables_gs_sptr hybrid_observables_gs_make( + unsigned int nchannels_in, + unsigned int nchannels_out, + bool dump, + bool dump_mat, + std::string dump_filename); /*! * \brief This class implements a block that computes observables @@ -60,38 +64,44 @@ class hybrid_observables_gs : public gr::block { public: ~hybrid_observables_gs(); + void forecast(int noutput_items, gr_vector_int& ninput_items_required); int general_work(int noutput_items, gr_vector_int& ninput_items, gr_vector_const_void_star& input_items, gr_vector_void_star& output_items); - void forecast(int noutput_items, gr_vector_int& ninput_items_required); private: - friend hybrid_observables_gs_sptr - hybrid_observables_gs_make(uint32_t nchannels_in, uint32_t nchannels_out, bool dump, bool dump_mat, std::string dump_filename); - hybrid_observables_gs(uint32_t nchannels_in, uint32_t nchannels_out, bool dump, bool dump_mat, std::string dump_filename); - void msg_handler_pvt_to_observables(const pmt::pmt_t& msg); - bool interpolate_data(Gnss_Synchro& out, const uint32_t& ch, const double& ti); - bool interp_trk_obs(Gnss_Synchro& interpolated_obs, const uint32_t& ch, const uint64_t& rx_clock); - double compute_T_rx_s(const Gnss_Synchro& a); - void compute_pranges(std::vector& data); - void update_TOW(const std::vector& data); - int32_t save_matfile(); + friend hybrid_observables_gs_sptr hybrid_observables_gs_make( + uint32_t nchannels_in, + uint32_t nchannels_out, + bool dump, + bool dump_mat, + std::string dump_filename); - //time history - boost::circular_buffer d_Rx_clock_buffer; - //Tracking observable history - Gnss_circular_deque* d_gnss_synchro_history; - //rx time follow GPST - bool T_rx_TOW_set; + hybrid_observables_gs( + uint32_t nchannels_in, + uint32_t nchannels_out, + bool dump, + bool dump_mat, + std::string dump_filename); + + bool T_rx_TOW_set; // rx time follow GPST + bool d_dump; + bool d_dump_mat; uint32_t T_rx_TOW_ms; uint32_t T_rx_remnant_to_20ms; uint32_t T_rx_step_ms; - double T_rx_offset_ms; - bool d_dump; - bool d_dump_mat; uint32_t d_nchannels_in; uint32_t d_nchannels_out; + double T_rx_offset_ms; std::string d_dump_filename; std::ofstream d_dump_file; + boost::circular_buffer d_Rx_clock_buffer; // time history + Gnss_circular_deque* d_gnss_synchro_history; // Tracking observable history + void msg_handler_pvt_to_observables(const pmt::pmt_t& msg); + double compute_T_rx_s(const Gnss_Synchro& a); + bool interp_trk_obs(Gnss_Synchro& interpolated_obs, const uint32_t& ch, const uint64_t& rx_clock); + void update_TOW(const std::vector& data); + void compute_pranges(std::vector& data); + int32_t save_matfile(); }; #endif