20 #ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H 21 #define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H 24 #include <boost/crc.hpp> 25 #include <gnuradio/block.h> 26 #include <gnuradio/types.h> 35 #if GNURADIO_USES_STD_POINTERS 38 #include <boost/shared_ptr.hpp> 45 #if GNURADIO_USES_STD_POINTERS 46 using sbas_l1_telemetry_decoder_gs_sptr = std::shared_ptr<sbas_l1_telemetry_decoder_gs>;
48 using sbas_l1_telemetry_decoder_gs_sptr = boost::shared_ptr<sbas_l1_telemetry_decoder_gs>;
51 sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
73 int general_work(
int noutput_items, gr_vector_int &ninput_items,
74 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
77 friend sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
83 void viterbi_decoder(
double *page_part_symbols, int32_t *page_part_bits);
86 static const int32_t D_SAMPLES_PER_SYMBOL = 2;
87 static const int32_t D_SYMBOLS_PER_BIT = 2;
88 static const int32_t D_BLOCK_SIZE_IN_BITS = 30;
94 std::string d_dump_filename;
95 std::ofstream d_dump_file;
98 std::vector<double> d_sample_buf;
100 typedef std::pair<int32_t, std::vector<int32_t>> msg_candiate_int_t;
101 typedef std::pair<int32_t, std::vector<uint8_t>> msg_candiate_char_t;
108 ~Sample_Aligner() =
default;
114 bool get_symbols(
const std::vector<double> &samples, std::vector<double> &symbols);
117 int32_t d_n_smpls_in_history;
119 double d_corr_paired{};
120 double d_corr_shifted{};
122 double d_past_sample{};
126 class Symbol_Aligner_And_Decoder
129 Symbol_Aligner_And_Decoder();
130 ~Symbol_Aligner_And_Decoder() =
default;
132 bool get_bits(
const std::vector<double> &symbols, std::vector<int32_t> &bits);
136 std::shared_ptr<Viterbi_Decoder> d_vd1;
137 std::shared_ptr<Viterbi_Decoder> d_vd2;
138 double d_past_symbol;
139 } d_symbol_aligner_and_decoder;
147 void get_frame_candidates(
const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates);
150 std::deque<int32_t> d_buffer;
159 void get_valid_frames(
const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs);
162 typedef boost::crc_optimal<24, 0x1864CFBU, 0x0, 0x0, false, false> crc_24_q_type;
163 crc_24_q_type d_checksum_agent;
164 void zerropad_front_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
165 void zerropad_back_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
169 #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.
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.