2013-07-15 17:07:10 +00:00
|
|
|
/*!
|
2013-11-17 10:48:27 +00:00
|
|
|
* \file galileo_e1b_telemetry_decoder.cc
|
2013-07-15 17:07:10 +00:00
|
|
|
* \brief Implementation of an adapter of a Galileo INAV data decoder block
|
|
|
|
* to a TelemetryDecoderInterface
|
2013-11-17 10:48:27 +00:00
|
|
|
* \author Javier Arribas 2013. jarribas(at)cttc.es,
|
|
|
|
* Mara Branzanti 2013. mara.branzanti(at)gmail.com
|
2013-07-15 17:07:10 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2013-07-15 17:07:10 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2013-07-15 17:07:10 +00:00
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2013-07-15 17:07:10 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2013-07-15 17:07:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "galileo_e1b_telemetry_decoder.h"
|
2016-01-04 21:56:52 +00:00
|
|
|
#include "configuration_interface.h"
|
2024-04-29 06:27:33 +00:00
|
|
|
|
|
|
|
#if USE_GLOG_AND_GFLAGS
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <glog/logging.h>
|
2024-04-29 06:27:33 +00:00
|
|
|
#else
|
|
|
|
#include <absl/log/log.h>
|
|
|
|
#endif
|
2018-02-26 02:15:53 +00:00
|
|
|
|
2016-01-04 21:56:52 +00:00
|
|
|
|
2020-06-29 07:07:41 +00:00
|
|
|
GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(
|
|
|
|
const ConfigurationInterface* configuration,
|
2018-12-03 18:01:47 +00:00
|
|
|
const std::string& role,
|
2018-03-03 01:03:39 +00:00
|
|
|
unsigned int in_streams,
|
|
|
|
unsigned int out_streams) : role_(role),
|
|
|
|
in_streams_(in_streams),
|
|
|
|
out_streams_(out_streams)
|
2013-07-15 17:07:10 +00:00
|
|
|
{
|
|
|
|
DLOG(INFO) << "role " << role;
|
2020-11-21 18:37:22 +00:00
|
|
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
2021-04-19 11:26:46 +00:00
|
|
|
tlm_parameters_.enable_reed_solomon = configuration->property(role + ".enable_reed_solomon", false);
|
2023-09-13 09:48:21 +00:00
|
|
|
tlm_parameters_.use_ced = configuration->property(role + ".use_reduced_ced", false);
|
2013-07-15 17:07:10 +00:00
|
|
|
// make telemetry decoder object
|
2020-11-21 18:37:22 +00:00
|
|
|
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, tlm_parameters_, 1); // unified galileo decoder set to INAV (frame_type=1)
|
2013-07-15 17:07:10 +00:00
|
|
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
2021-10-10 16:56:14 +00:00
|
|
|
|
2018-06-03 17:11:16 +00:00
|
|
|
if (in_streams_ > 1)
|
|
|
|
{
|
|
|
|
LOG(ERROR) << "This implementation only supports one input stream";
|
|
|
|
}
|
|
|
|
if (out_streams_ > 1)
|
|
|
|
{
|
|
|
|
LOG(ERROR) << "This implementation only supports one output stream";
|
|
|
|
}
|
2013-07-15 17:07:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
void GalileoE1BTelemetryDecoder::set_satellite(const Gnss_Satellite& satellite)
|
2013-07-15 17:07:10 +00:00
|
|
|
{
|
|
|
|
satellite_ = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
|
|
|
telemetry_decoder_->set_satellite(satellite_);
|
|
|
|
DLOG(INFO) << "GALILEO TELEMETRY DECODER: satellite set to " << satellite_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GalileoE1BTelemetryDecoder::connect(gr::top_block_sptr top_block)
|
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
if (top_block)
|
|
|
|
{ /* top_block is not null */
|
|
|
|
};
|
2015-03-16 20:43:19 +00:00
|
|
|
// Nothing to connect internally
|
2013-07-15 17:07:10 +00:00
|
|
|
DLOG(INFO) << "nothing to connect internally";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GalileoE1BTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
|
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
if (top_block)
|
|
|
|
{ /* top_block is not null */
|
|
|
|
};
|
2015-03-16 20:43:19 +00:00
|
|
|
// Nothing to disconnect
|
2013-07-15 17:07:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gr::basic_block_sptr GalileoE1BTelemetryDecoder::get_left_block()
|
|
|
|
{
|
|
|
|
return telemetry_decoder_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gr::basic_block_sptr GalileoE1BTelemetryDecoder::get_right_block()
|
|
|
|
{
|
|
|
|
return telemetry_decoder_;
|
|
|
|
}
|