1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-04 11:02:57 +00:00

Merge branch 'next' into Arribas_branch/next

Conflicts:
	src/algorithms/signal_source/adapters/uhd_signal_source.cc
	src/core/receiver/gnss_flowgraph.cc
This commit is contained in:
Javier Arribas 2015-03-01 21:33:20 +01:00
commit 46752fcc7c
112 changed files with 1399 additions and 846 deletions

View File

@ -275,9 +275,17 @@ if(EXISTS $ENV{GTEST_DIR})
set(GTEST_DIR $ENV{GTEST_DIR})
endif(EXISTS $ENV{GTEST_DIR})
if(GTEST_DIR)
message(STATUS "GTEST root folder at ${GTEST_DIR}")
message(STATUS "Googletest root folder set at ${GTEST_DIR}")
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS ${GTEST_DIR})
if(LIBGTEST_DEV_DIR)
message (STATUS "Googletest has been found.")
else(LIBGTEST_DEV_DIR)
message (FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.")
endif(LIBGTEST_DEV_DIR)
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_DIR}/include)
else(GTEST_DIR)
find_path(LIBGTEST_DEV_DIR NAMES gtest-all.cc PATHS /usr/src/gtest/src)
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS /usr/src/gtest /opt/local/src/gtest)
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS /usr/include /opt/local/include)
if(LIBGTEST_DEV_DIR)
message (STATUS "Googletest (libgtest-dev package) has been found.")
else(LIBGTEST_DEV_DIR)

View File

@ -29,10 +29,12 @@ GNSS-SDR.SUPL_CI=0x31b0
SignalSource.implementation=File_Signal_Source
;#filename: path to file with the captured GNSS signal samples to be processed
SignalSource.filename=../data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
;SignalSource.filename=../data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
SignalSource.filename=../../../Documents/workspace/code2/trunk/data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
SignalSource.item_type=short
;SignalSource.item_type=short
SignalSource.item_type=byte
;#sampling_frequency: Original Signal sampling frequency in [Hz]
SignalSource.sampling_frequency=4000000
@ -75,7 +77,10 @@ SignalConditioner.implementation=Signal_Conditioner
;######### DATA_TYPE_ADAPTER CONFIG ############
;## Changes the type of input data. Please disable it in this version.
;#implementation: [Pass_Through] disables this block
DataTypeAdapter.implementation=Ishort_To_Complex
;DataTypeAdapter.implementation=Ishort_To_Complex
;DataTypeAdapter.implementation=Ibyte_To_Cbyte
DataTypeAdapter.implementation=Pass_Through
DataTypeAdapter.item_type=byte
;######### INPUT_FILTER CONFIG ############
;## Filter the input data. Can be combined with frequency translation for IF signals
@ -86,8 +91,8 @@ DataTypeAdapter.implementation=Ishort_To_Complex
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
;InputFilter.implementation=Fir_Filter
;InputFilter.implementation=Freq_Xlating_Fir_Filter
InputFilter.implementation=Pass_Through
InputFilter.implementation=Freq_Xlating_Fir_Filter
;InputFilter.implementation=Pass_Through
;#dump: Dump the filtered data to a file.
InputFilter.dump=false
@ -100,7 +105,7 @@ InputFilter.dump_filename=../data/input_filter.dat
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges, the desired reponse on those bands, and the weight given to the error in those bands.
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
InputFilter.input_item_type=gr_complex
InputFilter.input_item_type=byte
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
InputFilter.output_item_type=gr_complex
@ -167,6 +172,7 @@ Resampler.dump_filename=../data/resampler.dat
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
Resampler.item_type=gr_complex
;Resampler.item_type=cbyte
;#sample_freq_in: the sample frequency of the input signal
Resampler.sample_freq_in=8000000

View File

@ -1,38 +1,38 @@
.\" Manpage for front-end-cal.
.\" Manpage for front\-end\-cal.
.\" Contact javier.arribas@cttc.es to correct errors or typos.
.TH front-end-cal 1 "15 Dec 2014" "0.0.1" "front-end-cal man page"
.TH front\-end\-cal 1 "15 Dec 2014" "0.0.1" "front\-end\-cal man page"
.SH NAME
\fBfront-end-cal\fR \- RF front-end center frequency and sampling rate calibration tool.
\fBfront\-end\-cal\fR \- RF front\-end center frequency and sampling rate calibration tool.
.SH SYNOPSIS
\fBfront-end-cal -config_file=\fR\fI<path-to-configuration-file>\fR [OPTION]...
\fBfront\-end\-cal \-config_file=\fR\fI<path\-to\-configuration\-file>\fR [OPTION]...
.SH DESCRIPTION
\fBfront-end-cal\fR is a calibration tool for some DVB-T receivers based on the Taiwan's Realtek RTL2832U chipset, sold in form of USB dongles that allow users to watch over-the-air DVB-T European broadcast television on their personal computers, to be used as GNSS front-ends.
\fBfront\-end\-cal\fR is a calibration tool for some DVB\-T receivers based on the Taiwan's Realtek RTL2832U chipset, sold in form of USB dongles that allow users to watch over\-the\-air DVB\-T European broadcast television on their personal computers, to be used as GNSS front\-ends.
\.TP
Normally, those devices send partially-decoded MPEG transport frames over the USB, but exploiting an undocumented mode of operation of the demodulator chip, the user is able to obtain raw I&Q samples, stream them through USB to a personal computer and then use \fBgnss-sdr\fR, turning the DVB-T receiver into a GNSS receiver and delivering position in real-time.
Normally, those devices send partially\-decoded MPEG transport frames over the USB, but exploiting an undocumented mode of operation of the demodulator chip, the user is able to obtain raw I&Q samples, stream them through USB to a personal computer and then use \fBgnss\-sdr\fR, turning the DVB\-T receiver into a GNSS receiver and delivering position in real\-time.
\.TP
The crystal oscillator that ships with the RTL2832U family devices exhibits limited accuracy to be used as a GNSS receiver front-end without previous calibration. \fBfront-end-cal\fR automatizes the algorithm proposed in [1], and it requires Internet access since it retrieves Assisted GPS data from SUPL servers.
The crystal oscillator that ships with the RTL2832U family devices exhibits limited accuracy to be used as a GNSS receiver front\-end without previous calibration. \fBfront\-end\-cal\fR implements the algorithm proposed in [1], and it requires Internet access since it retrieves Assisted GPS data from SUPL servers.
\.TP
\fBfront-end-cal\fR is able to work with raw data files or, if there is computational power enough, in real time with suitable radiofrequency front-ends. The whole receiver is defined in a single configuration file, and therefore users can define theirs.
\fBfront\-end\-cal\fR is able to work with raw data files or, if there is computational power enough, in real time with suitable radio frequency front\-ends. The whole receiver is defined in a single configuration file, and therefore users can define theirs.
.SH OPTIONS
\fBfront-end-cal\fR takes the following options:
\fBfront\-end\-cal\fR takes the following options:
.TP
\fB-config_file=\fR\fI<path-to-configuration-file>\fR Set the configuration file.
\fB\-config_file=\fR\fI<path\-to\-configuration\-file>\fR Set the configuration file.
.TP
\fB-signal_source=\fR\fI<path-to-raw-signal-file>\fR If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file).
\fB\-signal_source=\fR\fI<path\-to\-raw\-signal\-file>\fR If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file).
.TP
\fB-log_dir=\fR\fI<path-to-directory>\fR If defined, overrides the default directory where logs are saved.
\fB\-log_dir=\fR\fI<path\-to\-directory>\fR If defined, overrides the default directory where logs are saved.
.TP
\fB-version\fR Print program version and exit.
\fB\-version\fR Print program version and exit.
.TP
\fB-help\fR Print all the available commandline flags and exit.
\fB\-help\fR Print all the available commandline flags and exit.
.SH SEE ALSO
.BR gnss-sdr (1), volk_gnsssdr_profile (1)
.BR gnss\-sdr (1), volk_gnsssdr_profile (1)
\.TP
Example of configuration file available at: ${prefix}/share/gnss-sdr/conf/front-end-cal.conf, where ${prefix}$ uses to be /usr or /usr/local. This will be the configuration file used by default if the \fB-config_file\fR option is not set.
Example of configuration file available at: ${prefix}/share/gnss\-sdr/conf/front\-end\-cal.conf, where ${prefix}$ uses to be /usr or /usr/local. This will be the configuration file used by default if the \fB\-config_file\fR option is not set.
\.TP
[1] C. Fernandez-Prades, J. Arribas, P. Closas, \fITurning a Television into a GNSS Receiver\fR, in Proceedings of ION GNSS+, 15-16 September 2013, Nashville, Tennessee (USA). A draft copy is freely available at http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
[1] C. Fernandez\-Prades, J. Arribas, P. Closas, \fITurning a Television into a GNSS Receiver\fR, in Proceedings of ION GNSS+, 15\-16 September 2013, Nashville, Tennessee (USA). A draft copy is freely available at http://www.cttc.es/publication/turning\-a\-television\-into\-a\-gnss\-receiver/
\.TP
Check http://gnss-sdr.org for more information.
Check http://gnss\\-sdr.org for more information.
.SH BUGS
No known bugs.
.SH AUTHOR

