2014-06-10 16:58:17 +00:00
|
|
|
/*!
|
|
|
|
* \file hybrid_observables.cc
|
|
|
|
* \brief Implementation of an adapter of a Galileo E1 observables block
|
|
|
|
* to a ObservablesInterface
|
|
|
|
* \author Javier Arribas, 2011. jarribas(at)cttc.es
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2015-01-08 18:49:59 +00:00
|
|
|
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
2014-06-10 16:58:17 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2015-01-08 18:49:59 +00:00
|
|
|
* (at your option) any later version.
|
2014-06-10 16:58:17 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "hybrid_observables.h"
|
|
|
|
#include "configuration_interface.h"
|
2016-11-02 16:35:40 +00:00
|
|
|
#include "Galileo_E1.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include "GPS_L1_CA.h"
|
|
|
|
#include <glog/logging.h>
|
|
|
|
|
2014-06-10 16:58:17 +00:00
|
|
|
|
|
|
|
using google::LogMessage;
|
|
|
|
|
|
|
|
HybridObservables::HybridObservables(ConfigurationInterface* configuration,
|
|
|
|
std::string role,
|
|
|
|
unsigned int in_streams,
|
2016-04-13 15:02:33 +00:00
|
|
|
unsigned int out_streams) :
|
2016-11-02 23:07:05 +00:00
|
|
|
role_(role),
|
|
|
|
in_streams_(in_streams),
|
|
|
|
out_streams_(out_streams)
|
2014-06-10 16:58:17 +00:00
|
|
|
{
|
|
|
|
std::string default_dump_filename = "./observables.dat";
|
|
|
|
DLOG(INFO) << "role " << role;
|
|
|
|
dump_ = configuration->property(role + ".dump", false);
|
|
|
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
2016-11-02 16:35:40 +00:00
|
|
|
unsigned int default_depth = 0;
|
|
|
|
if (GPS_L1_CA_HISTORY_DEEP == GALILEO_E1_HISTORY_DEEP)
|
2016-11-02 23:07:05 +00:00
|
|
|
{
|
|
|
|
default_depth = GPS_L1_CA_HISTORY_DEEP;
|
|
|
|
}
|
2016-11-02 16:35:40 +00:00
|
|
|
else
|
2016-11-02 23:07:05 +00:00
|
|
|
{
|
2017-08-03 15:52:42 +00:00
|
|
|
default_depth = 500;
|
2016-11-02 23:07:05 +00:00
|
|
|
}
|
2017-04-12 15:04:51 +00:00
|
|
|
unsigned int history_deep = configuration->property(role + ".history_depth", default_depth);
|
2016-11-02 16:35:40 +00:00
|
|
|
observables_ = hybrid_make_observables_cc(in_streams_, dump_, dump_filename_, history_deep);
|
2014-06-10 16:58:17 +00:00
|
|
|
DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HybridObservables::~HybridObservables()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void HybridObservables::connect(gr::top_block_sptr top_block)
|
|
|
|
{
|
2015-03-16 23:22:20 +00:00
|
|
|
if(top_block) { /* top_block is not null */};
|
|
|
|
// Nothing to connect internally
|
2014-06-10 16:58:17 +00:00
|
|
|
DLOG(INFO) << "nothing to connect internally";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void HybridObservables::disconnect(gr::top_block_sptr top_block)
|
|
|
|
{
|
2015-03-16 23:22:20 +00:00
|
|
|
if(top_block) { /* top_block is not null */};
|
|
|
|
// Nothing to disconnect
|
2014-06-10 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gr::basic_block_sptr HybridObservables::get_left_block()
|
|
|
|
{
|
|
|
|
return observables_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gr::basic_block_sptr HybridObservables::get_right_block()
|
|
|
|
{
|
|
|
|
return observables_;
|
|
|
|
}
|