1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-09 11:30:03 +00:00
This commit is contained in:
Carles Fernandez 2018-02-23 15:16:07 +01:00
commit 6702545677
77 changed files with 710 additions and 515 deletions

View File

@ -74,7 +74,11 @@ IF(GFlags_ROOT_DIR)
SET(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR}) SET(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR})
FIND_LIBRARY(GFlags_lib gflags ${GFlags_LIBRARY_DIRS}) FIND_LIBRARY(GFlags_lib gflags ${GFlags_LIBRARY_DIRS})
if(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
set(GFLAGS_GREATER_20 TRUE)
else(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
set(GFLAGS_GREATER_20 FALSE)
endif(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
# set up include and link directory # set up include and link directory
include_directories(${GFlags_INCLUDE_DIRS}) include_directories(${GFlags_INCLUDE_DIRS})
link_directories(${GFlags_LIBRARY_DIRS}) link_directories(${GFlags_LIBRARY_DIRS})

View File

@ -224,19 +224,15 @@ Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking
Tracking_5X.item_type=gr_complex Tracking_5X.item_type=gr_complex
;#sampling_frequency: Signal Intermediate Frequency in [Hz] ;#sampling_frequency: Signal Intermediate Frequency in [Hz]
Tracking_5X.if=0 Tracking_5X.if=0
;#pll_bw_hz_init: **Only for E5a** PLL loop filter bandwidth during initialization [Hz]
Tracking_5X.pll_bw_hz_init=20.0;
;#dll_bw_hz_init: **Only for E5a** DLL loop filter bandwidth during initialization [Hz]
Tracking_5X.dll_bw_hz_init=20.0;
;#dll_ti_ms: **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] ;#dll_ti_ms: **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms]
;Tracking_5X.ti_ms=3; ;Tracking_5X.ti_ms=3;
Tracking_5X.ti_ms=1; Tracking_5X.ti_ms=1;
;#pll_bw_hz: PLL loop filter bandwidth [Hz] ;#pll_bw_hz: PLL loop filter bandwidth during initialization [Hz]
;Tracking.pll_bw_hz=5.0;
Tracking_5X.pll_bw_hz=20.0; Tracking_5X.pll_bw_hz=20.0;
;#dll_bw_hz: DLL loop filter bandwidth [Hz] ;#dll_bw_hz: DLL loop filter bandwidth during initialization [Hz]
;Tracking.dll_bw_hz=2.0;
Tracking_5X.dll_bw_hz=20.0; Tracking_5X.dll_bw_hz=20.0;
Tracking_5X.pll_bw_narrow_hz=2.0;
Tracking_5X.dll_bw_narrow_hz=5.0;
;#order: PLL/DLL loop filter order [2] or [3] ;#order: PLL/DLL loop filter order [2] or [3]
Tracking_5X.order=2; Tracking_5X.order=2;
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] ;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]

View File

@ -118,11 +118,11 @@ Acquisition_5X.dump_filename=./acq_dump.dat
Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking
Tracking_5X.item_type=gr_complex Tracking_5X.item_type=gr_complex
Tracking_5X.if=0 Tracking_5X.if=0
Tracking_5X.pll_bw_hz_init=20.0; **Only for E5a** PLL loop filter bandwidth during initialization [Hz]
Tracking_5X.dll_bw_hz_init=20.0; **Only for E5a** DLL loop filter bandwidth during initialization [Hz]
Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms]
Tracking_5X.pll_bw_hz=20.0; Tracking_5X.pll_bw_hz=20.0;
Tracking_5X.dll_bw_hz=20.0; Tracking_5X.dll_bw_hz=20.0;
Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms]
Tracking_5X.pll_bw_narrow_hz=20.0;
Tracking_5X.dll_bw_narrow_hz=20.0;
Tracking_5X.order=2; Tracking_5X.order=2;
Tracking_5X.early_late_space_chips=0.5; Tracking_5X.early_late_space_chips=0.5;
Tracking_5X.dump=false Tracking_5X.dump=false

View File

@ -18,6 +18,20 @@
.TP .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 .TP
\fB\-doppler_max=\fR\fIdoppler\fR If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file),
.TP
\fB\-cn0_samples=\fR\fIsamples\fR Number of correlator outputs used for CN0 estimation.
.TP
\fB\-cn0_min=\fR\fIcn0_min\fR Minimum valid CN0 (in dB-Hz).
.TP
\fB\-max_lock_fail=\fR\fImax_lock_fail\fR Number number of lock failures before dropping satellite.
.TP
\fB\-carrier_lock_th=\fR\fIcarrier_lock_th\fR Carrier lock threshold (in rad).
.TP
\fB\-dll_bw_hz=\fR\fIdll_bw_hz\fR If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file).
.TP
\fB\-pll_bw_hz=\fR\fIpll_bw_hz\fR If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file).
.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 .TP
\fB\-version\fR Print program version and exit. \fB\-version\fR Print program version and exit.

View File

@ -36,24 +36,25 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver ${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
) )
file(GLOB PVT_LIB_HEADERS "*.h") file(GLOB PVT_LIB_HEADERS "*.h")
list(SORT PVT_LIB_HEADERS) list(SORT PVT_LIB_HEADERS)
add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS}) add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
source_group(Headers FILES ${PVT_LIB_HEADERS}) source_group(Headers FILES ${PVT_LIB_HEADERS})
add_dependencies(pvt_lib rtklib_lib armadillo-${armadillo_RELEASE} glog-${glog_RELEASE}) add_dependencies(pvt_lib rtklib_lib armadillo-${armadillo_RELEASE} glog-${glog_RELEASE})
target_link_libraries( target_link_libraries(
pvt_lib pvt_lib
rtklib_lib rtklib_lib
gnss_sdr_flags
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES} ${GLOG_LIBRARIES}
${ARMADILLO_LIBRARIES} ${ARMADILLO_LIBRARIES}
${BLAS} ${BLAS}

View File

@ -33,7 +33,6 @@
#include <exception> #include <exception>
#include <stdexcept> #include <stdexcept>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>

View File

@ -38,13 +38,10 @@
#include <termios.h> #include <termios.h>
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gflags/gflags.h>
using google::LogMessage; using google::LogMessage;
//DEFINE_string(NMEA_version, "2.1", "Specifies the NMEA version (2.1)");
Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::string nmea_dump_devname) Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::string nmea_dump_devname)
{ {
@ -72,8 +69,6 @@ Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::s
} }
Nmea_Printer::~Nmea_Printer() Nmea_Printer::~Nmea_Printer()
{ {
if (nmea_file_descriptor.is_open()) if (nmea_file_descriptor.is_open())
@ -84,8 +79,6 @@ Nmea_Printer::~Nmea_Printer()
} }
int Nmea_Printer::init_serial (std::string serial_device) int Nmea_Printer::init_serial (std::string serial_device)
{ {
/*! /*!
@ -123,7 +116,6 @@ int Nmea_Printer::init_serial (std::string serial_device)
} }
void Nmea_Printer::close_serial () void Nmea_Printer::close_serial ()
{ {
if (nmea_dev_descriptor != -1) if (nmea_dev_descriptor != -1)
@ -200,7 +192,6 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<Pvt_Solution>& pvt_data
} }
char Nmea_Printer::checkSum(std::string sentence) char Nmea_Printer::checkSum(std::string sentence)
{ {
char check = 0; char check = 0;
@ -214,7 +205,6 @@ char Nmea_Printer::checkSum(std::string sentence)
} }
std::string Nmea_Printer::latitude_to_hm(double lat) std::string Nmea_Printer::latitude_to_hm(double lat)
{ {
bool north; bool north;
@ -253,7 +243,6 @@ std::string Nmea_Printer::latitude_to_hm(double lat)
} }
std::string Nmea_Printer::longitude_to_hm(double longitude) std::string Nmea_Printer::longitude_to_hm(double longitude)
{ {
bool east; bool east;
@ -291,7 +280,6 @@ std::string Nmea_Printer::longitude_to_hm(double longitude)
} }
std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time) std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time)
{ {
//UTC Time: hhmmss.sss //UTC Time: hhmmss.sss
@ -336,7 +324,6 @@ std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_
} }
std::string Nmea_Printer::get_GPRMC() std::string Nmea_Printer::get_GPRMC()
{ {
// Sample -> $GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598,*10 // Sample -> $GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598,*10
@ -438,7 +425,6 @@ std::string Nmea_Printer::get_GPRMC()
} }
std::string Nmea_Printer::get_GPGSA() std::string Nmea_Printer::get_GPGSA()
{ {
//$GPGSA,A,3,07,02,26,27,09,04,15, , , , , ,1.8,1.0,1.5*33 //$GPGSA,A,3,07,02,26,27,09,04,15, , , , , ,1.8,1.0,1.5*33
@ -523,8 +509,6 @@ std::string Nmea_Printer::get_GPGSA()
} }
std::string Nmea_Printer::get_GPGSV() std::string Nmea_Printer::get_GPGSV()
{ {
// GSV-GNSS Satellites in View // GSV-GNSS Satellites in View
@ -613,9 +597,6 @@ std::string Nmea_Printer::get_GPGSV()
} }
std::string Nmea_Printer::get_GPGGA() std::string Nmea_Printer::get_GPGGA()
{ {
//boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time(); //boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time();
@ -727,3 +708,4 @@ std::string Nmea_Printer::get_GPGGA()
return sentence_str.str(); return sentence_str.str();
//$GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A //$GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A
} }

View File

@ -32,13 +32,11 @@
#include "pvt_solution.h" #include "pvt_solution.h"
#include <exception> #include <exception>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage; using google::LogMessage;
DEFINE_bool(tropo, true, "Apply tropospheric correction");
Pvt_Solution::Pvt_Solution() Pvt_Solution::Pvt_Solution()
{ {

View File

@ -42,14 +42,12 @@
#include <boost/date_time/gregorian/gregorian.hpp> #include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/local_time/local_time.hpp> #include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)");
Rinex_Printer::Rinex_Printer(int conf_version) Rinex_Printer::Rinex_Printer(int conf_version)
{ {

View File

@ -37,7 +37,6 @@
#include <fcntl.h> // for O_RDWR #include <fcntl.h> // for O_RDWR
#include <termios.h> // for tcgetattr #include <termios.h> // for tcgetattr
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage; using google::LogMessage;

View File

@ -63,5 +63,5 @@ file(GLOB ACQ_ADAPTER_HEADERS "*.h")
list(SORT ACQ_ADAPTER_HEADERS) list(SORT ACQ_ADAPTER_HEADERS)
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS}) add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
source_group(Headers FILES ${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}) target_link_libraries(acq_adapters gnss_sp_libs gnss_sdr_flags acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})

View File

@ -36,6 +36,7 @@
#include "galileo_e1_signal_processing.h" #include "galileo_e1_signal_processing.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -58,6 +59,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0) if (sampled_ms_ % 4 != 0)

View File

@ -36,6 +36,7 @@
#include "galileo_e1_signal_processing.h" #include "galileo_e1_signal_processing.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -58,6 +59,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
blocking_ = configuration_->property(role + ".blocking", true); blocking_ = configuration_->property(role + ".blocking", true);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0) if (sampled_ms_ % 4 != 0)

View File

@ -36,6 +36,7 @@
#include "galileo_e1_signal_processing.h" #include "galileo_e1_signal_processing.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -57,6 +58,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0) if (sampled_ms_ % 4 != 0)

View File

@ -36,6 +36,7 @@
#include "galileo_e1_signal_processing.h" #include "galileo_e1_signal_processing.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -58,6 +59,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 8); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 8);
/*--- Find number of samples per spreading code (4 ms) -----------------*/ /*--- Find number of samples per spreading code (4 ms) -----------------*/

View File

@ -36,6 +36,7 @@
#include "galileo_e1_signal_processing.h" #include "galileo_e1_signal_processing.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -58,6 +59,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0) if (sampled_ms_ % 4 != 0)

View File

@ -42,6 +42,7 @@
#include "galileo_e5_signal_processing.h" #include "galileo_e5_signal_processing.h"
#include "Galileo_E5a.h" #include "Galileo_E5a.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -63,6 +64,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
CAF_window_hz_ = configuration_->property(role + ".CAF_window_hz",0); CAF_window_hz_ = configuration_->property(role + ".CAF_window_hz",0);
Zero_padding = configuration_->property(role + ".Zero_padding",0); Zero_padding = configuration_->property(role + ".Zero_padding",0);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);

View File

@ -36,6 +36,7 @@
#include "galileo_e5_signal_processing.h" #include "galileo_e5_signal_processing.h"
#include "Galileo_E5a.h" #include "Galileo_E5a.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -58,6 +59,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
if(acq_iq_) { acq_pilot_ = false; } if(acq_iq_) { acq_pilot_ = false; }
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
max_dwells_ = configuration_->property(role + ".max_dwells", 1); max_dwells_ = configuration_->property(role + ".max_dwells", 1);
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);

