GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
gps_l5_telemetry_decoder_gs.h
Go to the documentation of this file.
1 /*!
2  * \file gps_l5_telemetry_decoder_gs.h
3  * \brief Interface of a CNAV message demodulator block
4  * \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es
5  * -----------------------------------------------------------------------------
6  *
7  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
8  * This file is part of GNSS-SDR.
9  *
10  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
11  * SPDX-License-Identifier: GPL-3.0-or-later
12  *
13  * -----------------------------------------------------------------------------
14  */
15 
16 #ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H
17 #define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H
18 
19 
20 #include "GPS_L5.h" // for GPS_L5I_NH_CODE_LENGTH
21 #include "gnss_block_interface.h"
22 #include "gnss_satellite.h" // for Gnss_Satellite
23 #include "gps_cnav_navigation_message.h" // for Gps_CNAV_Navigation_Message
24 #include "nav_message_packet.h"
25 #include "tlm_conf.h"
26 #include "tlm_crc_stats.h"
27 #include <boost/circular_buffer.hpp>
28 #include <gnuradio/block.h>
29 #include <gnuradio/types.h> // for gr_vector_const_void_star
30 #include <cstdint>
31 #include <fstream>
32 #include <memory> // for std::unique_ptr
33 #include <string>
34 
35 extern "C"
36 {
37 #include "cnav_msg.h"
38 }
39 
40 /** \addtogroup Telemetry_Decoder
41  * \{ */
42 /** \addtogroup Telemetry_Decoder_gnuradio_blocks
43  * \{ */
44 
45 
47 
48 using gps_l5_telemetry_decoder_gs_sptr = gnss_shared_ptr<gps_l5_telemetry_decoder_gs>;
49 
50 gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
51  const Gnss_Satellite &satellite,
52  const Tlm_Conf &conf);
53 
54 /*!
55  * \brief This class implements a GPS L5 Telemetry decoder
56  *
57  */
58 class gps_l5_telemetry_decoder_gs : public gr::block
59 {
60 public:
61  ~gps_l5_telemetry_decoder_gs() override;
62  void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
63  void set_channel(int32_t channel); //!< Set receiver's channel
64  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;
67 
68 private:
69  friend gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
70  const Gnss_Satellite &satellite,
71  const Tlm_Conf &conf);
72 
73  gps_l5_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
74 
75  cnav_msg_decoder_t d_cnav_decoder{};
76 
77  Gnss_Satellite d_satellite;
78 
79  Gps_CNAV_Navigation_Message d_CNAV_Message;
80 
81  Nav_Message_Packet d_nav_msg_packet;
82  std::unique_ptr<Tlm_CRC_Stats> d_Tlm_CRC_Stats;
83 
84  std::string d_dump_filename;
85  std::ofstream d_dump_file;
86 
87  uint64_t d_sample_counter;
88  uint64_t d_last_valid_preamble;
89 
90  int32_t d_channel;
91 
92  uint32_t d_TOW_at_current_symbol_ms;
93  uint32_t d_TOW_at_Preamble_ms;
94  uint32_t d_max_symbols_without_valid_frame;
95 
96  bool d_flag_PLL_180_deg_phase_locked;
97  bool d_flag_valid_word;
98  bool d_sent_tlm_failed_msg;
99  bool d_dump;
100  bool d_dump_mat;
101  bool d_remove_dat;
102  bool d_enable_navdata_monitor;
103  bool d_dump_crc_stats;
104 };
105 
106 
107 /** \} */
108 /** \} */
109 #endif // GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H
This class implements a GPS L5 Telemetry decoder.
Utilities for CNAV message manipulation of the libswiftnav library.
Defines system parameters for GPS L5 signal.
Class that contains all the configuration parameters for generic telemetry decoder block...
Class that computes the telemetry CRC statistics.
This interface represents a GNSS block.
Interface of the Gnss_Satellite class.
This class represents a GNSS satellite.
Interface of a GPS CNAV Data message decoder.
This class decodes a GPS CNAV Data message as described in IS-GPS-200M.
void set_channel(int32_t channel)
Set receiver&#39;s channel.
void set_satellite(const Gnss_Satellite &satellite)
Set satellite PRN.