View File

@ -1,37 +1,37 @@
.\" Manpage for gnss-sdr.
.\" Manpage for gnss\-sdr.
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
.TH gnss-sdr 1 "14 Nov 2014" "0.0.5" "gnss-sdr man page"
.TH gnss\-sdr 1 "14 Nov 2014" "0.0.5" "gnss\-sdr man page"
.SH NAME
\fBgnss-sdr\fR \- GNSS Software Defined Receiver.
\fBgnss\-sdr\fR \- GNSS Software Defined Receiver.
.SH SYNOPSIS
\fBgnss-sdr -config_file=\fR\fI<path-to-configuration-file>\fR [OPTION]...
\fBgnss\-sdr \-config_file=\fR\fI<path\-to\-configuration\-file>\fR [OPTION]...
.SH DESCRIPTION
\fBgnss-sdr\fR is a Global Navigation Satellite Systems Software Defined Receiver written in C++. It implements all the signal processing chain, taking as input raw samples coming from the output of an Analog-to-Digital Converter, and processing them up to the computation of the Position-Velocity-Time solution, including the generation of code and phase observables.
\fBgnss\-sdr\fR is a Global Navigation Satellite Systems Software Defined Receiver written in C++. It implements all the signal processing chain, taking as input raw samples coming from the output of an Analog\-to\-Digital Converter, and processing them up to the computation of the Position\-Velocity\-Time solution, including the generation of code and phase measurements.
\.TP
\fBgnss-sdr\fR is able to work with raw data files or, if there is computational power enough, in real time with suitable radiofrequency front-ends. The whole receiver is defined in a single configuration file, and therefore users can define theirs.
\fBgnss\-sdr\fR is able to work with raw data files or, if there is computational power enough, in real time with suitable radio frequency front\-ends. The whole receiver is defined in a single configuration file, and therefore users can define theirs.
.SH OPTIONS
\fBgnss-sdr\fR takes the following options:
\fBgnss\-sdr\fR takes the following options:
.TP
\fB-config_file=\fR\fI<path-to-configuration-file>\fR Set the configuration file.
\fB\-config_file=\fR\fI<path\-to\-configuration\-file>\fR Set the configuration file.
.TP
\fB-signal_source=\fR\fI<path-to-raw-signal-file>\fR If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file).
\fB\-signal_source=\fR\fI<path\-to\-raw\-signal\-file>\fR If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file).
.TP
\fB-log_dir=\fR\fI<path-to-directory>\fR If defined, overrides the default directory where logs are saved.
\fB\-log_dir=\fR\fI<path\-to\-directory>\fR If defined, overrides the default directory where logs are saved.
.TP
\fB-RINEX_version=\fI<version>\fR Specifies the RINEX version (2.11 or 3.02). Default: "3.02".
\fB\-RINEX_version=\fI<version>\fR Specifies the RINEX version (2.11 or 3.02). Default: "3.02".
.TP
\fB-version\fR Print program version and exit.
\fB\-version\fR Print program version and exit.
.TP
\fB-help\fR Print all the available commandline flags and exit.
\fB\-help\fR Print all the available commandline flags and exit.
.SH SEE ALSO
.BR volk_gnsssdr_profile (1)
\.TP
Examples of configuration files available at: ${prefix}/share/gnss-sdr/conf, where ${prefix}$ uses to be /usr or /usr/local.
Examples of configuration files available at: ${prefix}/share/gnss\-sdr/conf, where ${prefix} uses to be /usr or /usr/local.
\.TP
Check http://gnss-sdr.org for more information.
Check http://gnss\-sdr.org for more information.
.SH BUGS
No known bugs.
.SH AUTHOR
Carles Fernandez-Prades (carles.fernandez@cttc.es)
Carles Fernandez\-Prades (carles.fernandez@cttc.es)
\.TP
This software package has been developed at CTTC (Centre Tecnologic de Telecomunicacions de Catalunya, http://www.cttc.es) with contributions from around the world.

View File

@ -86,6 +86,7 @@ GalileoE1Pvt::~GalileoE1Pvt()
void GalileoE1Pvt::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -93,6 +94,7 @@ void GalileoE1Pvt::connect(gr::top_block_sptr top_block)
void GalileoE1Pvt::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -85,6 +85,7 @@ GpsL1CaPvt::~GpsL1CaPvt()
void GpsL1CaPvt::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -92,6 +93,7 @@ void GpsL1CaPvt::connect(gr::top_block_sptr top_block)
void GpsL1CaPvt::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -86,6 +86,7 @@ HybridPvt::~HybridPvt()
void HybridPvt::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -93,6 +94,7 @@ void HybridPvt::connect(gr::top_block_sptr top_block)
void HybridPvt::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -932,7 +932,7 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
gps_ephemeris_iter++)
{
// -------- SV / EPOCH / SV CLK
boost::posix_time::ptime p_utc_time = Rinex_Printer::compute_GPS_time(gps_ephemeris_iter->second,gps_ephemeris_iter->second.d_TOW);
boost::posix_time::ptime p_utc_time = Rinex_Printer::compute_GPS_time(gps_ephemeris_iter->second, gps_ephemeris_iter->second.d_Toe);
std::string timestring = boost::posix_time::to_iso_string(p_utc_time);
std::string month (timestring, 4, 2);
std::string day (timestring, 6, 2);
@ -946,15 +946,55 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
std::string year (timestring, 2, 2);
line += year;
line += std::string(1, ' ');
if(boost::lexical_cast<int>(month) < 10)
{
line += std::string(1, ' ');
line += std::string(month, 1, 1);
}
else
{
line += month;
}
line += std::string(1, ' ');
if(boost::lexical_cast<int>(day) < 10)
{
line += std::string(1, ' ');
line += std::string(day, 1, 1);
}
else
{
line += day;
}
line += std::string(1, ' ');
if(boost::lexical_cast<int>(hour) < 10)
{
line += std::string(1, ' ');
line += std::string(hour, 1, 1);
}
else
{
line += hour;
}
line += std::string(1, ' ');
if(boost::lexical_cast<int>(minutes) < 10)
{
line += std::string(1, ' ');
line += std::string(minutes, 1, 1);
}
else
{
line += minutes;
}
line += std::string(1, ' ');
if(boost::lexical_cast<int>(seconds) < 10)
{
line += std::string(1, ' ');
line += std::string(seconds, 1, 1);
}
else
{
line += seconds;
}
line += std::string(1, '.');
std::string decimal = std::string("0");
if (timestring.size() > 16)
@ -1010,18 +1050,15 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
{
line += std::string(5, ' ');
}
// IODE is not present in ephemeris data
// If there is a discontinued reception the ephemeris is not validated
//if (gps_ephemeris_iter->second.d_IODE_SF2 == gps_ephemeris_iter->second.d_IODE_SF3)
// {
// line += Rinex_Printer::doub2for(gps_ephemeris_iter->second.d_IODE_SF2, 18, 2);
// }
//else
// {
// LOG(ERROR) << "Discontinued reception of Frame 2 and 3 " << std::endl;
// }
double d_IODE_SF2 = 0;
line += Rinex_Printer::doub2for(d_IODE_SF2, 18, 2);
if (gps_ephemeris_iter->second.d_IODE_SF2 == gps_ephemeris_iter->second.d_IODE_SF3)
{
line += Rinex_Printer::doub2for(gps_ephemeris_iter->second.d_IODE_SF2, 18, 2);
}
else
{
LOG(WARNING) << "Discontinued reception of Frame 2 and 3";
}
line += std::string(1, ' ');
line += Rinex_Printer::doub2for(gps_ephemeris_iter->second.d_Crs, 18, 2);
line += std::string(1, ' ');
@ -2145,7 +2182,12 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& eph,
line += std::string(1, ' ');
line += minutes;
line += std::string(1, ' ');
line += Rinex_Printer::asString(fmod(gps_t, 60), 7);
double second_ = fmod(gps_t, 60);
if (second_ < 10)
{
line += std::string(1, ' ');
}
line += Rinex_Printer::asString(second_, 7);
line += std::string(2, ' ');
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
line += std::string(1, '0');
@ -2195,12 +2237,33 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& eph,
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L1 CA PHASE
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L1 CA DOPPLER
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
//GPS L1 SIGNAL STRENGTH
//int ssi=signalStrength(54.0); // The original RINEX 2.11 file stores the RSS in a tabulated format 1-9. However, it is also valid to store the CN0 using dB-Hz units
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
out << lineObs << std::endl;
@ -2276,11 +2339,34 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& eph,
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L1 CA PHASE
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L1 CA DOPPLER
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
//GPS L1 SIGNAL STRENGTH
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
@ -2376,10 +2462,35 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Galileo_Ephemeris& e
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo E1B PHASE
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads / (2 * GALILEO_PI), 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo E1B DOPPLER
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo E1B SIGNAL STRENGTH
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
@ -2472,11 +2583,33 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& gps_e
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// PHASE
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// DOPPLER
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
if (lli == 0)
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// SIGNAL STRENGTH
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);