View File

@ -37,6 +37,7 @@
#include "glonass_l1_signal_processing.h" #include "glonass_l1_signal_processing.h"
#include "GLONASS_L1_CA.h" #include "GLONASS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -60,6 +61,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
blocking_ = configuration_->property(role + ".blocking", true); blocking_ = configuration_->property(role + ".blocking", true);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);

View File

@ -39,6 +39,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -61,6 +62,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
blocking_ = configuration_->property(role + ".blocking", true); blocking_ = configuration_->property(role + ".blocking", true);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);

View File

@ -37,6 +37,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -57,7 +58,8 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
doppler_min_ = configuration->property(role + ".doppler_min", -5000); if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
doppler_min_ = configuration->property(role + ".doppler_min", - doppler_max_);
sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1);
max_dwells_= configuration->property(role + ".max_dwells", 1); max_dwells_= configuration->property(role + ".max_dwells", 1);

View File

@ -37,6 +37,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -71,6 +72,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
ifreq = configuration_->property(role + ".if", 0); ifreq = configuration_->property(role + ".if", 0);
dump = configuration_->property(role + ".dump", false); dump = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1);
// note : the FPGA is implemented according to bit transition flag = 0. Setting bit transition flag to 1 has no effect. // note : the FPGA is implemented according to bit transition flag = 0. Setting bit transition flag to 1 has no effect.

View File

@ -37,6 +37,8 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -56,7 +58,8 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
if_ = configuration->property(role + ".if", 0); if_ = configuration->property(role + ".if", 0);
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
doppler_min_ = configuration->property(role + ".doppler_min", -5000); if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
doppler_min_ = configuration->property(role + ".doppler_min", -doppler_max_);
sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1);
max_dwells_= configuration->property(role + ".max_dwells", 1); max_dwells_= configuration->property(role + ".max_dwells", 1);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);

View File

@ -35,6 +35,8 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -57,6 +59,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
bit_transition_flag_ = configuration_->property("Acquisition.bit_transition_flag", false); bit_transition_flag_ = configuration_->property("Acquisition.bit_transition_flag", false);

View File

@ -36,7 +36,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -58,6 +58,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------

View File

@ -35,6 +35,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -57,6 +58,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
if_ = configuration_->property(role + ".if", 0); if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
tong_init_val_ = configuration->property(role + ".tong_init_val", 1); tong_init_val_ = configuration->property(role + ".tong_init_val", 1);

View File

@ -37,6 +37,7 @@
#include "gps_l2c_signal.h" #include "gps_l2c_signal.h"
#include "GPS_L2C.h" #include "GPS_L2C.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -61,6 +62,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
blocking_ = configuration_->property(role + ".blocking", true); blocking_ = configuration_->property(role + ".blocking", true);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions

View File

@ -37,6 +37,7 @@
#include "gps_l5_signal.h" #include "gps_l5_signal.h"
#include "GPS_L5.h" #include "GPS_L5.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -60,6 +61,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
blocking_ = configuration_->property(role + ".blocking", true); blocking_ = configuration_->property(role + ".blocking", true);
doppler_max_ = configuration->property(role + ".doppler_max", 5000); doppler_max_ = configuration->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max;
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions

View File

@ -39,7 +39,6 @@ set(GNSS_SPLIBS_SOURCES
conjugate_ic.cc conjugate_ic.cc
) )
if(OPENCL_FOUND) if(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES} set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
fft_execute.cc # Needs OpenCL fft_execute.cc # Needs OpenCL
@ -71,7 +70,10 @@ if(OPENCL_FOUND)
endif(OS_IS_MACOSX) endif(OS_IS_MACOSX)
endif(OPENCL_FOUND) endif(OPENCL_FOUND)
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
file(GLOB GNSS_SPLIBS_HEADERS "*.h") file(GLOB GNSS_SPLIBS_HEADERS "*.h")
list(REMOVE_ITEM GNSS_SPLIBS_HEADERS gnss_sdr_flags.h)
list(SORT GNSS_SPLIBS_HEADERS) list(SORT GNSS_SPLIBS_HEADERS)
add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS}) add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
source_group(Headers FILES ${GNSS_SPLIBS_HEADERS}) source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
@ -79,6 +81,7 @@ source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES} target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_LIBRARIES} ${ORC_LIBRARIES} ${VOLK_LIBRARIES} ${ORC_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
${GFlags_LIBS}
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES} ${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
@ -89,3 +92,11 @@ target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES}
if(NOT VOLK_GNSSSDR_FOUND) if(NOT VOLK_GNSSSDR_FOUND)
add_dependencies(gnss_sp_libs volk_gnsssdr_module) add_dependencies(gnss_sp_libs volk_gnsssdr_module)
endif(NOT VOLK_GNSSSDR_FOUND) endif(NOT VOLK_GNSSSDR_FOUND)
if(${GFLAGS_GREATER_20})
add_definitions(-DGFLAGS_GREATER_2_0=1)
endif(${GFLAGS_GREATER_20})
add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
source_group(Headers FILES gnss_sdr_flags.h)
target_link_libraries(gnss_sdr_flags ${GFlags_LIBS})

View File

