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(
68 int general_work(
int noutput_items, gr_vector_int &ninput_items,
69 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
72 friend sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
78 void viterbi_decoder(
double *page_part_symbols, int32_t *page_part_bits);
81 static const int32_t D_SAMPLES_PER_SYMBOL = 2;
82 static const int32_t D_SYMBOLS_PER_BIT = 2;
83 static const int32_t D_BLOCK_SIZE_IN_BITS = 30;
89 std::string d_dump_filename;
90 std::ofstream d_dump_file;
93 std::vector<double> d_sample_buf;
95 typedef std::pair<int32_t, std::vector<int32_t>> msg_candiate_int_t;
96 typedef std::pair<int32_t, std::vector<uint8_t>> msg_candiate_char_t;
103 ~Sample_Aligner() =
default;
109 bool get_symbols(
const std::vector<double> &samples, std::vector<double> &symbols);
112 int32_t d_n_smpls_in_history;
114 double d_corr_paired{};
115 double d_corr_shifted{};
117 double d_past_sample{};
121 class Symbol_Aligner_And_Decoder
124 Symbol_Aligner_And_Decoder();
125 ~Symbol_Aligner_And_Decoder() =
default;
127 bool get_bits(
const std::vector<double> &symbols, std::vector<int32_t> &bits);
131 std::shared_ptr<Viterbi_Decoder> d_vd1;
132 std::shared_ptr<Viterbi_Decoder> d_vd2;
133 double d_past_symbol;
134 } d_symbol_aligner_and_decoder;
142 void get_frame_candidates(
const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates);
145 std::deque<int32_t> d_buffer;
154 void get_valid_frames(
const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs);
157 typedef boost::crc_optimal<24, 0x1864CFBU, 0x0, 0x0, false, false> crc_24_q_type;
158 crc_24_q_type d_checksum_agent;
159 void zerropad_front_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
160 void zerropad_back_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
167 #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)
This is where all signal processing takes place.
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...
Class that implements a Viterbi decoder.
void set_channel(int32_t channel)
Set receiver's channel.