View File

@ -16,37 +16,25 @@
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
#
set(ACQ_ADAPTER_SOURCES
gps_l1_ca_pcps_acquisition.cc
gps_l1_ca_pcps_multithread_acquisition.cc
gps_l1_ca_pcps_assisted_acquisition.cc
gps_l1_ca_pcps_acquisition_fine_doppler.cc
gps_l1_ca_pcps_tong_acquisition.cc
gps_l1_ca_pcps_quicksync_acquisition.cc
galileo_e1_pcps_ambiguous_acquisition.cc
galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc
galileo_e1_pcps_quicksync_ambiguous_acquisition.cc
galileo_e1_pcps_tong_ambiguous_acquisition.cc
galileo_e1_pcps_8ms_ambiguous_acquisition.cc
galileo_e5a_noncoherent_iq_acquisition_caf.cc
)
if(OPENCL_FOUND)
set(ACQ_ADAPTER_SOURCES
gps_l1_ca_pcps_acquisition.cc
gps_l1_ca_pcps_multithread_acquisition.cc
gps_l1_ca_pcps_assisted_acquisition.cc
gps_l1_ca_pcps_acquisition_fine_doppler.cc
gps_l1_ca_pcps_tong_acquisition.cc
gps_l1_ca_pcps_quicksync_acquisition.cc
gps_l1_ca_pcps_opencl_acquisition.cc
galileo_e1_pcps_ambiguous_acquisition.cc
galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc
galileo_e1_pcps_quicksync_ambiguous_acquisition.cc
galileo_e1_pcps_tong_ambiguous_acquisition.cc
galileo_e1_pcps_8ms_ambiguous_acquisition.cc
galileo_e5a_noncoherent_iq_acquisition_caf.cc
)
else(OPENCL_FOUND)
set(ACQ_ADAPTER_SOURCES
gps_l1_ca_pcps_acquisition.cc
gps_l1_ca_pcps_multithread_acquisition.cc
gps_l1_ca_pcps_assisted_acquisition.cc
gps_l1_ca_pcps_acquisition_fine_doppler.cc
gps_l1_ca_pcps_tong_acquisition.cc
gps_l1_ca_pcps_quicksync_acquisition.cc
galileo_e1_pcps_ambiguous_acquisition.cc
galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc
galileo_e1_pcps_quicksync_ambiguous_acquisition.cc
galileo_e1_pcps_tong_ambiguous_acquisition.cc
galileo_e1_pcps_8ms_ambiguous_acquisition.cc
galileo_e5a_noncoherent_iq_acquisition_caf.cc
)
set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES} gps_l1_ca_pcps_opencl_acquisition.cc)
endif(OPENCL_FOUND)
include_directories(
@ -60,9 +48,11 @@ include_directories(
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
)
file(GLOB ACQ_ADAPTER_HEADERS "*.h")
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
source_group(Headers FILES ${ACQ_ADAPTER_HEADERS})
target_link_libraries(acq_adapters gnss_sp_libs acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})

View File

@ -267,6 +267,12 @@ GalileoE1PcpsAmbiguousAcquisition::reset()
}
}
void
GalileoE1PcpsAmbiguousAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
}
float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
{
unsigned int frequency_bins = 0;

View File

@ -129,6 +129,11 @@ public:
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;

View File

@ -259,9 +259,17 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::reset()
}
}
void
GalileoE1PcpsCccwsrAmbiguousAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
}
float GalileoE1PcpsCccwsrAmbiguousAcquisition::calculate_threshold(float pfa)
{
if(pfa){ /* Not implemented*/};
return 0.0;
}

View File

@ -126,6 +126,11 @@ public:
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_cccwsr_acquisition_cc_sptr acquisition_cc_;