@ -0,0 +1,130 @@
/*!
* \file gnss_sdr_flags.cc
* \brief Helper file for gnss-sdr commandline flags
* \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.es
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#include <gnss_sdr_flags.h>
#include <cstdint>
#include <iostream>
DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)");
DEFINE_string(s, "-",
"If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)");
DEFINE_string(signal_source, "-",
"If defined, path to the file containing the signal samples (overrides the configuration file)");
DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)");
DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation");
DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)");
DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite");
DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)");
DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)");
DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)");
DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)");
#if GFLAGS_GREATER_2_0
static bool ValidateDopplerMax(const char* flagname, int32_t value)
{
if (value >= 0 && value < 1000000) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidateCn0Samples(const char* flagname, int32_t value)
{
if (value > 0 && value < 10000) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidateCn0Min(const char* flagname, int32_t value)
{
if (value > 0 && value < 100) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidateMaxLockFail(const char* flagname, int32_t value)
{
if (value > 0 && value < 10000) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidateCarrierLockTh(const char* flagname, double value)
{
if (value > 0.0 && value < 1.508) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidateDllBw(const char* flagname, double value)
{
if (value >= 0.0 && value < 10000.0) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidatePllBw(const char* flagname, double value)
{
if (value >= 0.0 && value < 10000.0) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
DEFINE_validator(doppler_max, &ValidateDopplerMax);
DEFINE_validator(cn0_samples, &ValidateCn0Samples);
DEFINE_validator(cn0_min, &ValidateCn0Min);
DEFINE_validator(max_lock_fail, &ValidateMaxLockFail);
DEFINE_validator(carrier_lock_th, &ValidateCarrierLockTh);
DEFINE_validator(dll_bw_hz, &ValidateDllBw);
DEFINE_validator(pll_bw_hz, &ValidatePllBw);
#endif

View File

@ -0,0 +1,61 @@
/*!
* \file gnss_sdr_flags.h
* \brief Helper file for gnss-sdr commandline flags
* \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.es
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_FLAGS_H_
#define GNSS_SDR_FLAGS_H_
#include <gflags/gflags.h>
DECLARE_string(c); //<! Path to the configuration file
DECLARE_string(config_file); //<! Path to the configuration file
DECLARE_string(log_dir); //<! Path to the folder in which logging will be stored
// Declare flags for signal sources
DECLARE_string(s); //<! Path to the file containing the signal samples
DECLARE_string(signal_source); //<! Path to the file containing the signal samples
// Declare flags for acquisition blocks
DECLARE_int32(doppler_max); //<!If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)
// Declare flags for tracking blocks
DECLARE_int32(cn0_samples); //<! Number of correlator outputs used for CN0 estimation
DECLARE_int32(cn0_min); //<! Minimum valid CN0 (in dB-Hz)
DECLARE_int32(max_lock_fail); //<! Number number of lock failures before dropping satellite
DECLARE_double(carrier_lock_th); //<! Carrier lock threshold (in rad)
DECLARE_double(dll_bw_hz); //<! Bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)
DECLARE_double(pll_bw_hz); //<! Bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)
// Declare flags for PVT
DECLARE_string(RINEX_version); //<! RINEX version
#endif

View File

@ -35,18 +35,16 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <exception> #include <exception>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "gnss_sdr_valve.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include "gnss_sdr_valve.h"
using google::LogMessage; using google::LogMessage;
DEFINE_string(signal_source, "-",
"If defined, path to the file containing the signal samples (overrides the configuration file)");
FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams, std::string role, unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) : boost::shared_ptr<gr::msg_queue> queue) :
@ -64,6 +62,7 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
// override value with commandline flag, if present // override value with commandline flag, if present
if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source; if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type); item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false); repeat_ = configuration->property(role + ".repeat", false);

View File

@ -31,7 +31,6 @@
#include "gn3s_signal_source.h" #include "gn3s_signal_source.h"
#include <gnuradio/blocks/file_sink.h> #include <gnuradio/blocks/file_sink.h>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <gn3s/gn3s_source_cc.h> #include <gn3s/gn3s_source_cc.h>
#include "configuration_interface.h" #include "configuration_interface.h"

View File

@ -35,17 +35,14 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "gnss_sdr_valve.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include "gnss_sdr_valve.h"
using google::LogMessage; using google::LogMessage;
DEFINE_string(nsr_signal_source, "-",
"If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration, NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams, std::string role, unsigned int in_streams, unsigned int out_streams,
@ -61,7 +58,8 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
filename_ = configuration->property(role + ".filename", default_filename); filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present // override value with commandline flag, if present
if (FLAGS_nsr_signal_source.compare("-") != 0) filename_= FLAGS_nsr_signal_source; if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type); item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false); repeat_ = configuration->property(role + ".repeat", false);

View File

@ -34,17 +34,14 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "gnss_sdr_valve.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include "gnss_sdr_valve.h"
using google::LogMessage; using google::LogMessage;
DEFINE_string(spir_signal_source, "-",
"If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration, SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams, std::string role, unsigned int in_streams, unsigned int out_streams,
@ -60,7 +57,8 @@ SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration
filename_ = configuration->property(role + ".filename", default_filename); filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present // override value with commandline flag, if present
if (FLAGS_spir_signal_source.compare("-") != 0) filename_= FLAGS_spir_signal_source; if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type); item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false); repeat_ = configuration->property(role + ".repeat", false);

View File

@ -34,8 +34,8 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "gnss_sdr_flags.h"
#include "gnss_sdr_valve.h" #include "gnss_sdr_valve.h"
#include "configuration_interface.h" #include "configuration_interface.h"
@ -57,7 +57,8 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con
filename_ = configuration->property(role + ".filename", default_filename); filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present // override value with commandline flag, if present
//if (FLAGS_nsr_signal_source.compare("-") != 0) filename_= FLAGS_nsr_signal_source; if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type); item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false); repeat_ = configuration->property(role + ".repeat", false);

View File

@ -35,11 +35,12 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/blocks/char_to_float.h>
#include "gnss_sdr_flags.h"
#include "gnss_sdr_valve.h" #include "gnss_sdr_valve.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include <gnuradio/blocks/char_to_float.h>
using google::LogMessage; using google::LogMessage;
@ -61,7 +62,8 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
filename_ = configuration->property(role + ".filename", default_filename); filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present // override value with commandline flag, if present
//if (FLAGS_nsr_signal_source.compare("-") != 0) filename_= FLAGS_nsr_signal_source; if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type); item_type_ = configuration->property(role + ".item_type", default_item_type);
big_endian_items_ = configuration->property(role + ".big_endian_items", true); big_endian_items_ = configuration->property(role + ".big_endian_items", true);

View File

@ -58,4 +58,4 @@ file(GLOB TRACKING_ADAPTER_HEADERS "*.h")
list(SORT TRACKING_ADAPTER_HEADERS) list(SORT TRACKING_ADAPTER_HEADERS)
add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES} ${TRACKING_ADAPTER_HEADERS}) add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES} ${TRACKING_ADAPTER_HEADERS})
source_group(Headers FILES ${TRACKING_ADAPTER_HEADERS}) source_group(Headers FILES ${TRACKING_ADAPTER_HEADERS})
target_link_libraries(tracking_adapters tracking_gr_blocks gnss_sp_libs) target_link_libraries(tracking_adapters tracking_gr_blocks gnss_sp_libs gnss_sdr_flags)

View File

@ -38,6 +38,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -71,7 +72,9 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 0.5); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 0.5);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 2.0); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 2.0);
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 0.25); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 0.25);
int extend_correlation_symbols; int extend_correlation_symbols;

View File

@ -39,6 +39,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -68,7 +69,9 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15);
very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6); very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6);
port_ch0 = configuration->property(role + ".port_ch0", 2060); port_ch0 = configuration->property(role + ".port_ch0", 2060);

View File

@ -40,6 +40,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "Galileo_E5a.h" #include "Galileo_E5a.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -60,8 +61,8 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
float pll_bw_hz; float pll_bw_hz;
float dll_bw_hz; float dll_bw_hz;
float pll_bw_init_hz; float pll_bw_narrow_hz;
float dll_bw_init_hz; float dll_bw_narrow_hz;
int ti_ms; int ti_ms;
float early_late_space_chips; float early_late_space_chips;
item_type = configuration->property(role + ".item_type", default_item_type); item_type = configuration->property(role + ".item_type", default_item_type);
@ -70,10 +71,12 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 20.0);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
pll_bw_init_hz = configuration->property(role + ".pll_bw_init_hz", 20.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 20.0);
dll_bw_init_hz = configuration->property(role + ".dll_bw_init_hz", 20.0); if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 5.0);
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
ti_ms = configuration->property(role + ".ti_ms", 3); ti_ms = configuration->property(role + ".ti_ms", 3);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
@ -94,8 +97,8 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
dump_filename, dump_filename,
pll_bw_hz, pll_bw_hz,
dll_bw_hz, dll_bw_hz,
pll_bw_init_hz, pll_bw_narrow_hz,
dll_bw_init_hz, dll_bw_narrow_hz,
ti_ms, ti_ms,
early_late_space_chips); early_late_space_chips);
} }

View File

@ -41,6 +41,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GLONASS_L1_CA.h" #include "GLONASS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -70,7 +71,9 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
int extend_correlation_ms; int extend_correlation_ms;

View File

@ -40,6 +40,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GLONASS_L1_CA.h" #include "GLONASS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -67,7 +68,9 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused!

View File

@ -40,6 +40,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -69,7 +70,9 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
int extend_correlation_ms; int extend_correlation_ms;

View File

@ -40,6 +40,8 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -70,7 +72,9 @@ GpsL1CaDllPllCAidTrackingFpga::GpsL1CaDllPllCAidTrackingFpga(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
int extend_correlation_ms; int extend_correlation_ms;

View File

@ -40,6 +40,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -67,7 +68,9 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused!

View File

@ -39,6 +39,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -67,7 +68,9 @@ GpsL1CaDllPllTrackingGPU::GpsL1CaDllPllTrackingGPU(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", dump_filename = configuration->property(role + ".dump_filename",

View File

@ -39,6 +39,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L2C.h" #include "GPS_L2C.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -66,7 +67,9 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", dump_filename = configuration->property(role + ".dump_filename",

View File

@ -39,6 +39,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L5.h" #include "GPS_L5.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -66,7 +67,9 @@ GpsL5iDllPllTracking::GpsL5iDllPllTracking(
f_if = configuration->property(role + ".if", 0); f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", dump_filename = configuration->property(role + ".dump_filename",

View File

@ -67,7 +67,7 @@ list(SORT TRACKING_GR_BLOCKS_HEADERS)
add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES} ${TRACKING_GR_BLOCKS_HEADERS}) add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES} ${TRACKING_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS}) source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS})
target_link_libraries(tracking_gr_blocks tracking_lib ${GNURADIO_RUNTIME_LIBRARIES} gnss_sp_libs ${Boost_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${MATIO_LIBRARIES} ${OPT_TRACKING_LIBRARIES}) target_link_libraries(tracking_gr_blocks tracking_lib ${GNURADIO_RUNTIME_LIBRARIES} gnss_sdr_flags gnss_sp_libs ${Boost_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${MATIO_LIBRARIES} ${OPT_TRACKING_LIBRARIES})
if(NOT VOLK_GNSSSDR_FOUND) if(NOT VOLK_GNSSSDR_FOUND)
if(MATIO_FOUND) if(MATIO_FOUND)

View File

@ -49,6 +49,7 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -223,11 +224,11 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[GALILEO_E1_CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = GALILEO_E1_CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["E"] = std::string("Galileo"); systemName["E"] = std::string("Galileo");
@ -452,7 +453,7 @@ bool galileo_e1_dll_pll_veml_tracking_cc::acquire_secondary()
bool galileo_e1_dll_pll_veml_tracking_cc::cn0_and_tracking_lock_status() bool galileo_e1_dll_pll_veml_tracking_cc::cn0_and_tracking_lock_status()
{ {
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < GALILEO_E1_CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_P_accu; d_Prompt_buffer[d_cn0_estimation_counter] = d_P_accu;
@ -463,11 +464,11 @@ bool galileo_e1_dll_pll_veml_tracking_cc::cn0_and_tracking_lock_status()
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GALILEO_E1_CN0_ESTIMATION_SAMPLES, d_fs_in, Galileo_E1_B_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, Galileo_E1_B_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GALILEO_E1_CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GALILEO_E1_MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -475,7 +476,7 @@ bool galileo_e1_dll_pll_veml_tracking_cc::cn0_and_tracking_lock_status()
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > GALILEO_E1_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -52,16 +52,10 @@
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
#include "tcp_communication.h" #include "tcp_communication.h"
#include "tcp_packet_data.h" #include "tcp_packet_data.h"
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 20
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
@ -177,11 +171,11 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["E"] = std::string("Galileo"); systemName["E"] = std::string("Galileo");
d_acquisition_gnss_synchro = 0; d_acquisition_gnss_synchro = 0;
@ -378,7 +372,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
//d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample //d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt; d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt;
@ -389,13 +383,13 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, Galileo_E1_B_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, Galileo_E1_B_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -403,7 +397,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -49,6 +49,7 @@
#include "Galileo_E5a.h" #include "Galileo_E5a.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -62,13 +63,13 @@ galileo_e5a_dll_pll_make_tracking_cc(
std::string dump_filename, std::string dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_init_hz, float pll_bw_narrow_hz,
float dll_bw_init_hz, float dll_bw_narrow_hz,
int ti_ms, int ti_ms,
float early_late_space_chips) float early_late_space_chips)
{ {
return galileo_e5a_dll_pll_tracking_cc_sptr(new Galileo_E5a_Dll_Pll_Tracking_cc(if_freq, return galileo_e5a_dll_pll_tracking_cc_sptr(new Galileo_E5a_Dll_Pll_Tracking_cc(if_freq,
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_init_hz, dll_bw_init_hz, ti_ms, early_late_space_chips)); fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, ti_ms, early_late_space_chips));
} }
@ -90,8 +91,8 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
std::string dump_filename, std::string dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_init_hz, float pll_bw_narrow_hz,
float dll_bw_init_hz, float dll_bw_narrow_hz,
int ti_ms, int ti_ms,
float early_late_space_chips) : float early_late_space_chips) :
gr::block("Galileo_E5a_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::block("Galileo_E5a_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),
@ -113,12 +114,12 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
d_ti_ms = ti_ms; d_ti_ms = ti_ms;
d_dll_bw_hz = dll_bw_hz; d_dll_bw_hz = dll_bw_hz;
d_pll_bw_hz = pll_bw_hz; d_pll_bw_hz = pll_bw_hz;
d_dll_bw_init_hz = dll_bw_init_hz; d_dll_bw_narrow_hz = dll_bw_narrow_hz;
d_pll_bw_init_hz = pll_bw_init_hz; d_pll_bw_narrow_hz = pll_bw_narrow_hz;
// Initialize tracking ========================================== // Initialize tracking ==========================================
d_code_loop_filter.set_DLL_BW(d_dll_bw_init_hz); d_code_loop_filter.set_DLL_BW(d_dll_bw_hz);
d_carrier_loop_filter.set_PLL_BW(d_pll_bw_init_hz); d_carrier_loop_filter.set_PLL_BW(d_pll_bw_hz);
//--- DLL variables -------------------------------------------------------- //--- DLL variables --------------------------------------------------------
d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips)
@ -150,7 +151,7 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
multicorrelator_cpu_Q.init(2 * d_vector_length, d_n_correlator_taps); multicorrelator_cpu_Q.init(2 * d_vector_length, d_n_correlator_taps);
// correlator I single output for data (scalar) // correlator I single output for data (scalar)
d_Single_Prompt_data=static_cast<gr_complex*>(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_Single_Prompt_data = static_cast<gr_complex*>(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment()));
*d_Single_Prompt_data = gr_complex(0,0); *d_Single_Prompt_data = gr_complex(0,0);
multicorrelator_cpu_I.init(2 * d_vector_length, 1); // single correlator for data channel multicorrelator_cpu_I.init(2 * d_vector_length, 1); // single correlator for data channel
@ -176,11 +177,11 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[GALILEO_E5A_CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[static_cast<unsigned int>(FLAGS_cn0_samples)];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = GALILEO_E5A_CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
d_acquisition_gnss_synchro = 0; d_acquisition_gnss_synchro = 0;
d_channel = 0; d_channel = 0;
@ -213,7 +214,7 @@ Galileo_E5a_Dll_Pll_Tracking_cc::~Galileo_E5a_Dll_Pll_Tracking_cc()
} }
catch(const std::exception & ex) catch(const std::exception & ex)
{ {
LOG(WARNING)<<"Exception in destructor "<<ex.what(); LOG(WARNING) << "Exception in destructor " << ex.what();
} }
} }
@ -265,7 +266,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::start_tracking()
//doppler effect //doppler effect
// Fd=(C/(C+Vr))*F // Fd=(C/(C+Vr))*F
double radial_velocity; double radial_velocity;
radial_velocity = (Galileo_E5a_FREQ_HZ + d_acq_carrier_doppler_hz)/Galileo_E5a_FREQ_HZ; radial_velocity = (Galileo_E5a_FREQ_HZ + d_acq_carrier_doppler_hz) / Galileo_E5a_FREQ_HZ;
// new chip and prn sequence periods based on acq Doppler // new chip and prn sequence periods based on acq Doppler
double T_chip_mod_seconds; double T_chip_mod_seconds;
double T_prn_mod_seconds; double T_prn_mod_seconds;
@ -347,8 +348,8 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary()
} }
} }
// 2. Transform buffer to 1 and -1 // 2. Transform buffer to 1 and -1
int in_corr[GALILEO_E5A_CN0_ESTIMATION_SAMPLES]; int in_corr[static_cast<unsigned int>(FLAGS_cn0_samples)];
for (unsigned int i = 0; i < GALILEO_E5A_CN0_ESTIMATION_SAMPLES; i++) for (unsigned int i = 0; i < static_cast<unsigned int>(FLAGS_cn0_samples); i++)
{ {
if (d_Prompt_buffer[i].real() >0) if (d_Prompt_buffer[i].real() >0)
{ {
@ -365,7 +366,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary()
for (unsigned int i = 0; i < Galileo_E5a_Q_SECONDARY_CODE_LENGTH; i++) for (unsigned int i = 0; i < Galileo_E5a_Q_SECONDARY_CODE_LENGTH; i++)
{ {
out_corr = 0; out_corr = 0;
for (unsigned int j = 0; j < GALILEO_E5A_CN0_ESTIMATION_SAMPLES; j++) for (unsigned int j = 0; j < static_cast<unsigned int>(FLAGS_cn0_samples); j++)
{ {
//reverse replica sign since i*i=-1 (conjugated complex) //reverse replica sign since i*i=-1 (conjugated complex)
out_corr += in_corr[j] * -sec_code_signed[(j + i) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH]; out_corr += in_corr[j] * -sec_code_signed[(j + i) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH];
@ -376,10 +377,10 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary()
d_secondary_delay = i; d_secondary_delay = i;
} }
} }
if (current_best_ == GALILEO_E5A_CN0_ESTIMATION_SAMPLES) // all bits correlate if (current_best_ == FLAGS_cn0_samples) // all bits correlate
{ {
d_secondary_lock = true; d_secondary_lock = true;
d_secondary_delay = (d_secondary_delay + GALILEO_E5A_CN0_ESTIMATION_SAMPLES - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; d_secondary_delay = (d_secondary_delay + static_cast<unsigned int>(FLAGS_cn0_samples) - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH;
} }
} }
@ -560,7 +561,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < GALILEO_E5A_CN0_ESTIMATION_SAMPLES-1) if (d_cn0_estimation_counter < FLAGS_cn0_samples - 1)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_Prompt; d_Prompt_buffer[d_cn0_estimation_counter] = d_Prompt;
@ -580,14 +581,14 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
// Change loop parameters ========================================== // Change loop parameters ==========================================
d_code_loop_filter.set_pdi(d_current_ti_ms * GALILEO_E5a_CODE_PERIOD); d_code_loop_filter.set_pdi(d_current_ti_ms * GALILEO_E5a_CODE_PERIOD);
d_carrier_loop_filter.set_pdi(d_current_ti_ms * GALILEO_E5a_CODE_PERIOD); d_carrier_loop_filter.set_pdi(d_current_ti_ms * GALILEO_E5a_CODE_PERIOD);
d_code_loop_filter.set_DLL_BW(d_dll_bw_hz); d_code_loop_filter.set_DLL_BW(d_dll_bw_narrow_hz);
d_carrier_loop_filter.set_PLL_BW(d_pll_bw_hz); d_carrier_loop_filter.set_PLL_BW(d_pll_bw_narrow_hz);
} }
else else
{ {
//std::cout << "Secondary code delay couldn't be resolved." << std::endl; //std::cout << "Secondary code delay couldn't be resolved." << std::endl;
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
if (d_carrier_lock_fail_counter > GALILEO_E5A_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
@ -600,11 +601,11 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
else // Secondary lock achieved, monitor carrier lock. else // Secondary lock achieved, monitor carrier lock.
{ {
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GALILEO_E5A_CN0_ESTIMATION_SAMPLES, d_fs_in,d_current_ti_ms * Galileo_E5a_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, static_cast<unsigned int>(FLAGS_cn0_samples), d_fs_in,d_current_ti_ms * Galileo_E5a_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GALILEO_E5A_CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, static_cast<unsigned int>(FLAGS_cn0_samples));
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GALILEO_E5A_MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -612,7 +613,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
if (d_carrier_lock_fail_counter > GALILEO_E5A_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -59,8 +59,8 @@ galileo_e5a_dll_pll_make_tracking_cc(long if_freq,
std::string dump_filename, std::string dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_init_hz, float pll_bw_narrow_narrowhz,
float dll_bw_init_hz, float dll_bw_narrow_hz,
int ti_ms, int ti_ms,
float early_late_space_chips); float early_late_space_chips);
@ -92,8 +92,8 @@ private:
std::string dump_filename, std::string dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_init_hz, float pll_bw_narrow_hz,
float dll_bw_init_hz, float dll_bw_narrow_hz,
int ti_ms, int ti_ms,
float early_late_space_chips); float early_late_space_chips);
@ -104,8 +104,8 @@ private:
std::string dump_filename, std::string dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_init_hz, float pll_bw_narrow_hz,
float dll_bw_init_hz, float dll_bw_narrow_hz,
int ti_ms, int ti_ms,
float early_late_space_chips); float early_late_space_chips);
void acquire_secondary(); void acquire_secondary();
@ -124,8 +124,8 @@ private:
double d_early_late_spc_chips; double d_early_late_spc_chips;
double d_dll_bw_hz; double d_dll_bw_hz;
double d_pll_bw_hz; double d_pll_bw_hz;
double d_dll_bw_init_hz; double d_dll_bw_narrow_hz;
double d_pll_bw_init_hz; double d_pll_bw_narrow_hz;
gr_complex* d_codeQ; gr_complex* d_codeQ;
gr_complex* d_codeI; gr_complex* d_codeI;

View File

@ -52,18 +52,10 @@
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GLONASS_L1_CA.h" #include "GLONASS_L1_CA.h"
#include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 10
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
@ -185,11 +177,11 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["R"] = std::string("Glonass"); systemName["R"] = std::string("Glonass");
@ -759,7 +751,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; // prompt d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; // prompt
@ -769,11 +761,11 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -781,7 +773,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -53,18 +53,10 @@
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GLONASS_L1_CA.h" #include "GLONASS_L1_CA.h"
#include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 10
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
@ -187,11 +179,11 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["R"] = std::string("Glonass"); systemName["R"] = std::string("Glonass");
@ -752,7 +744,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()), static_cast<float>(d_correlator_outs_16sc[1].imag()) ); // prompt d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()), static_cast<float>(d_correlator_outs_16sc[1].imag()) ); // prompt
@ -762,11 +754,11 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -774,7 +766,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -50,15 +50,10 @@
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GLONASS_L1_CA.h" #include "GLONASS_L1_CA.h"
#include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#define CN0_ESTIMATION_SAMPLES 10
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
glonass_l1_ca_dll_pll_tracking_cc_sptr glonass_l1_ca_dll_pll_tracking_cc_sptr
@ -82,9 +77,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::forecast (int noutput_items,
gr_vector_int &ninput_items_required) gr_vector_int &ninput_items_required)
{ {
if (noutput_items != 0) if (noutput_items != 0)
{ {
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
} }
} }
@ -129,9 +124,9 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
d_n_correlator_taps = 3; // Early, Prompt, and Late d_n_correlator_taps = 3; // Early, Prompt, and Late
d_correlator_outs = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_correlator_outs = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_gnsssdr_get_alignment()));
for (int n = 0; n < d_n_correlator_taps; n++) for (int n = 0; n < d_n_correlator_taps; n++)
{ {
d_correlator_outs[n] = gr_complex(0,0); d_correlator_outs[n] = gr_complex(0,0);
} }
d_local_code_shift_chips = static_cast<float*>(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(float), volk_gnsssdr_get_alignment())); d_local_code_shift_chips = static_cast<float*>(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(float), volk_gnsssdr_get_alignment()));
// Set TAPs delay values [chips] // Set TAPs delay values [chips]
d_local_code_shift_chips[0] = - d_early_late_spc_chips; d_local_code_shift_chips[0] = - d_early_late_spc_chips;
@ -158,11 +153,11 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["R"] = std::string("Glonass"); systemName["R"] = std::string("Glonass");
@ -222,9 +217,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
double corrected_acq_phase_samples, delay_correction_samples; double corrected_acq_phase_samples, delay_correction_samples;
corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<double>(d_fs_in)), T_prn_true_samples); corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<double>(d_fs_in)), T_prn_true_samples);
if (corrected_acq_phase_samples < 0) if (corrected_acq_phase_samples < 0)
{ {
corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples; corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples;
} }
delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples; delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples;
d_acq_code_phase_samples = corrected_acq_phase_samples; d_acq_code_phase_samples = corrected_acq_phase_samples;
@ -243,9 +238,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
multicorrelator_cpu.set_local_code_and_taps(static_cast<int>(GLONASS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips); multicorrelator_cpu.set_local_code_and_taps(static_cast<int>(GLONASS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
for (int n = 0; n < d_n_correlator_taps; n++) for (int n = 0; n < d_n_correlator_taps; n++)
{ {
d_correlator_outs[n] = gr_complex(0,0); d_correlator_outs[n] = gr_complex(0,0);
} }
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_rem_code_phase_samples = 0; d_rem_code_phase_samples = 0;
@ -536,205 +531,205 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribu
Gnss_Synchro current_synchro_data = Gnss_Synchro(); Gnss_Synchro current_synchro_data = Gnss_Synchro();
if (d_enable_tracking == true) if (d_enable_tracking == true)
{
// Fill the acquisition data
current_synchro_data = *d_acquisition_gnss_synchro;
// Receiver signal alignment
if (d_pull_in == true)
{ {
int samples_offset; // Fill the acquisition data
double acq_trk_shif_correction_samples; current_synchro_data = *d_acquisition_gnss_synchro;
int acq_to_trk_delay_samples; // Receiver signal alignment
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp; if (d_pull_in == true)
acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples)); {
samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples); int samples_offset;
current_synchro_data.Tracking_sample_counter = d_sample_counter + samples_offset; double acq_trk_shif_correction_samples;
d_sample_counter = d_sample_counter + samples_offset; // count for the processed samples int acq_to_trk_delay_samples;
d_pull_in = false; acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
// take into account the carrier cycles accumulated in the pull in signal alignment acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * samples_offset; samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
current_synchro_data.Tracking_sample_counter = d_sample_counter + samples_offset;
d_sample_counter = d_sample_counter + samples_offset; // count for the processed samples
d_pull_in = false;
// take into account the carrier cycles accumulated in the pull in signal alignment
d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * samples_offset;
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
current_synchro_data.correlation_length_ms = 1;
*out[0] = current_synchro_data;
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
// ################# CARRIER WIPEOFF AND CORRELATORS ##############################
// perform carrier wipe-off and compute Early, Prompt and Late correlation
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, in);
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad,
d_carrier_phase_step_rad,
d_rem_code_phase_chips,
d_code_phase_step_chips,
d_current_prn_length_samples);
// ################## PLL ##########################################################
// PLL discriminator
// Update PLL discriminator [rads/Ti -> Secs/Ti]
carr_error_hz = pll_cloop_two_quadrant_atan(d_correlator_outs[1]) / GLONASS_TWO_PI; // prompt output
// Carrier discriminator filter
carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz);
// New carrier Doppler frequency estimation
d_carrier_frequency_hz += carr_error_filt_hz;
d_carrier_doppler_hz += carr_error_filt_hz;
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
// ################## DLL ##########################################################
// DLL discriminator
code_error_chips = dll_nc_e_minus_l_normalized(d_correlator_outs[0], d_correlator_outs[2]); // [chips/Ti] //early and late
// Code discriminator filter
code_error_filt_chips = d_code_loop_filter.get_code_nco(code_error_chips); // [chips/second]
double T_chip_seconds = 1.0 / static_cast<double>(d_code_freq_chips);
double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips*T_chip_seconds); //[seconds]
//double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds]
// ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT #######################
// keep alignment parameters for the next input buffer
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
//double T_chip_seconds = 1.0 / static_cast<double>(d_code_freq_chips);
//double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
double T_prn_samples = T_prn_seconds * static_cast<double>(d_fs_in);
double K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast<double>(d_fs_in);
d_current_prn_length_samples = round(K_blk_samples); // round to a discrete number of samples
//################### PLL COMMANDS #################################################
// carrier phase step (NCO phase increment per sample) [rads/sample]
d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * d_carrier_doppler_hz / static_cast<double>(d_fs_in);
d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast<double>(d_fs_in);
// remnant carrier phase to prevent overflow in the code NCO
d_rem_carr_phase_rad = d_rem_carr_phase_rad + d_carrier_phase_step_rad * d_current_prn_length_samples;
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GLONASS_TWO_PI);
// carrier phase accumulator
d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * d_current_prn_length_samples;
//################### DLL COMMANDS #################################################
// code phase step (Code resampler phase increment per sample) [chips/sample]
d_code_phase_step_chips = d_code_freq_chips / static_cast<double>(d_fs_in);
// remnant code phase [chips]
d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; // rounding error < 1 sample
d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{
// fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt
d_cn0_estimation_counter++;
}
else
{
d_cn0_estimation_counter = 0;
// Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{
d_carrier_lock_fail_counter++;
}
else
{
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
}
}
// ########### Output the tracking data to navigation and PVT ##########
current_synchro_data.Prompt_I = static_cast<double>((d_correlator_outs[1]).real());
current_synchro_data.Prompt_Q = static_cast<double>((d_correlator_outs[1]).imag());
current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples;
current_synchro_data.Code_phase_samples = d_rem_code_phase_samples;
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in; current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_symbol_output = true;
current_synchro_data.correlation_length_ms = 1; current_synchro_data.correlation_length_ms = 1;
*out[0] = current_synchro_data;
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
} }
// ################# CARRIER WIPEOFF AND CORRELATORS ##############################
// perform carrier wipe-off and compute Early, Prompt and Late correlation
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, in);
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad,
d_carrier_phase_step_rad,
d_rem_code_phase_chips,
d_code_phase_step_chips,
d_current_prn_length_samples);
// ################## PLL ##########################################################
// PLL discriminator
// Update PLL discriminator [rads/Ti -> Secs/Ti]
carr_error_hz = pll_cloop_two_quadrant_atan(d_correlator_outs[1]) / GLONASS_TWO_PI; // prompt output
// Carrier discriminator filter
carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz);
// New carrier Doppler frequency estimation
d_carrier_frequency_hz += carr_error_filt_hz;
d_carrier_doppler_hz += carr_error_filt_hz;
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
// ################## DLL ##########################################################
// DLL discriminator
code_error_chips = dll_nc_e_minus_l_normalized(d_correlator_outs[0], d_correlator_outs[2]); // [chips/Ti] //early and late
// Code discriminator filter
code_error_filt_chips = d_code_loop_filter.get_code_nco(code_error_chips); // [chips/second]
double T_chip_seconds = 1.0 / static_cast<double>(d_code_freq_chips);
double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips*T_chip_seconds); //[seconds]
//double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds]
// ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT #######################
// keep alignment parameters for the next input buffer
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
//double T_chip_seconds = 1.0 / static_cast<double>(d_code_freq_chips);
//double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
double T_prn_samples = T_prn_seconds * static_cast<double>(d_fs_in);
double K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast<double>(d_fs_in);
d_current_prn_length_samples = round(K_blk_samples); // round to a discrete number of samples
//################### PLL COMMANDS #################################################
// carrier phase step (NCO phase increment per sample) [rads/sample]
d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * d_carrier_doppler_hz / static_cast<double>(d_fs_in);
d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast<double>(d_fs_in);
// remnant carrier phase to prevent overflow in the code NCO
d_rem_carr_phase_rad = d_rem_carr_phase_rad + d_carrier_phase_step_rad * d_current_prn_length_samples;
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GLONASS_TWO_PI);
// carrier phase accumulator
d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * d_current_prn_length_samples;
//################### DLL COMMANDS #################################################
// code phase step (Code resampler phase increment per sample) [chips/sample]
d_code_phase_step_chips = d_code_freq_chips / static_cast<double>(d_fs_in);
// remnant code phase [chips]
d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; // rounding error < 1 sample
d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES)
{
// fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt
d_cn0_estimation_counter++;
}
else
{
d_cn0_estimation_counter = 0;
// Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES);
// Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0)
{
d_carrier_lock_fail_counter++;
}
else
{
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
}
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
}
}
// ########### Output the tracking data to navigation and PVT ##########
current_synchro_data.Prompt_I = static_cast<double>((d_correlator_outs[1]).real());
current_synchro_data.Prompt_Q = static_cast<double>((d_correlator_outs[1]).imag());
current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples;
current_synchro_data.Code_phase_samples = d_rem_code_phase_samples;
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_symbol_output = true;
current_synchro_data.correlation_length_ms = 1;
}
else else
{
for (int n = 0; n < d_n_correlator_taps; n++)
{ {
d_correlator_outs[n] = gr_complex(0,0); for (int n = 0; n < d_n_correlator_taps; n++)
} {
d_correlator_outs[n] = gr_complex(0,0);
}
current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples;
current_synchro_data.System = {'R'}; current_synchro_data.System = {'R'};
current_synchro_data.correlation_length_ms = 1; current_synchro_data.correlation_length_ms = 1;
} }
//assign the GNURadio block output data //assign the GNURadio block output data
current_synchro_data.fs = d_fs_in; current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data; *out[0] = current_synchro_data;
if(d_dump) if(d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file
float prompt_I;
float prompt_Q;
float tmp_E, tmp_P, tmp_L;
double tmp_double;
unsigned long int tmp_long;
prompt_I = d_correlator_outs[1].real();
prompt_Q = d_correlator_outs[1].imag();
tmp_E = std::abs<float>(d_correlator_outs[0]);
tmp_P = std::abs<float>(d_correlator_outs[1]);
tmp_L = std::abs<float>(d_correlator_outs[2]);
try
{ {
// EPR // MULTIPLEXED FILE RECORDING - Record results to file
d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float)); float prompt_I;
d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float)); float prompt_Q;
d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float)); float tmp_E, tmp_P, tmp_L;
// PROMPT I and Q (to analyze navigation symbols) double tmp_double;
d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float)); unsigned long int tmp_long;
d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float)); prompt_I = d_correlator_outs[1].real();
// PRN start sample stamp prompt_Q = d_correlator_outs[1].imag();
tmp_long = d_sample_counter + d_current_prn_length_samples; tmp_E = std::abs<float>(d_correlator_outs[0]);
d_dump_file.write(reinterpret_cast<char*>(&tmp_long), sizeof(unsigned long int)); tmp_P = std::abs<float>(d_correlator_outs[1]);
// accumulated carrier phase tmp_L = std::abs<float>(d_correlator_outs[2]);
d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double)); try
{
// EPR
d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
// PROMPT I and Q (to analyze navigation symbols)
d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
// PRN start sample stamp
tmp_long = d_sample_counter + d_current_prn_length_samples;
d_dump_file.write(reinterpret_cast<char*>(&tmp_long), sizeof(unsigned long int));
// accumulated carrier phase
d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
// carrier and code frequency // carrier and code frequency
d_dump_file.write(reinterpret_cast<char*>(&d_carrier_frequency_hz), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&d_carrier_frequency_hz), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
// PLL commands // PLL commands
d_dump_file.write(reinterpret_cast<char*>(&carr_error_hz), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&carr_error_hz), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&carr_error_filt_hz), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&carr_error_filt_hz), sizeof(double));
// DLL commands // DLL commands
d_dump_file.write(reinterpret_cast<char*>(&code_error_chips), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&code_error_chips), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
// CN0 and carrier lock test // CN0 and carrier lock test
d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
// AUX vars (for debug purposes) // AUX vars (for debug purposes)
tmp_double = d_rem_code_phase_samples; tmp_double = d_rem_code_phase_samples;
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
tmp_double = static_cast<double>(d_sample_counter); tmp_double = static_cast<double>(d_sample_counter);
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
// PRN // PRN
unsigned int prn_ = d_acquisition_gnss_synchro->PRN; unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int)); d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
}
catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception writing trk dump file " << e.what();
}
} }
catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception writing trk dump file " << e.what();
}
}
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
d_sample_counter += d_current_prn_length_samples; // count for the processed samples d_sample_counter += d_current_prn_length_samples; // count for the processed samples
@ -749,23 +744,23 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::set_channel(unsigned int channel)
LOG(INFO) << "Tracking Channel set to " << d_channel; LOG(INFO) << "Tracking Channel set to " << d_channel;
// ############# ENABLE DATA FILE LOG ################# // ############# ENABLE DATA FILE LOG #################
if (d_dump == true) if (d_dump == true)
{
if (d_dump_file.is_open() == false)
{ {
try if (d_dump_file.is_open() == false)
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); try
d_dump_filename.append(".dat"); {
d_dump_file.exceptions (std::ifstream::failbit | std::ifstream::badbit); d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_filename.append(".dat");
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str(); d_dump_file.exceptions (std::ifstream::failbit | std::ifstream::badbit);
} d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
catch (const std::ifstream::failure &e) LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
{ }
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what(); catch (const std::ifstream::failure &e)
} {
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
}
}
} }
}
} }

View File

@ -43,6 +43,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "gnss_sdr_flags.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "control_message_factory.h" #include "control_message_factory.h"
@ -168,11 +169,11 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[GPS_L1_CA_CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = GPS_L1_CA_CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["S"] = std::string("SBAS"); systemName["S"] = std::string("SBAS");
@ -731,7 +732,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
if (d_cn0_estimation_counter < GPS_L1_CA_CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; // prompt d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; // prompt
@ -741,11 +742,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L1_CA_MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -753,7 +754,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -46,15 +46,9 @@
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 20
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
@ -168,11 +162,11 @@ gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["S"] = std::string("SBAS"); systemName["S"] = std::string("SBAS");
@ -553,7 +547,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work(
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()), d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()),
@ -564,11 +558,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work(
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -579,7 +573,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work(
d_carrier_lock_fail_counter--; d_carrier_lock_fail_counter--;
} }
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -45,18 +45,10 @@
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 20
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr
@ -179,11 +171,11 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["S"] = std::string("SBAS"); systemName["S"] = std::string("SBAS");
@ -744,7 +736,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()), static_cast<float>(d_correlator_outs_16sc[1].imag()) ); // prompt d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()), static_cast<float>(d_correlator_outs_16sc[1].imag()) ); // prompt
@ -754,11 +746,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -766,7 +758,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -47,6 +47,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include "tracking_discriminators.h" #include "tracking_discriminators.h"
#include "lock_detectors.h" #include "lock_detectors.h"
#include "gnss_sdr_flags.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "control_message_factory.h" #include "control_message_factory.h"
@ -150,11 +151,11 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[GPS_L1_CA_CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = GPS_L1_CA_CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["S"] = std::string("SBAS"); systemName["S"] = std::string("SBAS");
@ -609,7 +610,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < GPS_L1_CA_CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt
@ -619,11 +620,11 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L1_CA_MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -631,7 +632,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -41,19 +41,11 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
// includes // includes
#include <cuda_profiler_api.h> #include <cuda_profiler_api.h>
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 20
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
@ -155,11 +147,11 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["S"] = std::string("SBAS"); systemName["S"] = std::string("SBAS");
@ -413,7 +405,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt
@ -423,11 +415,11 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -435,7 +427,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -49,16 +49,10 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
#include "tcp_communication.h" #include "tcp_communication.h"
#include "tcp_packet_data.h" #include "tcp_packet_data.h"
/*!
* \todo Include in definition header file
*/
#define CN0_ESTIMATION_SAMPLES 20
#define MINIMUM_VALID_CN0 25
#define MAXIMUM_LOCK_FAIL_COUNTER 50
#define CARRIER_LOCK_THRESHOLD 0.85
using google::LogMessage; using google::LogMessage;
@ -165,11 +159,11 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["R"] = std::string("GLONASS"); systemName["R"] = std::string("GLONASS");
@ -419,7 +413,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
* \todo Improve the lock detection algorithm! * \todo Improve the lock detection algorithm!
*/ */
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt; d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt;
@ -428,11 +422,11 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
else else
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// ###### TRACKING UNLOCK NOTIFICATION ##### // ###### TRACKING UNLOCK NOTIFICATION #####
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -440,7 +434,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -49,6 +49,7 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GPS_L2C.h" #include "GPS_L2C.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -150,11 +151,11 @@ gps_l2_m_dll_pll_tracking_cc::gps_l2_m_dll_pll_tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[GPS_L2M_CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = GPS_L2M_CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
@ -603,7 +604,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < GPS_L2M_CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1];
@ -613,11 +614,11 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L2M_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L2_M_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L2_M_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L2M_CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L2M_MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -625,7 +626,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > GPS_L2M_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -49,6 +49,7 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "GPS_L5.h" #include "GPS_L5.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_flags.h"
using google::LogMessage; using google::LogMessage;
@ -150,11 +151,11 @@ gps_l5i_dll_pll_tracking_cc::gps_l5i_dll_pll_tracking_cc(
// CN0 estimation and lock detector buffers // CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[GPS_L5_CN0_ESTIMATION_SAMPLES]; d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples];
d_carrier_lock_test = 1; d_carrier_lock_test = 1;
d_CN0_SNV_dB_Hz = 0; d_CN0_SNV_dB_Hz = 0;
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_carrier_lock_threshold = GPS_L5_CARRIER_LOCK_THRESHOLD; d_carrier_lock_threshold = FLAGS_carrier_lock_th;
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
@ -603,7 +604,7 @@ int gps_l5i_dll_pll_tracking_cc::general_work (int noutput_items __attribute__((
d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in)); d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast<double>(d_fs_in));
// ####### CN0 ESTIMATION AND LOCK DETECTORS ###### // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < GPS_L5_CN0_ESTIMATION_SAMPLES) if (d_cn0_estimation_counter < FLAGS_cn0_samples)
{ {
// fill buffer with prompt correlator output values // fill buffer with prompt correlator output values
d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1];
@ -613,11 +614,11 @@ int gps_l5i_dll_pll_tracking_cc::general_work (int noutput_items __attribute__((
{ {
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L5_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L5i_CODE_LENGTH_CHIPS); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L5i_CODE_LENGTH_CHIPS);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L5_CN0_ESTIMATION_SAMPLES); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
// Loss of lock detection // Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L5_MINIMUM_VALID_CN0) if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{ {
d_carrier_lock_fail_counter++; d_carrier_lock_fail_counter++;
} }
@ -625,7 +626,7 @@ int gps_l5i_dll_pll_tracking_cc::general_work (int noutput_items __attribute__((
{ {
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
} }
if (d_carrier_lock_fail_counter > GPS_L5_MAXIMUM_LOCK_FAIL_COUNTER) if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{ {
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; LOG(INFO) << "Loss of lock in channel " << d_channel << "!";

View File

@ -57,6 +57,7 @@
#include "concurrent_queue.h" #include "concurrent_queue.h"
#include "concurrent_map.h" #include "concurrent_map.h"
#include "gnss_flowgraph.h" #include "gnss_flowgraph.h"
#include "gnss_sdr_flags.h"
#include "file_configuration.h" #include "file_configuration.h"
#include "control_message_factory.h" #include "control_message_factory.h"
@ -66,11 +67,18 @@ extern concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
using google::LogMessage; using google::LogMessage;
DEFINE_string(config_file, std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf"), DEFINE_string(config_file, std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf"),
"File containing the configuration parameters"); "Path to the configuration file");
ControlThread::ControlThread() ControlThread::ControlThread()
{ {
if(!FLAGS_c.compare("-"))
{
configuration_ = std::make_shared<FileConfiguration>(FLAGS_config_file); configuration_ = std::make_shared<FileConfiguration>(FLAGS_config_file);
}
else
{
configuration_ = std::make_shared<FileConfiguration>(FLAGS_c);
}
delete_configuration_ = false; delete_configuration_ = false;
init(); init();
} }

View File

@ -37,11 +37,6 @@
#include "MATH_CONSTANTS.h" #include "MATH_CONSTANTS.h"
#include "gnss_frequencies.h" #include "gnss_frequencies.h"
#define GPS_L1_CA_CN0_ESTIMATION_SAMPLES 20
#define GPS_L1_CA_MINIMUM_VALID_CN0 25
#define GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER 50
#define GPS_L1_CA_CARRIER_LOCK_THRESHOLD 0.85
// Physical constants // Physical constants
const double GPS_C_m_s = SPEED_OF_LIGHT; //!< The speed of light, [m/s] const double GPS_C_m_s = SPEED_OF_LIGHT; //!< The speed of light, [m/s]
const double GPS_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] const double GPS_C_m_ms = 299792.4580; //!< The speed of light, [m/ms]

View File

@ -40,10 +40,7 @@
#include "GPS_CNAV.h" #include "GPS_CNAV.h"
#define GPS_L2M_CN0_ESTIMATION_SAMPLES 10
#define GPS_L2M_MINIMUM_VALID_CN0 25
#define GPS_L2M_MAXIMUM_LOCK_FAIL_COUNTER 50
#define GPS_L2M_CARRIER_LOCK_THRESHOLD 0.75
// Physical constants // Physical constants

View File

@ -37,23 +37,19 @@
#include "gnss_frequencies.h" #include "gnss_frequencies.h"
#include "GPS_CNAV.h" #include "GPS_CNAV.h"
#define GPS_L5_CN0_ESTIMATION_SAMPLES 10
#define GPS_L5_MINIMUM_VALID_CN0 25
#define GPS_L5_MAXIMUM_LOCK_FAIL_COUNTER 50
#define GPS_L5_CARRIER_LOCK_THRESHOLD 0.75
// Physical constants // Physical constants
const double GPS_L5_C_m_s = 299792458.0; //!< The speed of light, [m/s] const double GPS_L5_C_m_s = 299792458.0; //!< The speed of light, [m/s]
const double GPS_L5_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] const double GPS_L5_C_m_ms = 299792.4580; //!< The speed of light, [m/ms]
const double GPS_L5_PI = 3.1415926535898; //!< Pi as defined in IS-GPS-200E const double GPS_L5_PI = 3.1415926535898; //!< Pi as defined in IS-GPS-200E
const double GPS_L5_TWO_PI = 6.283185307179586; //!< 2Pi as defined in IS-GPS-200E const double GPS_L5_TWO_PI = 6.283185307179586; //!< 2Pi as defined in IS-GPS-200E
const double GPS_L5_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Earth rotation rate, [rad/s] const double GPS_L5_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Earth rotation rate, [rad/s]
const double GPS_L5_GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2] const double GPS_L5_GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2]
const double GPS_L5_F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)] const double GPS_L5_F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)]
// carrier and code frequencies // carrier and code frequencies
const double GPS_L5_FREQ_HZ = FREQ5; //!< L5 [Hz] const double GPS_L5_FREQ_HZ = FREQ5; //!< L5 [Hz]
const double GPS_L5i_CODE_RATE_HZ = 10.23e6; //!< GPS L5i code rate [chips/s] const double GPS_L5i_CODE_RATE_HZ = 10.23e6; //!< GPS L5i code rate [chips/s]
const int GPS_L5i_CODE_LENGTH_CHIPS = 10230; //!< GPS L5i code length [chips] const int GPS_L5i_CODE_LENGTH_CHIPS = 10230; //!< GPS L5i code length [chips]

