GNSS-SDR  0.0.14
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 "tlm_conf.h"
25 #include <boost/circular_buffer.hpp>
26 #include <gnuradio/block.h>
27 #include <gnuradio/types.h> // for gr_vector_const_void_star
28 #include <cstdint>
29 #include <fstream>
30 #include <string>
31 
32 extern "C"
33 {
34 #include "cnav_msg.h"
35 }
36 
37 /** \addtogroup Telemetry_Decoder
38  * \{ */
39 /** \addtogroup Telemetry_Decoder_gnuradio_blocks
40  * \{ */
41 
42 
44 
45 using gps_l5_telemetry_decoder_gs_sptr = gnss_shared_ptr<gps_l5_telemetry_decoder_gs>;
46 
47 gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
48  const Gnss_Satellite &satellite,
49  const Tlm_Conf &conf);
50 
51 /*!
52  * \brief This class implements a GPS L5 Telemetry decoder
53  *
54  */
55 class gps_l5_telemetry_decoder_gs : public gr::block
56 {
57 public:
59  void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
60  void set_channel(int32_t channel); //!< Set receiver's channel
61  void reset();
62  int general_work(int noutput_items, gr_vector_int &ninput_items,
63  gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
64 
65 private:
66  friend gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
67  const Gnss_Satellite &satellite,
68  const Tlm_Conf &conf);
69 
70  gps_l5_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
71 
72  cnav_msg_decoder_t d_cnav_decoder{};
73 
74  Gnss_Satellite d_satellite;
75 
76  Gps_CNAV_Navigation_Message d_CNAV_Message;
77 
78  std::string d_dump_filename;
79  std::ofstream d_dump_file;
80 
81  uint64_t d_sample_counter;
82  uint64_t d_last_valid_preamble;
83 
84  int32_t d_channel;
85 
86  uint32_t d_TOW_at_current_symbol_ms;
87  uint32_t d_TOW_at_Preamble_ms;
88  uint32_t d_max_symbols_without_valid_frame;
89 
90  bool d_flag_PLL_180_deg_phase_locked;
91  bool d_flag_valid_word;
92  bool d_sent_tlm_failed_msg;
93  bool d_dump;
94  bool d_dump_mat;
95  bool d_remove_dat;
96 };
97 
98 
99 /** \} */
100 /** \} */
101 #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...
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-200K.
void set_channel(int32_t channel)
Set receiver&#39;s channel.
void set_satellite(const Gnss_Satellite &satellite)
Set satellite PRN.