mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-15 22:34:58 +00:00
tel_dec: Fixing GLONASS GNAV Telemetry Decoder
Fixes GLONASS L1 CA telemetry decoder and creating connections with observables blocks before PVT computation. Fixes documentation and code style in the block
This commit is contained in:
parent
e1d8a7b23a
commit
305a81a413
@ -2,6 +2,7 @@
|
|||||||
* \file glonass_l1_ca_telemetry_decoder.cc
|
* \file glonass_l1_ca_telemetry_decoder.cc
|
||||||
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
|
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
|
||||||
* to a TelemetryDecoderInterface
|
* to a TelemetryDecoderInterface
|
||||||
|
* \note Code added as part of GSoC 2017 program
|
||||||
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -36,7 +37,6 @@
|
|||||||
#include "concurrent_queue.h"
|
#include "concurrent_queue.h"
|
||||||
#include "glonass_gnav_ephemeris.h"
|
#include "glonass_gnav_ephemeris.h"
|
||||||
#include "glonass_gnav_almanac.h"
|
#include "glonass_gnav_almanac.h"
|
||||||
#include "glonass_gnav_iono.h"
|
|
||||||
#include "glonass_gnav_utc_model.h"
|
#include "glonass_gnav_utc_model.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(ConfigurationInterface*
|
|||||||
dump_ = configuration->property(role + ".dump", false);
|
dump_ = configuration->property(role + ".dump", false);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||||
// make telemetry decoder object
|
// make telemetry decoder object
|
||||||
telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me
|
telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_cc(satellite_, dump_);
|
||||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
|
|
||||||
DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")";
|
DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")";
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* \file glonass_l1_ca_telemetry_decoder.h
|
* \file glonass_l1_ca_telemetry_decoder.h
|
||||||
* \brief Interface of an adapter of a GLONASS L1 C/A NAV data decoder block
|
* \brief Interface of an adapter of a GLONASS L1 C/A NAV data decoder block
|
||||||
* to a TelemetryDecoderInterface
|
* to a TelemetryDecoderInterface
|
||||||
|
* \note Code added as part of GSoC 2017 program
|
||||||
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file galileo_e1b_telemetry_decoder_cc.cc
|
* \file glonass_l1_ca_telemetry_decoder_cc.cc
|
||||||
* \brief Implementation of a Galileo INAV message demodulator block
|
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
|
||||||
* \author Mara Branzanti 2013. mara.branzanti(at)gmail.com
|
* to a TelemetryDecoderInterface
|
||||||
* \author Javier Arribas 2013. jarribas(at)cttc.es
|
* \note Code added as part of GSoC 2017 program
|
||||||
|
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
@ -30,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "galileo_e1b_telemetry_decoder_cc.h"
|
#include "glonass_l1_ca_telemetry_decoder_cc.h"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -67,7 +68,7 @@ glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc(
|
|||||||
// initialize internal vars
|
// initialize internal vars
|
||||||
d_dump = dump;
|
d_dump = dump;
|
||||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
LOG(INFO) << "Initializing GLONASS L1CA TELEMETRY PROCESSING";
|
LOG(INFO) << "Initializing GLONASS L1 CA TELEMETRY PROCESSING";
|
||||||
// TODO. WHAT IS THIS?
|
// TODO. WHAT IS THIS?
|
||||||
d_samples_per_symbol = ( GLONASS_L1_CODE_CHIP_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS ) / GLONASS_L1_CA_SYMBOL_RATE_BPS;
|
d_samples_per_symbol = ( GLONASS_L1_CODE_CHIP_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS ) / GLONASS_L1_CA_SYMBOL_RATE_BPS;
|
||||||
|
|
||||||
@ -115,7 +116,17 @@ glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc(
|
|||||||
glonass_l1_ca_telemetry_decoder_cc::~glonass_l1_ca_telemetry_decoder_cc()
|
glonass_l1_ca_telemetry_decoder_cc::~glonass_l1_ca_telemetry_decoder_cc()
|
||||||
{
|
{
|
||||||
delete d_preambles_symbols;
|
delete d_preambles_symbols;
|
||||||
d_dump_file.close();
|
if(d_dump_file.is_open() == true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
d_dump_file.close();
|
||||||
|
}
|
||||||
|
catch(const std::exception & ex)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "Exception in destructor closing the dump file " << ex.what();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file glonass_l1_ca_telemetry_decoder_cc.h
|
* \file glonass_l1_ca_telemetry_decoder_cc.h
|
||||||
* \brief Interface of a GLONASS GNAV message demodulator block
|
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
|
||||||
|
* to a TelemetryDecoderInterface
|
||||||
|
* \note Code added as part of GSoC 2017 program
|
||||||
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -40,7 +42,6 @@
|
|||||||
#include "glonass_gnav_navigation_message.h"
|
#include "glonass_gnav_navigation_message.h"
|
||||||
#include "glonass_gnav_ephemeris.h"
|
#include "glonass_gnav_ephemeris.h"
|
||||||
#include "glonass_gnav_almanac.h"
|
#include "glonass_gnav_almanac.h"
|
||||||
#include "glonass_gnav_iono.h"
|
|
||||||
#include "glonass_gnav_utc_model.h"
|
#include "glonass_gnav_utc_model.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
|
||||||
@ -53,15 +54,17 @@ typedef boost::shared_ptr<glonass_l1_ca_telemetry_decoder_cc> glonass_l1_ca_tele
|
|||||||
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
|
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD
|
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
|
||||||
|
* \note Code added as part of GSoC 2017 program
|
||||||
|
* \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class glonass_l1_ca_telemetry_decoder_cc : public gr::block
|
class glonass_l1_ca_telemetry_decoder_cc : public gr::block
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~glonass_l1_ca_telemetry_decoder_cc();
|
~glonass_l1_ca_telemetry_decoder_cc(); //!< Class destructor
|
||||||
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
|
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
|
||||||
void set_channel(int channel); //!< Set receiver's channel
|
void set_channel(int channel); //!< Set receiver's channel
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This is where all signal processing takes place
|
* \brief This is where all signal processing takes place
|
||||||
@ -74,7 +77,7 @@ private:
|
|||||||
glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
|
glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
|
||||||
glonass_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
|
glonass_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
|
||||||
|
|
||||||
void decode_word(double *symbols,int frame_length);
|
void decode_word(double *symbols);
|
||||||
|
|
||||||
//!< Preamble decoding
|
//!< Preamble decoding
|
||||||
unsigned short int d_preambles_bits[GLONASS_GNAV_PREAMBLE_LENGTH_BITS];
|
unsigned short int d_preambles_bits[GLONASS_GNAV_PREAMBLE_LENGTH_BITS];
|
||||||
@ -91,11 +94,11 @@ private:
|
|||||||
unsigned int d_stat; //!< Status of decoder
|
unsigned int d_stat; //!< Status of decoder
|
||||||
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved
|
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved
|
||||||
bool d_flag_parity; //!< Flag indicating when parity check was achieved (crc check)
|
bool d_flag_parity; //!< Flag indicating when parity check was achieved (crc check)
|
||||||
bool d_flag_preamble;
|
bool d_flag_preamble; //!< Flag indicating when preamble was found
|
||||||
int d_CRC_error_counter;
|
int d_CRC_error_counter; //!< Number of failed CRC operations
|
||||||
bool flag_TOW_set; //!<
|
bool flag_TOW_set; //!< Indicates when time of week is set
|
||||||
double delta_t; //!< GPS-GLONASS time offset
|
double delta_t; //!< GPS-GLONASS time offset
|
||||||
|
|
||||||
//!< Navigation Message variable
|
//!< Navigation Message variable
|
||||||
Glonass_Gnav_Navigation_Message d_nav;
|
Glonass_Gnav_Navigation_Message d_nav;
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@
|
|||||||
#include "gps_l2c_telemetry_decoder.h"
|
#include "gps_l2c_telemetry_decoder.h"
|
||||||
#include "galileo_e1b_telemetry_decoder.h"
|
#include "galileo_e1b_telemetry_decoder.h"
|
||||||
#include "galileo_e5a_telemetry_decoder.h"
|
#include "galileo_e5a_telemetry_decoder.h"
|
||||||
|
#include "glonass_l1_ca_telemetry_decoder.h"
|
||||||
#include "sbas_l1_telemetry_decoder.h"
|
#include "sbas_l1_telemetry_decoder.h"
|
||||||
#include "hybrid_observables.h"
|
#include "hybrid_observables.h"
|
||||||
#include "rtklib_pvt.h"
|
#include "rtklib_pvt.h"
|
||||||
@ -1203,6 +1204,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
|||||||
out_streams));
|
out_streams));
|
||||||
block = std::move(block_);
|
block = std::move(block_);
|
||||||
}
|
}
|
||||||
|
else if (implementation.compare("GLONASS_L1_CA_Telemetry_Decoder") == 0)
|
||||||
|
{
|
||||||
|
std::unique_ptr<GNSSBlockInterface> block_(new GlonassL1CaTelemetryDecoder(configuration.get(), role, in_streams,
|
||||||
|
out_streams));
|
||||||
|
block = std::move(block_);
|
||||||
|
}
|
||||||
|
|
||||||
// OBSERVABLES -----------------------------------------------------------------
|
// OBSERVABLES -----------------------------------------------------------------
|
||||||
else if ((implementation.compare("Hybrid_Observables") == 0) || (implementation.compare("GPS_L1_CA_Observables") == 0) || (implementation.compare("GPS_L2C_Observables") == 0) ||
|
else if ((implementation.compare("Hybrid_Observables") == 0) || (implementation.compare("GPS_L1_CA_Observables") == 0) || (implementation.compare("GPS_L2C_Observables") == 0) ||
|
||||||
@ -1347,6 +1354,12 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
|
|||||||
out_streams));
|
out_streams));
|
||||||
block = std::move(block_);
|
block = std::move(block_);
|
||||||
}
|
}
|
||||||
|
else if (implementation.compare("GLONASS_L1_CA_Telemetry_Decoder") == 0)
|
||||||
|
{
|
||||||
|
std::unique_ptr<TelemetryDecoderInterface> block_(new GlonassL1CaTelemetryDecoder(configuration.get(), role, in_streams,
|
||||||
|
out_streams));
|
||||||
|
block = std::move(block_);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Log fatal. This causes execution to stop.
|
// Log fatal. This causes execution to stop.
|
||||||
|
Loading…
Reference in New Issue
Block a user