mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Apply formatting
This commit is contained in:
parent
b0c19c03f3
commit
2f14432067
@ -154,7 +154,6 @@ void GNSSFlowgraph::connect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Signal Source > Signal conditioner >
|
// Signal Source > Signal conditioner >
|
||||||
for (unsigned int i = 0; i < sig_conditioner_.size(); i++)
|
for (unsigned int i = 0; i < sig_conditioner_.size(); i++)
|
||||||
{
|
{
|
||||||
@ -216,9 +215,7 @@ void GNSSFlowgraph::connect()
|
|||||||
|
|
||||||
DLOG(INFO) << "blocks connected internally";
|
DLOG(INFO) << "blocks connected internally";
|
||||||
// Signal Source (i) > Signal conditioner (i) >
|
// Signal Source (i) > Signal conditioner (i) >
|
||||||
|
|
||||||
#ifndef ENABLE_FPGA
|
#ifndef ENABLE_FPGA
|
||||||
|
|
||||||
int RF_Channels = 0;
|
int RF_Channels = 0;
|
||||||
int signal_conditioner_ID = 0;
|
int signal_conditioner_ID = 0;
|
||||||
for (int i = 0; i < sources_count_; i++)
|
for (int i = 0; i < sources_count_; i++)
|
||||||
@ -284,11 +281,9 @@ void GNSSFlowgraph::connect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
DLOG(INFO) << "Signal source connected to signal conditioner";
|
DLOG(INFO) << "Signal source connected to signal conditioner";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_FPGA
|
#if ENABLE_FPGA
|
||||||
|
|
||||||
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
||||||
{
|
{
|
||||||
// connect the signal source to sample counter
|
// connect the signal source to sample counter
|
||||||
@ -370,7 +365,6 @@ void GNSSFlowgraph::connect()
|
|||||||
for (unsigned int i = 0; i < channels_count_; i++)
|
for (unsigned int i = 0; i < channels_count_; i++)
|
||||||
{
|
{
|
||||||
#ifndef ENABLE_FPGA
|
#ifndef ENABLE_FPGA
|
||||||
|
|
||||||
int selected_signal_conditioner_ID = 0;
|
int selected_signal_conditioner_ID = 0;
|
||||||
bool use_acq_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
bool use_acq_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
||||||
uint32_t fs = configuration_->property("GNSS-SDR.internal_fs_sps", 0);
|
uint32_t fs = configuration_->property("GNSS-SDR.internal_fs_sps", 0);
|
||||||
@ -468,7 +462,6 @@ void GNSSFlowgraph::connect()
|
|||||||
<< " acquisition resampler for RF channel " << std::to_string(signal_conditioner_ID) << " with " << taps.size() << " taps and decimation factor of " << decimation;
|
<< " acquisition resampler for RF channel " << std::to_string(signal_conditioner_ID) << " with " << taps.size() << " taps and decimation factor of " << decimation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
top_block_->connect(acq_resamplers_.at(map_key), 0,
|
top_block_->connect(acq_resamplers_.at(map_key), 0,
|
||||||
channels_.at(i)->get_left_block_acq(), 0);
|
channels_.at(i)->get_left_block_acq(), 0);
|
||||||
|
|
||||||
@ -673,8 +666,6 @@ void GNSSFlowgraph::connect()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef ENABLE_FPGA
|
#ifndef ENABLE_FPGA
|
||||||
// Activate acquisition in enabled channels
|
// Activate acquisition in enabled channels
|
||||||
for (unsigned int i = 0; i < channels_count_; i++)
|
for (unsigned int i = 0; i < channels_count_; i++)
|
||||||
@ -691,7 +682,6 @@ void GNSSFlowgraph::connect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
connected_ = true;
|
connected_ = true;
|
||||||
LOG(INFO) << "Flowgraph connected";
|
LOG(INFO) << "Flowgraph connected";
|
||||||
top_block_->dump();
|
top_block_->dump();
|
||||||
@ -711,8 +701,6 @@ void GNSSFlowgraph::disconnect()
|
|||||||
// Signal Source (i) > Signal conditioner (i) >
|
// Signal Source (i) > Signal conditioner (i) >
|
||||||
int RF_Channels = 0;
|
int RF_Channels = 0;
|
||||||
int signal_conditioner_ID = 0;
|
int signal_conditioner_ID = 0;
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_FPGA
|
#ifdef ENABLE_FPGA
|
||||||
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
||||||
{
|
{
|
||||||
@ -768,10 +756,7 @@ void GNSSFlowgraph::disconnect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
for (int i = 0; i < sources_count_; i++)
|
for (int i = 0; i < sources_count_; i++)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -874,7 +859,6 @@ void GNSSFlowgraph::disconnect()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
||||||
|
|
||||||
for (unsigned int i = 0; i < channels_count_; i++)
|
for (unsigned int i = 0; i < channels_count_; i++)
|
||||||
{
|
{
|
||||||
#ifndef ENABLE_FPGA
|
#ifndef ENABLE_FPGA
|
||||||
@ -1302,7 +1286,6 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
|||||||
available_BDS_B3_signals_.push_back(channels_[who]->get_signal());
|
available_BDS_B3_signals_.push_back(channels_[who]->get_signal());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG(ERROR) << "This should not happen :-(";
|
LOG(ERROR) << "This should not happen :-(";
|
||||||
break;
|
break;
|
||||||
@ -1317,7 +1300,6 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
|||||||
if (channels_state_[n] == 1 or channels_state_[n] == 2) //channel in acquisition or in tracking
|
if (channels_state_[n] == 1 or channels_state_[n] == 2) //channel in acquisition or in tracking
|
||||||
{
|
{
|
||||||
//recover the satellite assigned
|
//recover the satellite assigned
|
||||||
|
|
||||||
Gnss_Signal gs = channels_[n]->get_signal();
|
Gnss_Signal gs = channels_[n]->get_signal();
|
||||||
switch (mapStringValues_[gs.get_signal_str()])
|
switch (mapStringValues_[gs.get_signal_str()])
|
||||||
{
|
{
|
||||||
@ -1555,8 +1537,8 @@ void GNSSFlowgraph::set_configuration(std::shared_ptr<ConfigurationInterface> co
|
|||||||
configuration_ = std::move(configuration);
|
configuration_ = std::move(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_FPGA
|
|
||||||
|
|
||||||
|
#ifdef ENABLE_FPGA
|
||||||
void GNSSFlowgraph::start_acquisition_helper()
|
void GNSSFlowgraph::start_acquisition_helper()
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < channels_count_; i++)
|
for (unsigned int i = 0; i < channels_count_; i++)
|
||||||
@ -1576,9 +1558,9 @@ void GNSSFlowgraph::perform_hw_reset()
|
|||||||
channel_ptr = std::dynamic_pointer_cast<Channel>(channels_.at(0));
|
channel_ptr = std::dynamic_pointer_cast<Channel>(channels_.at(0));
|
||||||
channel_ptr->acquisition()->stop_acquisition();
|
channel_ptr->acquisition()->stop_acquisition();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void GNSSFlowgraph::init()
|
void GNSSFlowgraph::init()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1700,6 +1682,21 @@ void GNSSFlowgraph::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<std::string> GNSSFlowgraph::split_string(const std::string& s, char delim)
|
||||||
|
{
|
||||||
|
std::vector<std::string> v;
|
||||||
|
std::stringstream ss(s);
|
||||||
|
std::string item;
|
||||||
|
|
||||||
|
while (std::getline(ss, item, delim))
|
||||||
|
{
|
||||||
|
*(std::back_inserter(v)++) = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GNSSFlowgraph::set_signals_list()
|
void GNSSFlowgraph::set_signals_list()
|
||||||
{
|
{
|
||||||
// Set a sequential list of GNSS satellites
|
// Set a sequential list of GNSS satellites
|
||||||
@ -1804,7 +1801,6 @@ void GNSSFlowgraph::set_signals_list()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (configuration_->property("Channels_1C.count", 0) > 0)
|
if (configuration_->property("Channels_1C.count", 0) > 0)
|
||||||
{
|
{
|
||||||
// Loop to create GPS L1 C/A signals
|
// Loop to create GPS L1 C/A signals
|
||||||
@ -2249,17 +2245,3 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> GNSSFlowgraph::split_string(const std::string& s, char delim)
|
|
||||||
{
|
|
||||||
std::vector<std::string> v;
|
|
||||||
std::stringstream ss(s);
|
|
||||||
std::string item;
|
|
||||||
|
|
||||||
while (std::getline(ss, item, delim))
|
|
||||||
{
|
|
||||||
*(std::back_inserter(v)++) = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user