View File

@ -294,6 +294,16 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset()
}
}
void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_state(int state)
{
if (item_type_.compare("gr_complex") == 0)
{
acquisition_cc_->set_state(state);
}
}
float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa)
{
unsigned int frequency_bins = 0;

View File

@ -129,6 +129,11 @@ public:
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_quicksync_acquisition_cc_sptr acquisition_cc_;

View File

@ -259,6 +259,12 @@ GalileoE1PcpsTongAmbiguousAcquisition::reset()
}
}
void
GalileoE1PcpsTongAmbiguousAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
}
float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa)
{

View File

@ -129,6 +129,11 @@ public:
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_tong_acquisition_cc_sptr acquisition_cc_;

View File

@ -304,15 +304,22 @@ float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
return threshold;
}
void GalileoE5aNoncoherentIQAcquisitionCaf::set_state(int state)
{
acquisition_cc_->set_state(state);
}
void GalileoE5aNoncoherentIQAcquisitionCaf::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
}
void GalileoE5aNoncoherentIQAcquisitionCaf::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect internally
}

View File

@ -129,6 +129,13 @@ public:
*/
void reset();
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;

View File

@ -60,6 +60,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
item_type_ = configuration_->property(role + ".item_type",
default_item_type);
//float pfa = configuration_->property(role + ".pfa", 0.0);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration_->property(role + ".ifreq", 0);
@ -89,8 +90,8 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
code_= new gr_complex[vector_length_];
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0 )
// {
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
@ -98,16 +99,27 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id()
<< ")";
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id()
<< ")";
}
else
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
// }
if (item_type_.compare("cshort") == 0)
{
LOG(WARNING) << item_type_
<< " unknown acquisition item type";
cshort_to_float_x2_ = make_cshort_to_float_x2();
float_to_complex_ = gr::blocks::float_to_complex::make();
}
if (item_type_.compare("cbyte") == 0)
{
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
float_to_complex_ = gr::blocks::float_to_complex::make();
}
//}
//else
// {
// LOG(WARNING) << item_type_
// << " unknown acquisition item type";
// }
}
@ -120,10 +132,10 @@ GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition()
void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel)
{
channel_ = channel;
if (item_type_.compare("gr_complex") == 0)
{
//if (item_type_.compare("gr_complex") == 0)
//{
acquisition_cc_->set_channel(channel_);
}
//}
}
@ -146,30 +158,30 @@ void GpsL1CaPcpsAcquisition::set_threshold(float threshold)
DLOG(INFO) <<"Channel "<<channel_<<" Threshold = " << threshold_;
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_threshold(threshold_);
}
// }
}
void GpsL1CaPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
{
doppler_max_ = doppler_max;
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_doppler_max(doppler_max_);
}
// }
}
void GpsL1CaPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
{
doppler_step_ = doppler_step;
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_doppler_step(doppler_step_);
}
// }
}
@ -178,33 +190,33 @@ void GpsL1CaPcpsAcquisition::set_channel_queue(
concurrent_queue<int> *channel_internal_queue)
{
channel_internal_queue_ = channel_internal_queue;
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_channel_queue(channel_internal_queue_);
}
// }
}
void GpsL1CaPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{
gnss_synchro_ = gnss_synchro;
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
}
// }
}
signed int GpsL1CaPcpsAcquisition::mag()
{
if (item_type_.compare("gr_complex") == 0)
{
// // if (item_type_.compare("gr_complex") == 0)
// {
return acquisition_cc_->mag();
}
else
{
return 0;
}
// }
// else
// {
// return 0;
// }
}
@ -217,8 +229,8 @@ void GpsL1CaPcpsAcquisition::init()
void GpsL1CaPcpsAcquisition::set_local_code()
{
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
std::complex<float>* code = new std::complex<float>[code_length_];
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
@ -232,19 +244,28 @@ void GpsL1CaPcpsAcquisition::set_local_code()
acquisition_cc_->set_local_code(code_);
delete[] code;
}
// }
}
void GpsL1CaPcpsAcquisition::reset()
{
if (item_type_.compare("gr_complex") == 0)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_active(true);
// }
}
void GpsL1CaPcpsAcquisition::set_state(int state)
{
// if (item_type_.compare("gr_complex") == 0)
// {
acquisition_cc_->set_state(state);
// }
}
float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa)
{
//Calculate the threshold
@ -271,6 +292,24 @@ void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
{
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->connect(cshort_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cshort_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
}
else
{
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
}
@ -281,13 +320,51 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
{
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
// Since a short-based acq implementation is not available,
// we just convert cshorts to gr_complex
top_block->disconnect(cshort_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cshort_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
// Since a byte-based acq implementation is not available,
// we just convert cshorts to gr_complex
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
}
else
{
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
}
gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
{
if (item_type_.compare("gr_complex") == 0)
{
return stream_to_vector_;
}
else if (item_type_.compare("cshort") == 0)
{
return cshort_to_float_x2_;
}
else if (item_type_.compare("cbyte") == 0)
{
return cbyte_to_float_x2_;
}
else
{
LOG(WARNING) << item_type_ << " unknown acquisition item type";
return nullptr;
}
}
gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_right_block()

View File

@ -39,9 +39,12 @@
#include <string>
#include <gnuradio/msg_queue.h>
#include <gnuradio/blocks/stream_to_vector.h>
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_cc.h"
#include "cshort_to_float_x2.h"
#include "complex_byte_to_float_x2.h"
@ -134,10 +137,18 @@ public:
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
gr::blocks::float_to_complex::sptr float_to_complex_;
cshort_to_float_x2_sptr cshort_to_float_x2_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
size_t item_size_;
std::string item_type_;
unsigned int vector_length_;

View File

@ -166,7 +166,7 @@ void GpsL1CaPcpsAcquisitionFineDoppler::reset()
void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr<gr::top_block> top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}
@ -174,6 +174,7 @@ void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr<gr::top_block>
void GpsL1CaPcpsAcquisitionFineDoppler::disconnect(boost::shared_ptr<gr::top_block> top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -163,14 +163,14 @@ void GpsL1CaPcpsAssistedAcquisition::reset()
void GpsL1CaPcpsAssistedAcquisition::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}
void GpsL1CaPcpsAssistedAcquisition::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -276,6 +276,14 @@ void GpsL1CaPcpsQuickSyncAcquisition::reset()
}
}
void GpsL1CaPcpsQuickSyncAcquisition::set_state(int state)
{
if (item_type_.compare("gr_complex") == 0)
{
acquisition_cc_->set_state(state);
}
}
float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa)
{

View File

@ -132,7 +132,10 @@ public:
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_quicksync_acquisition_cc_sptr acquisition_cc_;

View File

@ -229,6 +229,14 @@ void GpsL1CaPcpsTongAcquisition::reset()
}
}
void GpsL1CaPcpsTongAcquisition::set_state(int state)
{
if (item_type_.compare("gr_complex") == 0)
{
acquisition_cc_->set_state(state);
}
}
float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa)
{
//Calculate the threshold

View File

@ -127,10 +127,14 @@ public:
/*!
* \brief Restart acquisition algorithm
*/// std::cout << "role " << role_ << std::endl;
*/
void reset();
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
private:
ConfigurationInterface* configuration_;
pcps_tong_acquisition_cc_sptr acquisition_cc_;

View File

@ -16,31 +16,21 @@
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
#
set(ACQ_GR_BLOCKS_SOURCES
pcps_acquisition_cc.cc
pcps_multithread_acquisition_cc.cc
pcps_assisted_acquisition_cc.cc
pcps_acquisition_fine_doppler_cc.cc
pcps_tong_acquisition_cc.cc
pcps_cccwsr_acquisition_cc.cc
pcps_quicksync_acquisition_cc.cc
galileo_pcps_8ms_acquisition_cc.cc
galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
)
if(OPENCL_FOUND)
set(ACQ_GR_BLOCKS_SOURCES
pcps_acquisition_cc.cc
pcps_multithread_acquisition_cc.cc
pcps_assisted_acquisition_cc.cc
pcps_acquisition_fine_doppler_cc.cc
pcps_tong_acquisition_cc.cc
pcps_cccwsr_acquisition_cc.cc
pcps_quicksync_acquisition_cc.cc
galileo_pcps_8ms_acquisition_cc.cc
galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
pcps_opencl_acquisition_cc.cc # Needs OpenCL
)
else(OPENCL_FOUND)
set(ACQ_GR_BLOCKS_SOURCES
pcps_acquisition_cc.cc
pcps_multithread_acquisition_cc.cc
pcps_assisted_acquisition_cc.cc
pcps_acquisition_fine_doppler_cc.cc
pcps_tong_acquisition_cc.cc
pcps_cccwsr_acquisition_cc.cc
pcps_quicksync_acquisition_cc.cc
galileo_pcps_8ms_acquisition_cc.cc
galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
)
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_opencl_acquisition_cc.cc)
endif(OPENCL_FOUND)
include_directories(

View File

@ -281,6 +281,31 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
}
void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -203,6 +203,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -166,6 +166,30 @@ void galileo_pcps_8ms_acquisition_cc::init()
}
}
void galileo_pcps_8ms_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -161,6 +161,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -158,6 +158,29 @@ void pcps_acquisition_cc::init()
}
}
void pcps_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -182,6 +182,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -45,8 +45,8 @@
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_PCPS_acquisition_fine_doppler_cc_H_
#define GNSS_SDR_PCPS_acquisition_fine_doppler_cc_H_
#ifndef GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
#define GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
#include <fstream>
#include <queue>
@ -61,8 +61,10 @@
#include "gnss_synchro.h"
class pcps_acquisition_fine_doppler_cc;
typedef boost::shared_ptr<pcps_acquisition_fine_doppler_cc>
pcps_acquisition_fine_doppler_cc_sptr;
pcps_acquisition_fine_doppler_cc_sptr
pcps_make_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms,
int doppler_max, int doppler_min, long freq, long fs_in, int samples_per_ms,