View File

@ -39,10 +39,6 @@
#include "MATH_CONSTANTS.h" #include "MATH_CONSTANTS.h"
#include "gnss_frequencies.h" #include "gnss_frequencies.h"
#define GALILEO_E1_CN0_ESTIMATION_SAMPLES 20
#define GALILEO_E1_MINIMUM_VALID_CN0 25
#define GALILEO_E1_MAXIMUM_LOCK_FAIL_COUNTER 50
#define GALILEO_E1_CARRIER_LOCK_THRESHOLD 0.85
// Physical constants // Physical constants
const double GALILEO_PI = 3.1415926535898; //!< Pi as defined in GALILEO ICD const double GALILEO_PI = 3.1415926535898; //!< Pi as defined in GALILEO ICD

View File

@ -37,11 +37,6 @@
#include "MATH_CONSTANTS.h" #include "MATH_CONSTANTS.h"
#include "gnss_frequencies.h" #include "gnss_frequencies.h"
#define GALILEO_E5A_CN0_ESTIMATION_SAMPLES 20
#define GALILEO_E5A_MINIMUM_VALID_CN0 25
#define GALILEO_E5A_MAXIMUM_LOCK_FAIL_COUNTER 50
#define GALILEO_E5A_CARRIER_LOCK_THRESHOLD 0.85
// Carrier and code frequencies // Carrier and code frequencies
const double Galileo_E5a_FREQ_HZ = FREQ5; //!< Galileo E5a carrier frequency [Hz] const double Galileo_E5a_FREQ_HZ = FREQ5; //!< Galileo E5a carrier frequency [Hz]

