47class sbas_l1_telemetry_decoder_gs :
public telemetry_impl_interface
50 ~sbas_l1_telemetry_decoder_gs()
override;
53 inline void reset()
override {};
59 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
override;
62 friend sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
66 sbas_l1_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
68 void viterbi_decoder(
double *page_part_symbols, int32_t *page_part_bits);
71 static const int32_t D_SAMPLES_PER_SYMBOL = 2;
72 static const int32_t D_SYMBOLS_PER_BIT = 2;
73 static const int32_t D_BLOCK_SIZE_IN_BITS = 30;
79 std::string d_dump_filename;
80 std::ofstream d_dump_file;
83 std::vector<double> d_sample_buf;
85 typedef std::pair<int32_t, std::vector<int32_t>> msg_candiate_int_t;
86 typedef std::pair<int32_t, std::vector<uint8_t>> msg_candiate_char_t;
98 bool get_symbols(
const std::vector<double> &samples, std::vector<double> &symbols);
101 int32_t d_n_smpls_in_history{3};
102 double d_iir_par{0.05};
103 double d_corr_paired{};
104 double d_corr_shifted{};
106 double d_past_sample{};
110 class Symbol_Aligner_And_Decoder
113 Symbol_Aligner_And_Decoder();
115 bool get_bits(
const std::vector<double> &symbols, std::vector<int32_t> &bits);
119 std::shared_ptr<Viterbi_Decoder_Sbas> d_vd1;
120 std::shared_ptr<Viterbi_Decoder_Sbas> d_vd2;
121 double d_past_symbol{0};
122 } d_symbol_aligner_and_decoder;
130 void get_frame_candidates(
const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates);
133 std::deque<int32_t> d_buffer;
142 void get_valid_frames(
const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs);
145 typedef boost::crc_optimal<24, 0x1864CFBU, 0x0, 0x0, false, false> crc_24_q_type;
146 crc_24_q_type d_checksum_agent;
147 void zerropad_front_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
148 void zerropad_back_and_convert_to_bytes(
const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
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.