View File

@ -182,6 +182,29 @@ void pcps_cccwsr_acquisition_cc::init()
}
}
void pcps_cccwsr_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -172,6 +172,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -299,6 +299,33 @@ void pcps_multithread_acquisition_cc::acquisition_core()
d_core_working = false;
}
void pcps_multithread_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
d_in_dwell_count = 0;
d_sample_counter_buffer.clear();
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_multithread_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -190,6 +190,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -664,6 +664,28 @@ void pcps_opencl_acquisition_cc::acquisition_core_opencl()
}
void pcps_multithread_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
d_in_dwell_count = 0;
d_sample_counter_buffer.clear();
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_opencl_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,

View File

@ -216,6 +216,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -208,6 +208,28 @@ void pcps_quicksync_acquisition_cc::init()
}
void pcps_quicksync_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
d_active = 1;
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -202,6 +202,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -186,6 +186,37 @@ void pcps_tong_acquisition_cc::init()
}
}
void pcps_tong_acquisition_cc::set_state(int state)
{
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_well_count = 0;
d_tong_count = d_tong_init_val;
d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
{
for (unsigned int i = 0; i < d_fft_size; i++)
{
d_grid_data[doppler_index][i] = 0;
}
}
}
else if (d_state == 0)
{}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_tong_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)

View File

@ -180,6 +180,13 @@ public:
d_active = active;
}
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Set acquisition channel unique ID
* \param channel - receiver channel.

View File

