Modify sample counter

This commit is contained in:
Antonio Ramos
2018-02-13 19:22:23 +01:00
parent 057d19d98e
commit 8885333aa7
8 changed files with 287 additions and 264 deletions
+9 -1
View File
@@ -248,7 +248,15 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetObservables(std::shared
GPS_channels += configuration->property("Channels_2S.count", 0);
GPS_channels += configuration->property("Channels_L5.count", 0);
unsigned int Glonass_channels = configuration->property("Channels_1G.count", 0);
return GetBlock(configuration, "Observables", implementation, Galileo_channels + GPS_channels + Glonass_channels, Galileo_channels + GPS_channels + Glonass_channels);
unsigned int extra_channels = 1; // For monitor channel sample counter
return GetBlock(configuration, "Observables", implementation,
Galileo_channels +
GPS_channels +
Glonass_channels +
extra_channels,
Galileo_channels +
GPS_channels +
Glonass_channels);
}
+18 -7
View File
@@ -248,6 +248,24 @@ void GNSSFlowgraph::connect()
}
DLOG(INFO) << "Signal source connected to signal conditioner";
//connect the signal source to sample counter
//connect the sample counter to Observables
try
{
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
ch_out_sample_counter = gnss_sdr_make_sample_counter(fs);
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0);
top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse
}
catch (const std::exception & e)
{
LOG(WARNING) << "Can't connect sample counter";
LOG(ERROR) << e.what();
top_block_->disconnect_all();
return;
}
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
int selected_signal_conditioner_ID;
for (unsigned int i = 0; i < channels_count_; i++)
@@ -296,13 +314,6 @@ void GNSSFlowgraph::connect()
{
LOG(INFO) << "Channel " << i << " connected to observables in standby mode";
}
//connect the sample counter to the channel 0
if (i == 0)
{
ch_out_sample_counter = gnss_sdr_make_sample_counter();
top_block_->connect(channels_.at(i)->get_right_block(), 0, ch_out_sample_counter, 0);
}
}
/*
+1 -1
View File
@@ -74,7 +74,7 @@ const double GPS_STARTOFFSET_ms = 68.802; //[ms] Initial sign. travel time (this
// OBSERVABLE HISTORY DEEP FOR INTERPOLATION
const int GPS_L1_CA_HISTORY_DEEP = 500;
const int GPS_L1_CA_HISTORY_DEEP = 100;
// NAVIGATION MESSAGE DEMODULATION AND DECODING