View File

@ -3630,9 +3630,9 @@ int Rtcm::set_DF008(short int smoothing_interval)
int Rtcm::set_DF009(const Gnss_Synchro & gnss_synchro) int Rtcm::set_DF009(const Gnss_Synchro & gnss_synchro)
{ {
unsigned int prn_ = gnss_synchro.PRN; unsigned int prn_ = gnss_synchro.PRN;
if(prn_ > 31) if(prn_ > 32)
{ {
LOG(WARNING) << "GPS satellite ID must be between 0 and 31, but PRN " << prn_ << " was found"; LOG(WARNING) << "GPS satellite ID must be between 1 and 32, but PRN " << prn_ << " was found";
} }
DF009 = std::bitset<6>(prn_); DF009 = std::bitset<6>(prn_);
return 0; return 0;
@ -3642,9 +3642,9 @@ int Rtcm::set_DF009(const Gnss_Synchro & gnss_synchro)
int Rtcm::set_DF009(const Gps_Ephemeris & gps_eph) int Rtcm::set_DF009(const Gps_Ephemeris & gps_eph)
{ {
unsigned int prn_ = gps_eph.i_satellite_PRN; unsigned int prn_ = gps_eph.i_satellite_PRN;
if(prn_ > 31) if(prn_ > 32)
{ {
LOG(WARNING) << "GPS satellite ID must be between 0 and 31, but PRN " << prn_ << " was found"; LOG(WARNING) << "GPS satellite ID must be between 1 and 32, but PRN " << prn_ << " was found";
} }
DF009 = std::bitset<6>(prn_); DF009 = std::bitset<6>(prn_);
return 0; return 0;

View File

@ -57,6 +57,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/core/libs/supl ${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS}
@ -95,6 +96,7 @@ target_link_libraries(gnss-sdr ${MAC_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS} ${GNSS_SDR_OPTIONAL_LIBS}
gnss_sp_libs gnss_sp_libs
gnss_sdr_flags
gnss_rx gnss_rx
) )

View File

@ -8,7 +8,7 @@
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -30,6 +30,7 @@
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_VERSION #ifndef GNSS_SDR_VERSION
#define GNSS_SDR_VERSION "0.0.9" #define GNSS_SDR_VERSION "0.0.9"
#endif #endif
@ -44,11 +45,11 @@
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>
#include <boost/exception_ptr.hpp> #include <boost/exception_ptr.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "control_thread.h" #include "control_thread.h"
#include "concurrent_queue.h" #include "concurrent_queue.h"
#include "concurrent_map.h" #include "concurrent_map.h"
#include "gnss_sdr_flags.h"
#if CUDA_GPU_ACCEL #if CUDA_GPU_ACCEL
// For the CUDA runtime routines (prefixed with "cuda_") // For the CUDA runtime routines (prefixed with "cuda_")
@ -58,7 +59,6 @@
using google::LogMessage; using google::LogMessage;
DECLARE_string(log_dir);
/* /*
* Concurrent queues that communicates the Telemetry Decoder * Concurrent queues that communicates the Telemetry Decoder
@ -74,7 +74,7 @@ int main(int argc, char** argv)
const std::string intro_help( const std::string intro_help(
std::string("\nGNSS-SDR is an Open Source GNSS Software Defined Receiver\n") std::string("\nGNSS-SDR is an Open Source GNSS Software Defined Receiver\n")
+ +
"Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)\n" "Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)\n"
+ +
"This program comes with ABSOLUTELY NO WARRANTY;\n" "This program comes with ABSOLUTELY NO WARRANTY;\n"
+ +

View File

@ -92,10 +92,10 @@ void GalileoE5aTrackingTest::init()
config->set_property("Tracking_5X.dump_filename", "../data/e5a_tracking_ch_"); config->set_property("Tracking_5X.dump_filename", "../data/e5a_tracking_ch_");
config->set_property("Tracking_5X.early_late_space_chips", "0.5"); config->set_property("Tracking_5X.early_late_space_chips", "0.5");
config->set_property("Tracking_5X.order", "2"); config->set_property("Tracking_5X.order", "2");
config->set_property("Tracking_5X.pll_bw_hz_init","20.0"); config->set_property("Tracking_5X.pll_bw_hz","20.0");
config->set_property("Tracking_5X.pll_bw_hz", "5"); config->set_property("Tracking_5X.dll_bw_hz", "5.0");
config->set_property("Tracking_5X.dll_bw_hz_init","2.0"); config->set_property("Tracking_5X.pll_bw_narrow_hz","2.0");
config->set_property("Tracking_5X.dll_bw_hz", "2"); config->set_property("Tracking_5X.pll_bw_narrow_hz", "2.0");
config->set_property("Tracking_5X.ti_ms", "1"); config->set_property("Tracking_5X.ti_ms", "1");
} }

View File

@ -31,7 +31,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/core/libs/supl ${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${GLOG_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
@ -62,7 +61,6 @@ target_link_libraries(front_end_cal_lib ${MAC_LIBRARIES}
rx_core_lib rx_core_lib
gnss_rx gnss_rx
channel_fsm channel_fsm
gnss_sp_libs
) )
add_dependencies(front_end_cal_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE}) add_dependencies(front_end_cal_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE})
@ -90,7 +88,6 @@ target_link_libraries(front-end-cal ${MAC_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS} ${GNSS_SDR_OPTIONAL_LIBS}
rx_core_lib rx_core_lib
gnss_rx gnss_rx
gnss_sp_libs
front_end_cal_lib front_end_cal_lib
) )

View File

@ -34,7 +34,6 @@
#include <memory> #include <memory>
#include <exception> #include <exception>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>