@ -58,10 +58,10 @@ public:
{
return role_;
}
//! Returns "ByteToShort"
//! Returns "Byte_To_Short"
std::string implementation()
{
return "ByteToShort";
return "Byte_To_Short";
}
size_t item_size()
{

View File

@ -59,10 +59,10 @@ public:
{
return role_;
}
//! Returns "IbyteToCbyte"
//! Returns "Ibyte_To_Cbyte"
std::string implementation()
{
return "IbyteToCbyte";
return "Ibyte_To_Cbyte";
}
size_t item_size()
{

View File

@ -59,10 +59,10 @@ public:
{
return role_;
}
//! Returns "IbyteToComplex"
//! Returns "Ibyte_To_Complex"
std::string implementation()
{
return "IbyteToComplex";
return "Ibyte_To_Complex";
}
size_t item_size()
{

View File

@ -58,10 +58,10 @@ public:
{
return role_;
}
//! Returns "IshortToComplex"
//! Returns "Ishort_To_Complex"
std::string implementation()
{
return "IshortToComplex";
return "Ishort_To_Complex";
}
size_t item_size()
{

View File

@ -59,10 +59,10 @@ public:
{
return role_;
}
//! Returns "IshortToCshort"
//! Returns "Ishort_To_Cshort"
std::string implementation()
{
return "IshortToCshort";
return "Ishort_To_Cshort";
}
size_t item_size()
{

View File

@ -27,6 +27,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
@ -36,5 +37,5 @@ include_directories(
file(GLOB INPUT_FILTER_ADAPTER_HEADERS "*.h")
add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES} ${INPUT_FILTER_ADAPTER_HEADERS})
source_group(Headers FILES ${INPUT_FILTER_ADAPTER_HEADERS})
add_dependencies(input_filter_adapters glog-${glog_RELEASE})
target_link_libraries(input_filter_adapters input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES})
add_dependencies(input_filter_adapters glog-${glog_RELEASE} gnss_sp_libs)
target_link_libraries(input_filter_adapters input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES} gnss_sp_libs)

View File

@ -76,6 +76,23 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0)
&& (output_item_type_.compare("gr_complex") == 0))
{
item_size = sizeof(gr_complex);
cshort_to_float_x2_ = make_cshort_to_float_x2();
fir_filter_fff_1_ = gr::filter::fir_filter_fff::make(1, taps_);
fir_filter_fff_2_ = gr::filter::fir_filter_fff::make(1, taps_);
DLOG(INFO) << "I input_filter(" << fir_filter_fff_1_->unique_id() << ")";
DLOG(INFO) << "Q input_filter(" << fir_filter_fff_2_->unique_id() << ")";
float_to_complex_ = gr::blocks::float_to_complex::make();
if (dump_)
{
DLOG(INFO) << "Dumping output into file " << dump_filename_;
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0)
&& (output_item_type_.compare("gr_complex") == 0))
{
@ -169,7 +186,6 @@ void FirFilter::connect(gr::top_block_sptr top_block)
{
top_block->connect(float_to_complex_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0)
&& (output_item_type_.compare("cbyte") == 0))
@ -185,6 +201,18 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(char_x2_cbyte_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0)
&& (output_item_type_.compare("gr_complex") == 0))
{
top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
top_block->connect(fir_filter_fff_1_, 0, float_to_complex_, 0);
top_block->connect(fir_filter_fff_2_, 0, float_to_complex_, 1);
if (dump_)
{
top_block->connect(float_to_complex_, 0, file_sink_, 0);
}
}
else
{
LOG(ERROR) << " Unknown item type conversion";
@ -228,7 +256,6 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
{
top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0)
&& (output_item_type_.compare("cbyte") == 0))
@ -244,6 +271,18 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(char_x2_cbyte_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0)
&& (output_item_type_.compare("gr_complex") == 0))
{
top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
top_block->disconnect(fir_filter_fff_1_, 0, float_to_complex_, 0);
top_block->disconnect(fir_filter_fff_2_, 0, float_to_complex_, 1);
if (dump_)
{
top_block->disconnect(float_to_complex_, 0, file_sink_, 0);
}
}
else
{
LOG(ERROR) << " Unknown item type conversion";
@ -274,6 +313,11 @@ gr::basic_block_sptr FirFilter::get_left_block()
{
return cbyte_to_float_x2_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0)
&& (output_item_type_.compare("gr_complex") == 0))
{
return cshort_to_float_x2_;
}
else
{
return nullptr;
@ -305,6 +349,11 @@ gr::basic_block_sptr FirFilter::get_right_block()
{
return char_x2_cbyte_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0)
&& (output_item_type_.compare("gr_complex") == 0))
{
return float_to_complex_;
}
else
{
return nullptr;

View File

@ -19,11 +19,6 @@
set(INPUT_FILTER_GR_BLOCKS_SOURCES
beamformer.cc
complex_byte_to_float_x2.cc
byte_x2_to_complex_byte.cc
cshort_to_float_x2.cc
short_x2_to_cshort.cc
complex_float_to_complex_byte.cc
)
include_directories(
@ -32,14 +27,9 @@ include_directories(
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
file(GLOB INPUT_FILTER_GR_BLOCKS_HEADERS "*.h")
add_library(input_filter_gr_blocks ${INPUT_FILTER_GR_BLOCKS_SOURCES} ${INPUT_FILTER_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${INPUT_FILTER_GR_BLOCKS_HEADERS})
target_link_libraries(input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
if(NOT VOLK_GNSSSDR_FOUND)
add_dependencies(input_filter_gr_blocks volk_gnsssdr_module)
endif(NOT VOLK_GNSSSDR_FOUND)
target_link_libraries(input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES})

View File

@ -16,7 +16,7 @@
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
#
if(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES
galileo_e1_signal_processing.cc
gnss_sdr_valve.cc
@ -24,20 +24,20 @@ if(OPENCL_FOUND)
gps_sdr_signal_processing.cc
nco_lib.cc
pass_through.cc
galileo_e5_signal_processing.cc
complex_byte_to_float_x2.cc
byte_x2_to_complex_byte.cc
cshort_to_float_x2.cc
short_x2_to_cshort.cc
complex_float_to_complex_byte.cc
)
if(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
fft_execute.cc # Needs OpenCL
fft_setup.cc # Needs OpenCL
fft_kernelstring.cc # Needs OpenCL
galileo_e5_signal_processing.cc
)
else(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES
galileo_e1_signal_processing.cc
gnss_sdr_valve.cc
gnss_signal_processing.cc
gps_sdr_signal_processing.cc
nco_lib.cc
pass_through.cc
galileo_e5_signal_processing.cc
)
endif(OPENCL_FOUND)
@ -50,7 +50,9 @@ include_directories(
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
if(OPENCL_FOUND)
@ -67,9 +69,15 @@ add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${OPT_LIBRARIES}
gnss_rx
)
if(NOT VOLK_GNSSSDR_FOUND)
add_dependencies(gnss_sp_libs volk_gnsssdr_module)
endif(NOT VOLK_GNSSSDR_FOUND)

View File

@ -47,8 +47,18 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
out_streams_(out_streams)
{
std::string default_item_type = "gr_complex";
item_type_ = configuration->property(role + ".item_type", default_item_type);
std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
if(input_type.compare(output_type) != 0)
{
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
<< input_type
<< ", but item_size will supersede it.";
}
item_type_ = configuration->property(role + ".item_type", input_type);
vector_size_ = configuration->property(role + ".vector_size", 1);
if(item_type_.compare("float") == 0)
{
item_size_ = sizeof(float);
@ -61,6 +71,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
{
item_size_ = sizeof(int16_t);
}
else if(item_type_.compare("ishort") == 0)
{
item_size_ = sizeof(int16_t);
}
else if(item_type_.compare("cshort") == 0)
{
item_size_ = sizeof(lv_16sc_t);
@ -69,6 +83,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
{
item_size_ = sizeof(int8_t);
}
else if(item_type_.compare("ibyte") == 0)
{
item_size_ = sizeof(int8_t);
}
else if(item_type_.compare("cbyte") == 0)
{
item_size_ = sizeof(lv_8sc_t);
@ -91,6 +109,7 @@ Pass_Through::~Pass_Through()
void Pass_Through::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
DLOG(INFO) << "nothing to connect internally";
}
@ -98,6 +117,7 @@ void Pass_Through::connect(gr::top_block_sptr top_block)
void Pass_Through::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -72,6 +72,7 @@ GalileoE1Observables::~GalileoE1Observables()
void GalileoE1Observables::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -80,6 +81,7 @@ void GalileoE1Observables::connect(gr::top_block_sptr top_block)
void GalileoE1Observables::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -72,6 +72,7 @@ GpsL1CaObservables::~GpsL1CaObservables()
void GpsL1CaObservables::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -80,6 +81,7 @@ void GpsL1CaObservables::connect(gr::top_block_sptr top_block)
void GpsL1CaObservables::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -72,6 +72,7 @@ HybridObservables::~HybridObservables()
void HybridObservables::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -80,6 +81,7 @@ void HybridObservables::connect(gr::top_block_sptr top_block)
void HybridObservables::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -78,12 +78,14 @@ FileOutputFilter::~FileOutputFilter()
void FileOutputFilter::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
DLOG(INFO) << "nothing to connect internally";
}
void FileOutputFilter::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect internally
}

View File

@ -76,6 +76,7 @@ NullSinkOutputFilter::~NullSinkOutputFilter()
void NullSinkOutputFilter::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
DLOG(INFO) << "nothing to connect internally";
}
@ -83,6 +84,7 @@ void NullSinkOutputFilter::connect(gr::top_block_sptr top_block)
void NullSinkOutputFilter::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect
}

View File

@ -93,6 +93,7 @@ void GalileoE1BTelemetryDecoder::set_satellite(Gnss_Satellite satellite)
void GalileoE1BTelemetryDecoder::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -100,6 +101,7 @@ void GalileoE1BTelemetryDecoder::connect(gr::top_block_sptr top_block)
void GalileoE1BTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -99,6 +99,7 @@ void GalileoE5aTelemetryDecoder::set_satellite(Gnss_Satellite satellite)
void GalileoE5aTelemetryDecoder::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -106,6 +107,7 @@ void GalileoE5aTelemetryDecoder::connect(gr::top_block_sptr top_block)
void GalileoE5aTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -97,6 +97,7 @@ void GpsL1CaTelemetryDecoder::set_satellite(Gnss_Satellite satellite)
void GpsL1CaTelemetryDecoder::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -104,6 +105,7 @@ void GpsL1CaTelemetryDecoder::connect(gr::top_block_sptr top_block)
void GpsL1CaTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -92,6 +92,7 @@ void SbasL1TelemetryDecoder::set_satellite(Gnss_Satellite satellite)
void SbasL1TelemetryDecoder::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
@ -99,6 +100,7 @@ void SbasL1TelemetryDecoder::connect(gr::top_block_sptr top_block)
void SbasL1TelemetryDecoder::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}

View File

@ -138,11 +138,13 @@ void GalileoE1DllPllVemlTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
void GalileoE1DllPllVemlTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GalileoE1DllPllVemlTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -141,11 +141,13 @@ void GalileoE1TcpConnectorTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchr
void GalileoE1TcpConnectorTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GalileoE1TcpConnectorTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -144,11 +144,13 @@ void GalileoE5aDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
void GalileoE5aDllPllTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GalileoE5aDllPllTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -138,11 +138,13 @@ void GalileoVolkE1DllPllVemlTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_sync
void GalileoVolkE1DllPllVemlTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GalileoVolkE1DllPllVemlTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -138,11 +138,13 @@ void GpsL1CaDllFllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
void GpsL1CaDllFllPllTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GpsL1CaDllFllPllTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -134,11 +134,13 @@ void GpsL1CaDllPllOptimTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
void GpsL1CaDllPllOptimTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GpsL1CaDllPllOptimTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -134,11 +134,13 @@ void GpsL1CaDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
void GpsL1CaDllPllTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GpsL1CaDllPllTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -135,11 +135,13 @@ void GpsL1CaTcpConnectorTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
void GpsL1CaTcpConnectorTracking::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator
}
void GpsL1CaTcpConnectorTracking::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator
}

