19 #ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H 20 #define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H 29 #include <boost/circular_buffer.hpp> 30 #include <gnuradio/types.h> 40 enum class L1LnavSystem
48 using gps_l1_ca_telemetry_decoder_gs_sptr = gnss_shared_ptr<gps_l1_ca_telemetry_decoder_gs>;
50 gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
53 L1LnavSystem system = L1LnavSystem::GPS);
64 void reset()
override;
69 int general_work(
int noutput_items, gr_vector_int &ninput_items,
70 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
override;
73 friend gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
80 void check_tlm_separation();
81 void frame_synchronization(
const Gnss_Synchro ¤t_gs);
82 bool is_PLL_180_deg_phase_locked();
83 bool gps_word_parityCheck(uint32_t gpsword);
84 bool decode_subframe(
double cn0,
bool flag_invert);
85 bool is_tow_consistent(uint32_t decoded_tow_s);
87 L1LnavSystem d_system;
88 std::unique_ptr<Gps_Navigation_Message> d_nav;
91 std::unique_ptr<Tlm_CRC_Stats> d_Tlm_CRC_Stats;
93 std::array<int32_t, GPS_CA_PREAMBLE_LENGTH_BITS> d_preamble_samples{};
95 std::string d_dump_filename;
96 std::ofstream d_dump_file;
98 boost::circular_buffer<float> d_symbol_history;
100 uint64_t d_sample_counter;
101 uint64_t d_preamble_index;
102 uint64_t d_last_valid_preamble;
104 int32_t d_bits_per_preamble;
105 int32_t d_samples_per_preamble;
106 int32_t d_preamble_period_symbols;
107 int32_t d_CRC_error_counter;
110 uint32_t d_required_symbols;
111 uint32_t d_prev_GPS_frame_4bytes;
112 uint32_t d_max_symbols_without_valid_frame;
114 uint32_t d_TOW_at_Preamble_ms;
115 uint32_t d_TOW_at_current_symbol_ms;
116 uint32_t d_last_decoded_tow_s;
117 uint64_t d_last_decoded_tow_sample_counter;
119 bool d_flag_frame_sync;
120 bool d_flag_preamble;
121 bool d_sent_tlm_failed_msg;
122 bool d_flag_PLL_180_deg_phase_locked;
127 bool d_enable_navdata_monitor;
128 bool d_dump_crc_stats;
130 bool d_have_last_decoded_tow;
136 #endif // GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H class that stores both the receiver time, relative to the receiver start and the GNSS time (absolute)...
Common base class for telemetry decoder GNU Radio implementations.
void set_channel(int channel) override
Set receiver's channel.
Defines system parameters for GPS L1 C/A signal and NAV data.
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 contains all the configuration parameters for generic telemetry decoder block...
This class implements a block that decodes the NAV data defined in IS-GPS-200M.
This is the class that contains the information that is shared by the processing blocks.
void set_satellite(const Gnss_Satellite &satellite) override
Set satellite PRN.
This class represents a GNSS satellite.
Base class for telemetry decoder GNU Radio blocks.
Interface of a GPS NAV Data message decoder.
Class for storage of decoded navigation messages.
Interface of the Gnss_Synchro class.