2014-06-01 11:22:26 +00:00
|
|
|
/*!
|
|
|
|
* \file galileo_e5a_telemetry_decoder.h
|
|
|
|
* \brief Interface of an adapter of a GALILEO E5a FNAV data decoder block
|
|
|
|
* to a TelemetryDecoderInterface
|
2014-08-20 08:59:47 +00:00
|
|
|
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
|
|
|
* \based on work from:
|
2016-05-02 21:46:30 +00:00
|
|
|
* <ul>
|
2014-08-20 08:59:47 +00:00
|
|
|
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
|
|
|
* </ul>
|
|
|
|
*
|
2014-06-01 11:22:26 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2014-06-01 11:22:26 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2014-06-01 11:22:26 +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
|
2014-06-01 11:22:26 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2014-06-01 11:22:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "galileo_e5a_telemetry_decoder.h"
|
2018-02-26 02:15:53 +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
|
|
|
|
2014-09-05 17:48:58 +00:00
|
|
|
|
2020-06-29 07:07:41 +00:00
|
|
|
GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(
|
|
|
|
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)
|
2014-06-01 11:22:26 +00:00
|
|
|
{
|
|
|
|
DLOG(INFO) << "role " << role;
|
2020-11-21 18:37:22 +00:00
|
|
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
2014-06-01 11:22:26 +00:00
|
|
|
// make telemetry decoder object
|
2020-11-21 18:37:22 +00:00
|
|
|
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, tlm_parameters_, 2); // unified galileo decoder set to FNAV (frame_type=2)
|
2014-06-01 11:22:26 +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";
|
|
|
|
}
|
2014-06-01 11:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
void GalileoE5aTelemetryDecoder::set_satellite(const Gnss_Satellite& satellite)
|
2014-06-01 11:22:26 +00:00
|
|
|
{
|
|
|
|
satellite_ = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
|
|
|
telemetry_decoder_->set_satellite(satellite_);
|
|
|
|
DLOG(INFO) << "TELEMETRY DECODER: satellite set to " << satellite_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GalileoE5aTelemetryDecoder::connect(gr::top_block_sptr top_block)
|
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
if (top_block)
|
|
|
|
{ /* top_block is not null */
|
|
|
|
};
|
2016-01-04 21:56:52 +00:00
|
|
|
// Nothing to connect internally
|
2014-06-01 11:22:26 +00:00
|
|
|
DLOG(INFO) << "nothing to connect internally";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GalileoE5aTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
|
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
if (top_block)
|
|
|
|
{ /* top_block is not null */
|
|
|
|
};
|
2016-01-04 21:56:52 +00:00
|
|
|
// Nothing to disconnect
|
2014-06-01 11:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gr::basic_block_sptr GalileoE5aTelemetryDecoder::get_left_block()
|
|
|
|
{
|
|
|
|
return telemetry_decoder_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gr::basic_block_sptr GalileoE5aTelemetryDecoder::get_right_block()
|
|
|
|
{
|
|
|
|
return telemetry_decoder_;
|
|
|
|
}
|