View File

@ -37,6 +37,7 @@
#ifndef GNSS_SDR_GNSS_BLOCK_INTERFACE_H_
#define GNSS_SDR_GNSS_BLOCK_INTERFACE_H_
#include <cassert>
#include <string>
#include <gnuradio/top_block.h>
@ -64,21 +65,15 @@ public:
virtual gr::basic_block_sptr get_left_block(int RF_channel)
{
if (RF_channel==0) // avoid unused param warning
{
assert(RF_channel >= 0);
if (RF_channel == 0){}; // avoid unused param warning
return NULL; // added to support raw array access (non pure virtual to allow left unimplemented)= 0;
}else{
return NULL; // added to support raw array access (non pure virtual to allow left unimplemented)= 0;
}
}
virtual gr::basic_block_sptr get_right_block(int RF_channel)
{
if (RF_channel==0) // avoid unused param warning
{
assert(RF_channel >= 0);
if (RF_channel == 0){}; // avoid unused param warning
return NULL; // added to support raw array access (non pure virtual to allow left unimplemented)= 0;
}else{
return NULL; // added to support raw array access (non pure virtual to allow left unimplemented)= 0;
}
}
};

View File

@ -124,7 +124,6 @@ private:
std::string config_file_;
std::shared_ptr<ConfigurationInterface> configuration_;
std::shared_ptr<GNSSBlockFactory> block_factory_;
//std::shared_ptr<std::vector<std::shared_ptr<GNSSBlockInterface>>> blocks_ = std::make_shared<std::vector<std::shared_ptr<GNSSBlockInterface>>>();
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_source_;
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_conditioner_;

View File

@ -58,21 +58,23 @@ Gps_Ephemeris::Gps_Ephemeris()
b_L2_P_data_flag = false;
i_SV_accuracy = 0;
i_SV_health = 0;
d_TGD = 0; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
d_IODC = 0; //!< Issue of Data, Clock
i_AODO = 0; //!< Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
d_IODE_SF2 = 0;
d_IODE_SF3 = 0;
d_TGD = 0; // Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
d_IODC = 0; // Issue of Data, Clock
i_AODO = 0; // Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
b_fit_interval_flag = false; //!< indicates the curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
b_fit_interval_flag = false; // indicates the curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
d_spare1 = 0;
d_spare2 = 0;
d_A_f0 = 0; //!< Coefficient 0 of code phase offset model [s]
d_A_f1 = 0; //!< Coefficient 1 of code phase offset model [s/s]
d_A_f2 = 0; //!< Coefficient 2 of code phase offset model [s/s^2]
d_A_f0 = 0; // Coefficient 0 of code phase offset model [s]
d_A_f1 = 0; // Coefficient 1 of code phase offset model [s/s]
d_A_f2 = 0; // Coefficient 2 of code phase offset model [s/s^2]
b_integrity_status_flag = false;
b_alert_flag = false; //!< If true, indicates that the SV URA may be worse than indicated in d_SV_accuracy, use that SV at our own risk.
b_antispoofing_flag = false; //!< If true, the AntiSpoofing mode is ON in that SV
b_alert_flag = false; // If true, indicates that the SV URA may be worse than indicated in d_SV_accuracy, use that SV at our own risk.
b_antispoofing_flag = false; // If true, the AntiSpoofing mode is ON in that SV
//Plane A (info from http://www.navcen.uscg.gov/?Do=constellationStatus)
satelliteBlock[9] = "IIA";

View File

