17 #ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H 18 #define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H 22 #include <boost/crc.hpp> 23 #include <gnuradio/block.h> 24 #include <gnuradio/types.h> 44 using sbas_l1_telemetry_decoder_gs_sptr = gnss_shared_ptr<sbas_l1_telemetry_decoder_gs>;
46 sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
60 inline void reset(){};
65 int general_work(
int noutput_items, gr_vector_int &ninput_items,
66 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
override;
69 friend sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
75 void viterbi_decoder(
double *page_part_symbols, int32_t *page_part_bits);
78 static const int32_t D_SAMPLES_PER_SYMBOL = 2;
79 static const int32_t D_SYMBOLS_PER_BIT = 2;
80 static const int32_t D_BLOCK_SIZE_IN_BITS = 30;
86 std::string d_dump_filename;
87 std::ofstream d_dump_file;
90 std::vector<double> d_sample_buf;
92 typedef std::pair<int32_t, std::vector<int32_t>> msg_candiate_int_t;
93 typedef std::pair<int32_t, std::vector<uint8_t>> msg_candiate_char_t;
105 bool get_symbols(
const std::vector<double> &samples, std::vector<double> &symbols);
108 int32_t d_n_smpls_in_history{3};
109 double d_iir_par{0.05};
110 double d_corr_paired{};
111 double d_corr_shifted{};
113 double d_past_sample{};
117 class Symbol_Aligner_And_Decoder
120 Symbol_Aligner_And_Decoder();
122 bool get_bits(
const std::vector<double> &symbols, std::vector<int32_t> &bits);
126 std::shared_ptr<Viterbi_Decoder_Sbas> d_vd1;
127 std::shared_ptr<Viterbi_Decoder_Sbas> d_vd2;
128 double d_past_symbol{0};
129 } d_symbol_aligner_and_decoder;
137 void get_frame_candidates(
const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates);
140 std::deque<int32_t> d_buffer;
149 void get_valid_frames(
const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs);
152 typedef boost::crc_optimal<24, 0x1864CFBU, 0x0, 0x0, false, false> crc_24_q_type;
153 crc_24_q_type d_checksum_agent;
154 void zerropad_front_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
155 void zerropad_back_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
162 #endif // GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) override
This is where all signal processing takes place.
Class that implements a Viterbi decoder.
void set_satellite(const Gnss_Satellite &satellite)
Set satellite PRN.
This interface represents a GNSS block.
Interface of the Gnss_Satellite class.
This class represents a GNSS satellite.
This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MO...
void set_channel(int32_t channel)
Set receiver's channel.