@ -83,6 +83,8 @@ public:
int i_SV_health;
double d_TGD; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
double d_IODC; //!< Issue of Data, Clock
double d_IODE_SF2; //!< Issue of Data, Ephemeris (IODE), subframe 2
double d_IODE_SF3; //!< Issue of Data, Ephemeris(IODE), subframe 3
int i_AODO; //!< Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
bool b_fit_interval_flag;//!< indicates the curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
@ -133,9 +135,12 @@ public:
void serialize(Archive& archive, const unsigned int version)
{
using boost::serialization::make_nvp;
if(version){};
archive & make_nvp("i_satellite_PRN", i_satellite_PRN); // SV PRN NUMBER
archive & make_nvp("d_TOW", d_TOW); //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
archive & make_nvp("d_IODE_SF2", d_IODE_SF2);
archive & make_nvp("d_IODE_SF3", d_IODE_SF3);
archive & make_nvp("d_Crs", d_Crs); //!< Amplitude of the Sine Harmonic Correction Term to the Orbit Radius [m]
archive & make_nvp("d_Delta_n", d_Delta_n); //!< Mean Motion Difference From Computed Value [semi-circles/s]
archive & make_nvp("d_M_0", d_M_0); //!< Mean Anomaly at Reference Time [semi-circles]

View File

@ -66,7 +66,7 @@ public:
void serialize(Archive& archive, const unsigned int version)
{
using boost::serialization::make_nvp;
if(version){};
archive & make_nvp("d_alpha0",d_alpha0);
archive & make_nvp("d_alpha1",d_alpha1);
archive & make_nvp("d_alpha2",d_alpha2);

View File

@ -43,7 +43,6 @@ void Gps_Navigation_Message::reset()
d_TOW_SF3 = 0;
d_TOW_SF4 = 0;
d_TOW_SF5 = 0;
d_IODE_SF2 = 0;
d_IODE_SF3 = 0;
d_Crs = 0;
@ -762,6 +761,8 @@ Gps_Ephemeris Gps_Navigation_Message::get_ephemeris()
ephemeris.i_SV_health = i_SV_health;
ephemeris.d_TGD = d_TGD;
ephemeris.d_IODC = d_IODC;
ephemeris.d_IODE_SF2 = d_IODE_SF2;
ephemeris.d_IODE_SF3 = d_IODE_SF3;
ephemeris.i_AODO = i_AODO;
ephemeris.b_fit_interval_flag = b_fit_interval_flag;
ephemeris.d_spare1 = d_spare1;

View File

@ -61,7 +61,7 @@ public:
void serialize(Archive& archive, const unsigned int version)
{
using boost::serialization::make_nvp;
if(version){};
archive & make_nvp("valid", valid);
archive & make_nvp("lat", lat);
archive & make_nvp("lon", lon);

View File

@ -62,6 +62,7 @@ public:
void serialize(Archive& archive, const unsigned int version)
{
using boost::serialization::make_nvp;
if(version){};
archive & make_nvp("valid", valid);
archive & make_nvp("d_TOW", d_TOW);
archive & make_nvp("d_Week", d_Week);

View File

@ -68,7 +68,7 @@ public:
void serialize(Archive& archive, const unsigned int version)
{
using boost::serialization::make_nvp;
if(version){};
archive & make_nvp("valid",valid);
archive & make_nvp("d_A1",d_A1);
archive & make_nvp("d_A0",d_A0);

View File

@ -90,8 +90,6 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/conf DESTINATION share/gnss-sdr
FILES_MATCHING PATTERN "*.conf"
)
install(DIRECTORY DESTINATION share/gnss-sdr/data/)
install(FILES ${CMAKE_SOURCE_DIR}/conf/gnss-sdr.conf DESTINATION share/gnss-sdr/conf
RENAME default.conf)

View File

@ -28,8 +28,7 @@ if(NOT GTEST_DIR_LOCAL)
else()
set(GTEST_DIR_LOCAL true)
endif(NOT GTEST_DIR_LOCAL)
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h
PATHS /usr/include)
if(GTEST_INCLUDE_DIRS)
set(GTEST_DIR_LOCAL true)
endif(GTEST_INCLUDE_DIRS)
@ -86,10 +85,8 @@ if(NOT ${GTEST_DIR_LOCAL})
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${gtest_RELEASE}")
else(NOT ${GTEST_DIR_LOCAL})
if(GTEST_INCLUDE_DIRS)
find_path(GTEST_SOURCE_DIR NAMES gtest-all.cc PATHS /usr/src/gtest/src)
find_path(GTEST_SOURCE_INCLUDE NAMES src/gtest-all.cc PATHS /usr/src/gtest)
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS} ${GTEST_SOURCE_INCLUDE} ${GTEST_SOURCE_DIR})
add_library(gtest ${GTEST_SOURCE_DIR}/gtest-all.cc ${GTEST_SOURCE_DIR}/gtest_main.cc)
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS} ${LIBGTEST_DEV_DIR})
add_library(gtest ${LIBGTEST_DEV_DIR}/src/gtest-all.cc ${LIBGTEST_DEV_DIR}/src/gtest_main.cc)
set(GTEST_LIBRARIES gtest)
else(GTEST_INCLUDE_DIRS)
# If the variable GTEST_DIR is defined, we use the existing Googletest
@ -153,6 +150,7 @@ include_directories(
${VOLK_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
)

View File

@ -66,7 +66,7 @@ TEST(MagnitudeSquared_Test, StandardCComplexImplementation)
TEST(MagnitudeSquared_Test, C11ComplexImplementation)
{
const std::vector<std::complex<float>> input(FLAGS_size_magnitude_test);
std::vector<std::complex<float>> output(FLAGS_size_magnitude_test);
std::vector<float> output(FLAGS_size_magnitude_test);
struct timeval tv;
int pos = 0;
gettimeofday(&tv, NULL);

View File

@ -484,13 +484,15 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
}
acquisition->set_local_code();
//acquisition->set_state(1);
start_queue();
EXPECT_NO_THROW( {
top_block->run(); // Start threads and wait
}) << "Failure running the top_block." << std::endl;
stop_queue();
if (i == 0)
{
EXPECT_EQ(1, message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
@ -505,16 +507,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
}
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
ch_thread.join();
}
}
@ -583,13 +576,13 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProb
}
acquisition->set_local_code();
//acquisition->set_state(1);
start_queue();
EXPECT_NO_THROW( {
top_block->run(); // Start threads and wait
}) << "Failure running the top_block." << std::endl;
stop_queue();
if (i == 0)
{
std::cout << "Estimated probability of detection = " << Pd << std::endl;
@ -601,15 +594,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProb
std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
}
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
ch_thread.join();
}
}

View File

@ -77,7 +77,7 @@ protected:
gr::msg_queue::sptr queue;
gr::top_block_sptr top_block;
std::shared_ptr<AcquisitionInterface> acquisition;
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisition> acquisition;
std::shared_ptr<GNSSBlockFactory> factory;
std::shared_ptr<InMemoryConfiguration> config;
Gnss_Synchro gnss_synchro;
@ -365,7 +365,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, Instantiate)
{
config_1();
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
}
@ -380,7 +380,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
config_1();
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
ASSERT_NO_THROW( {
acquisition->connect(top_block);
@ -407,7 +407,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
top_block = gr::make_top_block("Acquisition test");
queue = gr::msg_queue::make(0);
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
ASSERT_NO_THROW( {
acquisition->set_channel(1);
@ -464,13 +464,13 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
}
acquisition->set_local_code();
acquisition->set_state(1);
start_queue();
EXPECT_NO_THROW( {
top_block->run(); // Start threads and wait
}) << "Failure running the top_block." << std::endl;
stop_queue();
if (i == 0)
{
EXPECT_EQ(1, message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
@ -483,16 +483,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
{
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
}
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
ch_thread.join();
}
}
@ -504,7 +495,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
top_block = gr::make_top_block("Acquisition test");
queue = gr::msg_queue::make(0);
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
ASSERT_NO_THROW( {
acquisition->set_channel(1);
@ -563,13 +554,15 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
}
acquisition->set_local_code();
acquisition->set_state(1);
start_queue();
EXPECT_NO_THROW( {
top_block->run(); // Start threads and wait
}) << "Failure running the top_block." << std::endl;
stop_queue();
if (i == 0)
{
std::cout << "Estimated probability of detection = " << Pd << std::endl;
@ -581,15 +574,6 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
}
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
ch_thread.join();
}
}

View File

@ -181,7 +181,6 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ConnectAndRun)
end = tv.tv_sec * 1000000 + tv.tv_usec;
}) << "Failure running the top_block." << std::endl;
std::cout << "Processed " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;
}
TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
@ -194,7 +193,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
init();
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisition> acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
ASSERT_NO_THROW( {
@ -238,6 +237,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
start_queue();
acquisition->init();
acquisition->reset();
acquisition->set_state(1);
}) << "Failure starting acquisition" << std::endl;
EXPECT_NO_THROW( {
@ -248,19 +248,12 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
end = tv.tv_sec * 1000000 + tv.tv_usec;
}) << "Failure running the top_block." << std::endl;
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
stop_queue();
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
std::cout << "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;
EXPECT_EQ(0, message) << "Acquisition failure. Expected message: 0=ACQ STOP.";
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 0=ACQ STOP.";
ch_thread.join();
}

Some files were not shown because too many files have changed in this diff Show More