mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-24 20:17:39 +00:00
bds_b3i: merging new changes, fixing small bugs
This commit is contained in:
@@ -18,4 +18,4 @@
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
||||
add_subdirectory(libs)
|
||||
add_subdirectory(libs)
|
||||
|
||||
@@ -26,67 +26,63 @@ if(ENABLE_CUDA)
|
||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||
gps_l1_ca_dll_pll_tracking_gpu.h
|
||||
)
|
||||
set(OPT_TRACKING_INCLUDE_DIRS
|
||||
${OPT_TRACKING_INCLUDE_DIRS}
|
||||
${CUDA_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
set(OPT_TRACKING_ADAPTERS_SOURCES
|
||||
${OPT_TRACKING_ADAPTERS_SOURCES}
|
||||
gps_l1_ca_dll_pll_tracking_fpga.cc
|
||||
gps_l2_m_dll_pll_tracking_fpga.cc
|
||||
galileo_e1_dll_pll_veml_tracking_fpga.cc
|
||||
galileo_e5a_dll_pll_tracking_fpga.cc
|
||||
gps_l1_ca_dll_pll_tracking_fpga.cc
|
||||
gps_l2_m_dll_pll_tracking_fpga.cc
|
||||
galileo_e1_dll_pll_veml_tracking_fpga.cc
|
||||
galileo_e5a_dll_pll_tracking_fpga.cc
|
||||
gps_l5_dll_pll_tracking_fpga.cc
|
||||
)
|
||||
set(OPT_TRACKING_ADAPTERS_HEADERS
|
||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||
gps_l1_ca_dll_pll_tracking_fpga.h
|
||||
gps_l2_m_dll_pll_tracking_fpga.h
|
||||
galileo_e1_dll_pll_veml_tracking_fpga.h
|
||||
galileo_e5a_dll_pll_tracking_fpga.h
|
||||
gps_l1_ca_dll_pll_tracking_fpga.h
|
||||
gps_l2_m_dll_pll_tracking_fpga.h
|
||||
galileo_e1_dll_pll_veml_tracking_fpga.h
|
||||
galileo_e5a_dll_pll_tracking_fpga.h
|
||||
gps_l5_dll_pll_tracking_fpga.h
|
||||
)
|
||||
endif()
|
||||
|
||||
set(TRACKING_ADAPTER_SOURCES
|
||||
galileo_e1_dll_pll_veml_tracking.cc
|
||||
galileo_e1_tcp_connector_tracking.cc
|
||||
gps_l1_ca_dll_pll_tracking.cc
|
||||
gps_l1_ca_dll_pll_c_aid_tracking.cc
|
||||
gps_l1_ca_tcp_connector_tracking.cc
|
||||
galileo_e5a_dll_pll_tracking.cc
|
||||
gps_l2_m_dll_pll_tracking.cc
|
||||
glonass_l1_ca_dll_pll_tracking.cc
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking.cc
|
||||
gps_l1_ca_kf_tracking.cc
|
||||
gps_l5_dll_pll_tracking.cc
|
||||
glonass_l2_ca_dll_pll_tracking.cc
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking.cc
|
||||
beidou_b1i_dll_pll_tracking.cc
|
||||
galileo_e1_dll_pll_veml_tracking.cc
|
||||
galileo_e1_tcp_connector_tracking.cc
|
||||
gps_l1_ca_dll_pll_tracking.cc
|
||||
gps_l1_ca_dll_pll_c_aid_tracking.cc
|
||||
gps_l1_ca_tcp_connector_tracking.cc
|
||||
galileo_e5a_dll_pll_tracking.cc
|
||||
gps_l2_m_dll_pll_tracking.cc
|
||||
glonass_l1_ca_dll_pll_tracking.cc
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking.cc
|
||||
gps_l1_ca_kf_tracking.cc
|
||||
gps_l5_dll_pll_tracking.cc
|
||||
glonass_l2_ca_dll_pll_tracking.cc
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking.cc
|
||||
beidou_b1i_dll_pll_tracking.cc
|
||||
beidou_b3i_dll_pll_tracking.cc
|
||||
${OPT_TRACKING_ADAPTERS_SOURCES}
|
||||
${OPT_TRACKING_ADAPTERS_SOURCES}
|
||||
)
|
||||
|
||||
set(TRACKING_ADAPTER_HEADERS
|
||||
galileo_e1_dll_pll_veml_tracking.h
|
||||
galileo_e1_tcp_connector_tracking.h
|
||||
gps_l1_ca_dll_pll_tracking.h
|
||||
gps_l1_ca_dll_pll_c_aid_tracking.h
|
||||
gps_l1_ca_tcp_connector_tracking.h
|
||||
galileo_e5a_dll_pll_tracking.h
|
||||
gps_l2_m_dll_pll_tracking.h
|
||||
glonass_l1_ca_dll_pll_tracking.h
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking.h
|
||||
gps_l1_ca_kf_tracking.h
|
||||
gps_l5_dll_pll_tracking.h
|
||||
glonass_l2_ca_dll_pll_tracking.h
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking.h
|
||||
beidou_b1i_dll_pll_tracking.h
|
||||
galileo_e1_dll_pll_veml_tracking.h
|
||||
galileo_e1_tcp_connector_tracking.h
|
||||
gps_l1_ca_dll_pll_tracking.h
|
||||
gps_l1_ca_dll_pll_c_aid_tracking.h
|
||||
gps_l1_ca_tcp_connector_tracking.h
|
||||
galileo_e5a_dll_pll_tracking.h
|
||||
gps_l2_m_dll_pll_tracking.h
|
||||
glonass_l1_ca_dll_pll_tracking.h
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking.h
|
||||
gps_l1_ca_kf_tracking.h
|
||||
gps_l5_dll_pll_tracking.h
|
||||
glonass_l2_ca_dll_pll_tracking.h
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking.h
|
||||
beidou_b1i_dll_pll_tracking.h
|
||||
beidou_b3i_dll_pll_tracking.h
|
||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||
)
|
||||
|
||||
list(SORT TRACKING_ADAPTER_HEADERS)
|
||||
@@ -101,16 +97,36 @@ add_library(tracking_adapters
|
||||
|
||||
target_link_libraries(tracking_adapters
|
||||
PUBLIC
|
||||
tracking_gr_blocks
|
||||
gnss_sp_libs
|
||||
gnss_sdr_flags
|
||||
tracking_gr_blocks
|
||||
algorithms_libs
|
||||
gnss_sdr_flags
|
||||
)
|
||||
|
||||
target_include_directories(tracking_adapters
|
||||
PUBLIC
|
||||
${OPT_TRACKING_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CUDA)
|
||||
target_link_libraries(tracking_adapters
|
||||
PUBLIC
|
||||
${CUDA_LIBRARIES}
|
||||
)
|
||||
target_include_directories(tracking_adapters
|
||||
PUBLIC
|
||||
${CUDA_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(tracking_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET tracking_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
||||
@@ -59,14 +59,20 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
bool dump = configuration->property(role + ".dump", false);
|
||||
trk_param.dump = dump;
|
||||
float 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);
|
||||
if (FLAGS_pll_bw_hz != 0.0)
|
||||
{
|
||||
pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
}
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
|
||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float 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);
|
||||
if (FLAGS_dll_bw_hz != 0.0)
|
||||
{
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
@@ -105,16 +111,28 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
char sig_[3] = "B1";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
if (FLAGS_cn0_samples != 20)
|
||||
{
|
||||
cn0_samples = FLAGS_cn0_samples;
|
||||
}
|
||||
trk_param.cn0_samples = cn0_samples;
|
||||
int cn0_min = configuration->property(role + ".cn0_min", 25);
|
||||
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
|
||||
if (FLAGS_cn0_min != 25)
|
||||
{
|
||||
cn0_min = FLAGS_cn0_min;
|
||||
}
|
||||
trk_param.cn0_min = cn0_min;
|
||||
int max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
|
||||
if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail;
|
||||
if (FLAGS_max_lock_fail != 50)
|
||||
{
|
||||
max_lock_fail = FLAGS_max_lock_fail;
|
||||
}
|
||||
trk_param.max_lock_fail = max_lock_fail;
|
||||
double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.85);
|
||||
if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
if (FLAGS_carrier_lock_th != 0.85)
|
||||
{
|
||||
carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
}
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
|
||||
@@ -76,10 +76,16 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
|
||||
}
|
||||
float 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);
|
||||
if (FLAGS_pll_bw_hz != 0.0)
|
||||
{
|
||||
pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
}
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float 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);
|
||||
if (FLAGS_dll_bw_hz != 0.0)
|
||||
{
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 2.0);
|
||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||
@@ -111,22 +117,34 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
}
|
||||
trk_param.track_pilot = track_pilot;
|
||||
trk_param.extend_correlation_symbols = extend_correlation_symbols;
|
||||
int vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
trk_param.system = 'E';
|
||||
char sig_[3] = "1B";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
if (FLAGS_cn0_samples != 20)
|
||||
{
|
||||
cn0_samples = FLAGS_cn0_samples;
|
||||
}
|
||||
trk_param.cn0_samples = cn0_samples;
|
||||
int cn0_min = configuration->property(role + ".cn0_min", 25);
|
||||
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
|
||||
if (FLAGS_cn0_min != 25)
|
||||
{
|
||||
cn0_min = FLAGS_cn0_min;
|
||||
}
|
||||
trk_param.cn0_min = cn0_min;
|
||||
int max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
|
||||
if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail;
|
||||
if (FLAGS_max_lock_fail != 50)
|
||||
{
|
||||
max_lock_fail = FLAGS_max_lock_fail;
|
||||
}
|
||||
trk_param.max_lock_fail = max_lock_fail;
|
||||
double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.85);
|
||||
if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
if (FLAGS_carrier_lock_th != 0.85)
|
||||
{
|
||||
carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
}
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
|
||||
@@ -107,7 +107,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
trk_param_fpga.track_pilot = track_pilot;
|
||||
d_track_pilot = track_pilot;
|
||||
trk_param_fpga.extend_correlation_symbols = extend_correlation_symbols;
|
||||
int vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
trk_param_fpga.system = 'E';
|
||||
char sig_[3] = "1B";
|
||||
@@ -136,26 +136,26 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
|
||||
//################# PRE-COMPUTE ALL THE CODES #################
|
||||
unsigned int code_samples_per_chip = 2;
|
||||
d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * Galileo_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * GALILEO_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
float* ca_codes_f;
|
||||
float* data_codes_f;
|
||||
|
||||
if (trk_param_fpga.track_pilot)
|
||||
{
|
||||
d_data_codes = static_cast<int*>(volk_gnsssdr_malloc((static_cast<unsigned int>(Galileo_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * Galileo_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
d_data_codes = static_cast<int*>(volk_gnsssdr_malloc((static_cast<unsigned int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * GALILEO_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
}
|
||||
ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
if (trk_param_fpga.track_pilot)
|
||||
{
|
||||
data_codes_f = static_cast<float*>(volk_gnsssdr_malloc((static_cast<unsigned int>(Galileo_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
data_codes_f = static_cast<float*>(volk_gnsssdr_malloc((static_cast<unsigned int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
}
|
||||
|
||||
//printf("pppppppp trk_param_fpga.track_pilot = %d\n", trk_param_fpga.track_pilot);
|
||||
|
||||
//int kk;
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++)
|
||||
for (unsigned int PRN = 1; PRN <= GALILEO_E1_NUMBER_OF_CODES; PRN++)
|
||||
{
|
||||
char data_signal[3] = "1B";
|
||||
if (trk_param_fpga.track_pilot)
|
||||
@@ -165,11 +165,11 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
galileo_e1_code_gen_sinboc11_float(ca_codes_f, pilot_signal, PRN);
|
||||
galileo_e1_code_gen_sinboc11_float(data_codes_f, data_signal, PRN);
|
||||
|
||||
for (unsigned int s = 0; s < 2 * Galileo_E1_B_CODE_LENGTH_CHIPS; s++)
|
||||
for (unsigned int s = 0; s < 2 * GALILEO_E1_B_CODE_LENGTH_CHIPS; s++)
|
||||
{
|
||||
d_ca_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]);
|
||||
d_data_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(data_codes_f[s]);
|
||||
//printf("%f %d | ", data_codes_f[s], d_data_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]);
|
||||
d_ca_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]);
|
||||
d_data_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(data_codes_f[s]);
|
||||
//printf("%f %d | ", data_codes_f[s], d_data_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]);
|
||||
}
|
||||
//printf("\n next \n");
|
||||
//scanf ("%d",&kk);
|
||||
@@ -179,10 +179,10 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
//printf("no tracking pilot\n");
|
||||
galileo_e1_code_gen_sinboc11_float(ca_codes_f, data_signal, PRN);
|
||||
|
||||
for (unsigned int s = 0; s < 2 * Galileo_E1_B_CODE_LENGTH_CHIPS; s++)
|
||||
for (unsigned int s = 0; s < 2 * GALILEO_E1_B_CODE_LENGTH_CHIPS; s++)
|
||||
{
|
||||
d_ca_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]);
|
||||
//printf("%f %d | ", ca_codes_f[s], d_ca_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]);
|
||||
d_ca_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]);
|
||||
//printf("%f %d | ", ca_codes_f[s], d_ca_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]);
|
||||
}
|
||||
//printf("\n next \n");
|
||||
//scanf ("%d",&kk);
|
||||
@@ -196,7 +196,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
}
|
||||
trk_param_fpga.ca_codes = d_ca_codes;
|
||||
trk_param_fpga.data_codes = d_data_codes;
|
||||
trk_param_fpga.code_length_chips = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
trk_param_fpga.code_length_chips = GALILEO_E1_B_CODE_LENGTH_CHIPS;
|
||||
trk_param_fpga.code_samples_per_chip = code_samples_per_chip; // 2 sample per chip
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga);
|
||||
|
||||
@@ -68,15 +68,21 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
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);
|
||||
very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6);
|
||||
port_ch0 = configuration->property(role + ".port_ch0", 2060);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type == "gr_complex")
|
||||
|
||||
@@ -76,10 +76,16 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
|
||||
}
|
||||
float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 20.0);
|
||||
if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
if (FLAGS_pll_bw_hz != 0.0)
|
||||
{
|
||||
pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
}
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 20.0);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
if (FLAGS_dll_bw_hz != 0.0)
|
||||
{
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 5.0);
|
||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||
@@ -87,7 +93,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
int vector_length = std::round(fs_in / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
@@ -98,9 +104,9 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
extend_correlation_symbols = 1;
|
||||
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
else if (!track_pilot and extend_correlation_symbols > Galileo_E5a_I_SECONDARY_CODE_LENGTH)
|
||||
else if (!track_pilot and extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH)
|
||||
{
|
||||
extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH;
|
||||
extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
|
||||
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
|
||||
@@ -115,16 +121,28 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
char sig_[3] = "5X";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
if (FLAGS_cn0_samples != 20)
|
||||
{
|
||||
cn0_samples = FLAGS_cn0_samples;
|
||||
}
|
||||
trk_param.cn0_samples = cn0_samples;
|
||||
int cn0_min = configuration->property(role + ".cn0_min", 25);
|
||||
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
|
||||
if (FLAGS_cn0_min != 25)
|
||||
{
|
||||
cn0_min = FLAGS_cn0_min;
|
||||
}
|
||||
trk_param.cn0_min = cn0_min;
|
||||
int max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
|
||||
if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail;
|
||||
if (FLAGS_max_lock_fail != 50)
|
||||
{
|
||||
max_lock_fail = FLAGS_max_lock_fail;
|
||||
}
|
||||
trk_param.max_lock_fail = max_lock_fail;
|
||||
double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.85);
|
||||
if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
if (FLAGS_carrier_lock_th != 0.85)
|
||||
{
|
||||
carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
}
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
|
||||
@@ -84,7 +84,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
trk_param_fpga.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param_fpga.early_late_space_chips = early_late_space_chips;
|
||||
int vector_length = std::round(fs_in / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
@@ -96,9 +96,9 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
extend_correlation_symbols = 1;
|
||||
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
else if (!track_pilot and extend_correlation_symbols > Galileo_E5a_I_SECONDARY_CODE_LENGTH)
|
||||
else if (!track_pilot and extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH)
|
||||
{
|
||||
extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH;
|
||||
extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
|
||||
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
|
||||
@@ -136,7 +136,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
|
||||
//################# PRE-COMPUTE ALL THE CODES #################
|
||||
unsigned int code_samples_per_chip = 1;
|
||||
auto code_length_chips = static_cast<unsigned int>(Galileo_E5a_CODE_LENGTH_CHIPS);
|
||||
auto code_length_chips = static_cast<unsigned int>(GALILEO_E5A_CODE_LENGTH_CHIPS);
|
||||
|
||||
auto *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * code_length_chips * code_samples_per_chip, volk_gnsssdr_get_alignment()));
|
||||
|
||||
@@ -149,15 +149,15 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
}
|
||||
tracking_code = static_cast<float *>(volk_gnsssdr_malloc(code_samples_per_chip * code_length_chips * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
d_ca_codes = static_cast<int *>(volk_gnsssdr_malloc(static_cast<int>(code_length_chips) * code_samples_per_chip * Galileo_E5a_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
d_ca_codes = static_cast<int *>(volk_gnsssdr_malloc(static_cast<int>(code_length_chips) * code_samples_per_chip * GALILEO_E5A_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
|
||||
if (trk_param_fpga.track_pilot)
|
||||
{
|
||||
d_data_codes = static_cast<int *>(volk_gnsssdr_malloc((static_cast<unsigned int>(code_length_chips)) * code_samples_per_chip * Galileo_E5a_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
d_data_codes = static_cast<int *>(volk_gnsssdr_malloc((static_cast<unsigned int>(code_length_chips)) * code_samples_per_chip * GALILEO_E5A_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
}
|
||||
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= Galileo_E5a_NUMBER_OF_CODES; PRN++)
|
||||
for (unsigned int PRN = 1; PRN <= GALILEO_E5A_NUMBER_OF_CODES; PRN++)
|
||||
{
|
||||
//galileo_e5_a_code_gen_complex_primary(aux_code, PRN, const_cast<char *>(trk_param_fpga.signal.c_str()));
|
||||
galileo_e5_a_code_gen_complex_primary(aux_code, PRN, const_cast<char *>(sig_));
|
||||
|
||||
@@ -69,9 +69,15 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
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);
|
||||
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||
int extend_correlation_ms;
|
||||
|
||||
@@ -66,9 +66,15 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
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);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
@@ -67,9 +67,15 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
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);
|
||||
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||
int extend_correlation_ms;
|
||||
|
||||
@@ -64,9 +64,15 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
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);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
@@ -68,9 +68,15 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
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);
|
||||
dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||
int extend_correlation_ms;
|
||||
|
||||
@@ -76,14 +76,20 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
bool dump_mat = configuration->property(role + ".dump_mat", true);
|
||||
trk_param.dump_mat = dump_mat;
|
||||
float 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);
|
||||
if (FLAGS_pll_bw_hz != 0.0)
|
||||
{
|
||||
pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
}
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
|
||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float 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);
|
||||
if (FLAGS_dll_bw_hz != 0.0)
|
||||
{
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
@@ -119,16 +125,28 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
char sig_[3] = "1C";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
if (FLAGS_cn0_samples != 20)
|
||||
{
|
||||
cn0_samples = FLAGS_cn0_samples;
|
||||
}
|
||||
trk_param.cn0_samples = cn0_samples;
|
||||
int cn0_min = configuration->property(role + ".cn0_min", 30);
|
||||
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
|
||||
if (FLAGS_cn0_min != 25)
|
||||
{
|
||||
cn0_min = FLAGS_cn0_min;
|
||||
}
|
||||
trk_param.cn0_min = cn0_min;
|
||||
int max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
|
||||
if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail;
|
||||
if (FLAGS_max_lock_fail != 50)
|
||||
{
|
||||
max_lock_fail = FLAGS_max_lock_fail;
|
||||
}
|
||||
trk_param.max_lock_fail = max_lock_fail;
|
||||
double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.80);
|
||||
if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
if (FLAGS_carrier_lock_th != 0.85)
|
||||
{
|
||||
carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
}
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
|
||||
@@ -77,7 +77,10 @@ GpsL1CaKfTracking::GpsL1CaKfTracking(
|
||||
f_if = configuration->property(role + ".if", 0);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
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);
|
||||
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);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
@@ -66,10 +66,16 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
bool dump_mat = configuration->property(role + ".dump_mat", true);
|
||||
trk_param.dump_mat = dump_mat;
|
||||
float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 2.0);
|
||||
if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
if (FLAGS_pll_bw_hz != 0.0)
|
||||
{
|
||||
pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
}
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 0.75);
|
||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
if (FLAGS_dll_bw_hz != 0.0)
|
||||
{
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
@@ -96,16 +102,28 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
char sig_[3] = "2S";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
if (FLAGS_cn0_samples != 20)
|
||||
{
|
||||
cn0_samples = FLAGS_cn0_samples;
|
||||
}
|
||||
trk_param.cn0_samples = cn0_samples;
|
||||
int cn0_min = configuration->property(role + ".cn0_min", 25);
|
||||
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
|
||||
if (FLAGS_cn0_min != 25)
|
||||
{
|
||||
cn0_min = FLAGS_cn0_min;
|
||||
}
|
||||
trk_param.cn0_min = cn0_min;
|
||||
int max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
|
||||
if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail;
|
||||
if (FLAGS_max_lock_fail != 50)
|
||||
{
|
||||
max_lock_fail = FLAGS_max_lock_fail;
|
||||
}
|
||||
trk_param.max_lock_fail = max_lock_fail;
|
||||
double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.85);
|
||||
if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
if (FLAGS_carrier_lock_th != 0.85)
|
||||
{
|
||||
carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
}
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
|
||||
@@ -76,10 +76,16 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
|
||||
}
|
||||
float 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);
|
||||
if (FLAGS_pll_bw_hz != 0.0)
|
||||
{
|
||||
pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
|
||||
}
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float 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);
|
||||
if (FLAGS_dll_bw_hz != 0.0)
|
||||
{
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 2.0);
|
||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||
@@ -87,7 +93,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5i_CODE_RATE_HZ) / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS)));
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
trk_param.vector_length = vector_length;
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
@@ -98,9 +104,9 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
extend_correlation_symbols = 1;
|
||||
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
else if (!track_pilot and extend_correlation_symbols > GPS_L5i_NH_CODE_LENGTH)
|
||||
else if (!track_pilot and extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH)
|
||||
{
|
||||
extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH;
|
||||
extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH;
|
||||
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
|
||||
@@ -115,16 +121,28 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
char sig_[3] = "L5";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
if (FLAGS_cn0_samples != 20)
|
||||
{
|
||||
cn0_samples = FLAGS_cn0_samples;
|
||||
}
|
||||
trk_param.cn0_samples = cn0_samples;
|
||||
int cn0_min = configuration->property(role + ".cn0_min", 25);
|
||||
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
|
||||
if (FLAGS_cn0_min != 25)
|
||||
{
|
||||
cn0_min = FLAGS_cn0_min;
|
||||
}
|
||||
trk_param.cn0_min = cn0_min;
|
||||
int max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
|
||||
if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail;
|
||||
if (FLAGS_max_lock_fail != 50)
|
||||
{
|
||||
max_lock_fail = FLAGS_max_lock_fail;
|
||||
}
|
||||
trk_param.max_lock_fail = max_lock_fail;
|
||||
double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.75);
|
||||
if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
if (FLAGS_carrier_lock_th != 0.85)
|
||||
{
|
||||
carrier_lock_th = FLAGS_carrier_lock_th;
|
||||
}
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
|
||||
@@ -84,7 +84,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
trk_param_fpga.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param_fpga.early_late_space_chips = early_late_space_chips;
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5i_CODE_RATE_HZ) / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS)));
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
@@ -95,9 +95,9 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
extend_correlation_symbols = 1;
|
||||
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
else if (!track_pilot and extend_correlation_symbols > GPS_L5i_NH_CODE_LENGTH)
|
||||
else if (!track_pilot and extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH)
|
||||
{
|
||||
extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH;
|
||||
extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH;
|
||||
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
|
||||
@@ -136,7 +136,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
|
||||
//################# PRE-COMPUTE ALL THE CODES #################
|
||||
unsigned int code_samples_per_chip = 1;
|
||||
auto code_length_chips = static_cast<unsigned int>(GPS_L5i_CODE_LENGTH_CHIPS);
|
||||
auto code_length_chips = static_cast<unsigned int>(GPS_L5I_CODE_LENGTH_CHIPS);
|
||||
//printf("TRK code_length_chips = %d\n", code_length_chips);
|
||||
|
||||
float *tracking_code;
|
||||
|
||||
@@ -25,14 +25,6 @@ if(ENABLE_CUDA)
|
||||
${OPT_TRACKING_BLOCKS_HEADERS}
|
||||
gps_l1_ca_dll_pll_tracking_gpu_cc.h
|
||||
)
|
||||
set(OPT_TRACKING_INCLUDES
|
||||
${OPT_TRACKING_INCLUDES}
|
||||
${CUDA_INCLUDE_DIRS}
|
||||
)
|
||||
set(OPT_TRACKING_LIBRARIES
|
||||
${OPT_TRACKING_LIBRARIES}
|
||||
${CUDA_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
@@ -91,20 +83,33 @@ add_library(tracking_gr_blocks
|
||||
target_link_libraries(tracking_gr_blocks
|
||||
PUBLIC
|
||||
Boost::boost
|
||||
tracking_lib
|
||||
Gnuradio::blocks
|
||||
Matio::matio
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
gnss_sdr_flags
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
Matio::matio
|
||||
${OPT_TRACKING_LIBRARIES}
|
||||
algorithms_libs
|
||||
tracking_libs
|
||||
)
|
||||
|
||||
target_include_directories(tracking_gr_blocks
|
||||
PUBLIC
|
||||
${OPT_TRACKING_INCLUDES}
|
||||
)
|
||||
if(ENABLE_CUDA)
|
||||
target_link_libraries(tracking_gr_blocks
|
||||
PUBLIC
|
||||
${CUDA_LIBRARIES}
|
||||
)
|
||||
target_include_directories(tracking_gr_blocks
|
||||
PUBLIC
|
||||
${CUDA_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(tracking_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET tracking_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "beidou_b3i_signal_processing.h"
|
||||
#include "beidou_b1i_signal_processing.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
@@ -62,6 +61,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
#include <sstream>
|
||||
@@ -102,6 +102,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_secondary_code_length = 0U;
|
||||
d_secondary_code_string = nullptr;
|
||||
d_preambles_symbols = nullptr;
|
||||
d_preamble_length_symbols = 0;
|
||||
signal_type = std::string(trk_parameters.signal);
|
||||
|
||||
std::map<std::string, std::string> map_signal_pretty_name;
|
||||
@@ -176,24 +177,24 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
else if (signal_type == "L5")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
|
||||
d_code_period = GPS_L5i_PERIOD;
|
||||
d_code_chip_rate = GPS_L5i_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L5I_PERIOD;
|
||||
d_code_chip_rate = GPS_L5I_CODE_RATE_HZ;
|
||||
d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_code_length_chips = static_cast<uint32_t>(GPS_L5i_CODE_LENGTH_CHIPS);
|
||||
d_code_length_chips = static_cast<uint32_t>(GPS_L5I_CODE_LENGTH_CHIPS);
|
||||
d_secondary = true;
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5q_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5q_NH_CODE_STR);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5Q_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5Q_NH_CODE_STR);
|
||||
signal_pretty_name = signal_pretty_name + "Q";
|
||||
interchange_iq = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5i_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5i_NH_CODE_STR);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5I_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5I_NH_CODE_STR);
|
||||
signal_pretty_name = signal_pretty_name + "I";
|
||||
interchange_iq = false;
|
||||
}
|
||||
@@ -217,10 +218,10 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
systemName = "Galileo";
|
||||
if (signal_type == "1B")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E1_FREQ_HZ;
|
||||
d_code_period = Galileo_E1_CODE_PERIOD;
|
||||
d_code_chip_rate = Galileo_E1_CODE_CHIP_RATE_HZ;
|
||||
d_code_length_chips = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
d_signal_carrier_freq = GALILEO_E1_FREQ_HZ;
|
||||
d_code_period = GALILEO_E1_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_HZ;
|
||||
d_code_length_chips = static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = 1;
|
||||
d_correlation_length_ms = 4;
|
||||
d_code_samples_per_chip = 2; // CBOC disabled: 2 samples per chip. CBOC enabled: 12 samples per chip
|
||||
@@ -228,8 +229,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary = true;
|
||||
d_secondary_code_length = static_cast<uint32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&Galileo_E1_C_SECONDARY_CODE);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GALILEO_E1_C_SECONDARY_CODE);
|
||||
signal_pretty_name = signal_pretty_name + "C";
|
||||
}
|
||||
else
|
||||
@@ -241,18 +242,18 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
}
|
||||
else if (signal_type == "5X")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E5a_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5a_CODE_PERIOD;
|
||||
d_code_chip_rate = Galileo_E5a_CODE_CHIP_RATE_HZ;
|
||||
d_signal_carrier_freq = GALILEO_E5A_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5A_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_HZ;
|
||||
d_symbols_per_bit = 20;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_code_length_chips = static_cast<uint32_t>(Galileo_E5a_CODE_LENGTH_CHIPS);
|
||||
d_code_length_chips = static_cast<uint32_t>(GALILEO_E5A_CODE_LENGTH_CHIPS);
|
||||
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary = true;
|
||||
d_secondary_code_length = static_cast<uint32_t>(Galileo_E5a_Q_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GALILEO_E5A_Q_SECONDARY_CODE_LENGTH);
|
||||
signal_pretty_name = signal_pretty_name + "Q";
|
||||
interchange_iq = true;
|
||||
}
|
||||
@@ -283,19 +284,19 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
systemName = "Beidou";
|
||||
if (signal_type == "B1")
|
||||
{
|
||||
// GEO Satellites use different secondary code
|
||||
d_signal_carrier_freq = BEIDOU_B1I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B1I_CODE_RATE_HZ;
|
||||
d_code_length_chips = static_cast<unsigned int>(BEIDOU_B1I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = true;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = static_cast<unsigned int>(BEIDOU_B1I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B1I_SECONDARY_CODE_STR);
|
||||
// GEO Satellites use different secondary code
|
||||
d_signal_carrier_freq = BEIDOU_B1I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B1I_CODE_RATE_HZ;
|
||||
d_code_length_chips = static_cast<unsigned int>(BEIDOU_B1I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = true;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = static_cast<unsigned int>(BEIDOU_B1I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B1I_SECONDARY_CODE_STR);
|
||||
}
|
||||
else if (signal_type == "B3")
|
||||
{
|
||||
@@ -312,7 +313,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = static_cast<unsigned int>(BEIDOU_B3I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B3I_SECONDARY_CODE_STR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
|
||||
@@ -573,7 +574,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str()));
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary_code_string = const_cast<std::string *>(&Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GALILEO_E5A_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]);
|
||||
for (uint32_t i = 0; i < d_code_length_chips; i++)
|
||||
{
|
||||
d_tracking_code[i] = aux_code[i].imag();
|
||||
@@ -595,22 +596,22 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
{
|
||||
beidou_b1i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
|
||||
// Update secondary code settings for geo satellites
|
||||
if(d_acquisition_gnss_synchro->PRN > 0 and d_acquisition_gnss_synchro->PRN < 6)
|
||||
if (d_acquisition_gnss_synchro->PRN > 0 and d_acquisition_gnss_synchro->PRN < 6)
|
||||
{
|
||||
d_symbols_per_bit = 2;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = false;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = 0;
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B1I_D2_SECONDARY_CODE_STR);
|
||||
d_symbols_per_bit = 2;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = false;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = 0;
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B1I_D2_SECONDARY_CODE_STR);
|
||||
|
||||
// preamble bits to sampled symbols
|
||||
d_preamble_length_symbols = 22;
|
||||
d_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(22 * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
uint16_t preambles_bits[BEIDOU_B1I_PREAMBLE_LENGTH_BITS] = {1,1,1,0,0,0,1,0,0,1,0};
|
||||
// preamble bits to sampled symbols
|
||||
d_preamble_length_symbols = 22;
|
||||
d_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(22 * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
uint16_t preambles_bits[BEIDOU_B1I_PREAMBLE_LENGTH_BITS] = {1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0};
|
||||
for (uint16_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (int32_t j = 0; j < d_symbols_per_bit; j++)
|
||||
@@ -652,23 +653,23 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(22 * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
uint16_t preambles_bits[BEIDOU_B3I_PREAMBLE_LENGTH_BITS] = {1,1,1,0,0,0,1,0,0,1,0};
|
||||
for (uint16_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (int32_t j = 0; j < d_symbols_per_bit; j++)
|
||||
{
|
||||
if (preambles_bit == 1)
|
||||
{
|
||||
d_preambles_symbols[n] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_preambles_symbols[n] = -1;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
d_symbol_history.resize(22); // Change fixed buffer size
|
||||
d_symbol_history.clear();
|
||||
for (uint16_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (int32_t j = 0; j < d_symbols_per_bit; j++)
|
||||
{
|
||||
if (preambles_bit == 1)
|
||||
{
|
||||
d_preambles_symbols[n] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_preambles_symbols[n] = -1;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
d_symbol_history.resize(22); // Change fixed buffer size
|
||||
d_symbol_history.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -733,9 +734,16 @@ dll_pll_veml_tracking::~dll_pll_veml_tracking()
|
||||
}
|
||||
}
|
||||
if (d_dump_mat)
|
||||
{
|
||||
try
|
||||
{
|
||||
save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
@@ -792,7 +800,7 @@ bool dll_pll_veml_tracking::acquire_secondary()
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -806,29 +814,32 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_
|
||||
d_cn0_estimation_counter++;
|
||||
return true;
|
||||
}
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples);
|
||||
// Loss of lock detection
|
||||
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min)
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples);
|
||||
// Loss of lock detection
|
||||
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min)
|
||||
{
|
||||
d_carrier_lock_fail_counter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_carrier_lock_fail_counter > 0)
|
||||
{
|
||||
d_carrier_lock_fail_counter++;
|
||||
d_carrier_lock_fail_counter--;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
|
||||
}
|
||||
if (d_carrier_lock_fail_counter > trk_parameters.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;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (d_carrier_lock_fail_counter > trk_parameters.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;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -907,7 +918,10 @@ void dll_pll_veml_tracking::run_dll_pll()
|
||||
void dll_pll_veml_tracking::clear_tracking_vars()
|
||||
{
|
||||
std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0));
|
||||
if (trk_parameters.track_pilot) d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||
}
|
||||
d_carr_error_hz = 0.0;
|
||||
d_carr_error_filt_hz = 0.0;
|
||||
d_code_error_chips = 0.0;
|
||||
@@ -1043,9 +1057,13 @@ void dll_pll_veml_tracking::save_correlation_results()
|
||||
}
|
||||
// If tracking pilot, disable Costas loop
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_cloop = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_cloop = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1512,7 +1530,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
DLOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
|
||||
<< ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
|
||||
|
||||
consume_each(samples_offset); // shift input to perform alignment with local replica
|
||||
consume_each(samples_offset); // shift input to perform alignment with local replica
|
||||
return 0;
|
||||
}
|
||||
case 2: // Wide tracking and symbol synchronization
|
||||
@@ -1552,8 +1570,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
next_state = acquire_secondary();
|
||||
if (next_state)
|
||||
{
|
||||
LOG(INFO) << systemName << " " << signal_pretty_name << " secondary code locked in channel " << d_channel
|
||||
<< " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
LOG(INFO) << systemName << " " << signal_pretty_name << " secondary code locked in channel " << d_channel
|
||||
<< " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
std::cout << systemName << " " << signal_pretty_name << " secondary code locked in channel " << d_channel
|
||||
<< " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
}
|
||||
@@ -1585,7 +1603,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
}
|
||||
if (corr_value == d_preamble_length_symbols)
|
||||
{
|
||||
LOG(INFO) << systemName << " " << signal_pretty_name << " tracking preamble detected in channel " << d_channel
|
||||
LOG(INFO) << systemName << " " << signal_pretty_name << " tracking preamble detected in channel " << d_channel
|
||||
<< " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
next_state = true;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
class dll_pll_veml_tracking;
|
||||
|
||||
typedef boost::shared_ptr<dll_pll_veml_tracking> dll_pll_veml_tracking_sptr;
|
||||
using dll_pll_veml_tracking_sptr = boost::shared_ptr<dll_pll_veml_tracking>;
|
||||
|
||||
dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_);
|
||||
|
||||
@@ -121,8 +121,8 @@ private:
|
||||
float *d_data_code;
|
||||
float *d_local_code_shift_chips;
|
||||
float *d_prompt_data_shift;
|
||||
cpu_multicorrelator_real_codes multicorrelator_cpu;
|
||||
cpu_multicorrelator_real_codes correlator_data_cpu; //for data channel
|
||||
Cpu_Multicorrelator_Real_Codes multicorrelator_cpu;
|
||||
Cpu_Multicorrelator_Real_Codes correlator_data_cpu; //for data channel
|
||||
/* TODO: currently the multicorrelator does not support adding extra correlator
|
||||
with different local code, thus we need extra multicorrelator instance.
|
||||
Implement this functionality inside multicorrelator class
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "gps_l5_signal.h"
|
||||
@@ -55,6 +54,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -124,7 +124,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
// preamble bits to sampled symbols
|
||||
d_gps_l1ca_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(GPS_CA_PREAMBLE_LENGTH_SYMBOLS * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
for (unsigned short preambles_bit : preambles_bits)
|
||||
for (uint16_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (uint32_t j = 0; j < GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; j++)
|
||||
{
|
||||
@@ -159,8 +159,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
else if (signal_type == "L5")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
|
||||
d_code_period = GPS_L5i_PERIOD;
|
||||
d_code_chip_rate = GPS_L5i_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L5I_PERIOD;
|
||||
d_code_chip_rate = GPS_L5I_CODE_RATE_HZ;
|
||||
d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL;
|
||||
d_correlation_length_ms = 1;
|
||||
//d_code_samples_per_chip = 1;
|
||||
@@ -169,15 +169,15 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
// interchange_iq = false;
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5q_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5q_NH_CODE_STR);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5Q_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5Q_NH_CODE_STR);
|
||||
signal_pretty_name = signal_pretty_name + "Q";
|
||||
interchange_iq = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5i_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5i_NH_CODE_STR);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GPS_L5I_NH_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GPS_L5I_NH_CODE_STR);
|
||||
signal_pretty_name = signal_pretty_name + "I";
|
||||
interchange_iq = false;
|
||||
}
|
||||
@@ -201,9 +201,9 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
systemName = "Galileo";
|
||||
if (signal_type == "1B")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E1_FREQ_HZ;
|
||||
d_code_period = Galileo_E1_CODE_PERIOD;
|
||||
d_code_chip_rate = Galileo_E1_CODE_CHIP_RATE_HZ;
|
||||
d_signal_carrier_freq = GALILEO_E1_FREQ_HZ;
|
||||
d_code_period = GALILEO_E1_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_HZ;
|
||||
//d_code_length_chips = static_cast<uint32_t >(Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = 1;
|
||||
d_correlation_length_ms = 4;
|
||||
@@ -212,8 +212,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary = true;
|
||||
d_secondary_code_length = static_cast<uint32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&Galileo_E1_C_SECONDARY_CODE);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GALILEO_E1_C_SECONDARY_CODE);
|
||||
signal_pretty_name = signal_pretty_name + "C";
|
||||
}
|
||||
else
|
||||
@@ -225,9 +225,9 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
}
|
||||
else if (signal_type == "5X")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E5a_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5a_CODE_PERIOD;
|
||||
d_code_chip_rate = Galileo_E5a_CODE_CHIP_RATE_HZ;
|
||||
d_signal_carrier_freq = GALILEO_E5A_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5A_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_HZ;
|
||||
d_symbols_per_bit = 20;
|
||||
d_correlation_length_ms = 1;
|
||||
//d_code_samples_per_chip = 1;
|
||||
@@ -236,14 +236,14 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
//interchange_iq = false;
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary_code_length = static_cast<uint32_t>(Galileo_E5a_Q_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GALILEO_E5A_Q_SECONDARY_CODE_LENGTH);
|
||||
signal_pretty_name = signal_pretty_name + "Q";
|
||||
interchange_iq = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_secondary_code_length = static_cast<uint32_t>(Galileo_E5a_I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&Galileo_E5a_I_SECONDARY_CODE);
|
||||
d_secondary_code_length = static_cast<uint32_t>(GALILEO_E5A_I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GALILEO_E5A_I_SECONDARY_CODE);
|
||||
signal_pretty_name = signal_pretty_name + "I";
|
||||
interchange_iq = false;
|
||||
}
|
||||
@@ -537,7 +537,7 @@ void dll_pll_veml_tracking_fpga::start_tracking()
|
||||
{
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
d_secondary_code_string = const_cast<std::string *>(&Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]);
|
||||
d_secondary_code_string = const_cast<std::string *>(&GALILEO_E5A_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]);
|
||||
for (uint32_t i = 0; i < d_code_length_chips; i++)
|
||||
{
|
||||
// nothing to compute : the local codes are pre-computed in the adapter class
|
||||
@@ -622,7 +622,14 @@ dll_pll_veml_tracking_fpga::~dll_pll_veml_tracking_fpga()
|
||||
}
|
||||
if (d_dump_mat)
|
||||
{
|
||||
save_matfile();
|
||||
try
|
||||
{
|
||||
save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
|
||||
@@ -39,15 +39,12 @@
|
||||
#include "galileo_e1_tcp_connector_tracking_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tcp_communication.h"
|
||||
#include "tcp_packet_data.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
@@ -119,7 +116,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
|
||||
// Initialization of local code replica
|
||||
// Get space for a vector with the sinboc(1,1) replica sampled 2x/chip
|
||||
d_ca_code = static_cast<gr_complex *>(volk_gnsssdr_malloc((2 * Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_ca_code = static_cast<gr_complex *>(volk_gnsssdr_malloc((2 * GALILEO_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
// correlator outputs (scalar)
|
||||
d_n_correlator_taps = 5; // Very-Early, Early, Prompt, Late, Very-Late
|
||||
@@ -149,7 +146,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
|
||||
//--- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = Galileo_E1_CODE_CHIP_RATE_HZ;
|
||||
d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_HZ;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@@ -197,10 +194,10 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
d_acquisition_gnss_synchro->Signal,
|
||||
false,
|
||||
d_acquisition_gnss_synchro->PRN,
|
||||
2 * Galileo_E1_CODE_CHIP_RATE_HZ,
|
||||
2 * GALILEO_E1_CODE_CHIP_RATE_HZ,
|
||||
0);
|
||||
|
||||
multicorrelator_cpu.set_local_code_and_taps(static_cast<int32_t>(2 * Galileo_E1_B_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
|
||||
multicorrelator_cpu.set_local_code_and_taps(static_cast<int32_t>(2 * GALILEO_E1_B_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
|
||||
for (int32_t n = 0; n < d_n_correlator_taps; n++)
|
||||
{
|
||||
d_correlator_outs[n] = gr_complex(0, 0);
|
||||
@@ -305,7 +302,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
float carr_error_filt_hz = 0.0;
|
||||
float code_error_filt_chips = 0.0;
|
||||
|
||||
tcp_packet_data tcp_data;
|
||||
Tcp_Packet_Data tcp_data;
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
// Block input data and block output stream pointers
|
||||
@@ -324,8 +321,8 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
float acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
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);
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
current_synchro_data.fs = d_fs_in;
|
||||
*out[0] = current_synchro_data;
|
||||
@@ -375,11 +372,11 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
// New carrier Doppler frequency estimation
|
||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz + carr_error_filt_hz;
|
||||
// New code Doppler frequency estimation
|
||||
d_code_freq_chips = Galileo_E1_CODE_CHIP_RATE_HZ + ((d_carrier_doppler_hz * Galileo_E1_CODE_CHIP_RATE_HZ) / Galileo_E1_FREQ_HZ);
|
||||
d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_HZ + ((d_carrier_doppler_hz * GALILEO_E1_CODE_CHIP_RATE_HZ) / GALILEO_E1_FREQ_HZ);
|
||||
//carrier phase accumulator for (K) doppler estimation
|
||||
d_acc_carrier_phase_rad -= GPS_TWO_PI * d_carrier_doppler_hz * Galileo_E1_CODE_PERIOD;
|
||||
d_acc_carrier_phase_rad -= GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD;
|
||||
//remnant carrier phase to prevent overflow in the code NCO
|
||||
d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * Galileo_E1_CODE_PERIOD;
|
||||
d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD;
|
||||
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_TWO_PI);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
@@ -387,7 +384,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
code_error_filt_chips = tcp_data.proc_pack_code_error;
|
||||
//Code phase accumulator
|
||||
float code_error_filt_secs;
|
||||
code_error_filt_secs = (Galileo_E1_CODE_PERIOD * code_error_filt_chips) / Galileo_E1_CODE_CHIP_RATE_HZ; //[seconds]
|
||||
code_error_filt_secs = (GALILEO_E1_CODE_PERIOD * code_error_filt_chips) / GALILEO_E1_CODE_CHIP_RATE_HZ; //[seconds]
|
||||
d_acc_code_phase_secs = d_acc_code_phase_secs + code_error_filt_secs;
|
||||
|
||||
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
|
||||
@@ -398,7 +395,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
double K_blk_samples;
|
||||
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
|
||||
T_chip_seconds = 1 / static_cast<double>(d_code_freq_chips);
|
||||
T_prn_seconds = T_chip_seconds * Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
T_prn_seconds = T_chip_seconds * GALILEO_E1_B_CODE_LENGTH_CHIPS;
|
||||
T_prn_samples = T_prn_seconds * static_cast<double>(d_fs_in);
|
||||
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 samples
|
||||
@@ -416,7 +413,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
d_cn0_estimation_counter = 0;
|
||||
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, Galileo_E1_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, GALILEO_E1_CODE_PERIOD);
|
||||
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);
|
||||
@@ -428,7 +425,10 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
class Galileo_E1_Tcp_Connector_Tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc> galileo_e1_tcp_connector_tracking_cc_sptr;
|
||||
using galileo_e1_tcp_connector_tracking_cc_sptr = boost::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc>;
|
||||
|
||||
galileo_e1_tcp_connector_tracking_cc_sptr
|
||||
galileo_e1_tcp_connector_make_tracking_cc(
|
||||
@@ -142,7 +142,7 @@ private:
|
||||
// correlator
|
||||
float *d_local_code_shift_chips;
|
||||
gr_complex *d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
// tracking vars
|
||||
double d_code_freq_chips;
|
||||
@@ -154,7 +154,7 @@ private:
|
||||
size_t d_port;
|
||||
int32_t d_listen_connection;
|
||||
float d_control_id;
|
||||
tcp_communication d_tcp_com;
|
||||
Tcp_Communication d_tcp_com;
|
||||
|
||||
//PRN period in samples
|
||||
int32_t d_current_prn_length_samples;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -50,6 +49,7 @@
|
||||
#include <pmt/pmt.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -326,7 +326,14 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::~glonass_l1_ca_dll_pll_c_aid_tracking_c
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile();
|
||||
try
|
||||
{
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -801,7 +808,10 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -53,8 +53,7 @@
|
||||
|
||||
class glonass_l1_ca_dll_pll_c_aid_tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr;
|
||||
using glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>;
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
@@ -126,7 +125,7 @@ private:
|
||||
gr_complex* d_ca_code;
|
||||
float* d_local_code_shift_chips;
|
||||
gr_complex* d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
// remaining code phase and carrier phase between tracking loops
|
||||
double d_rem_code_phase_samples;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -49,6 +48,7 @@
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -529,7 +529,15 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::~glonass_l1_ca_dll_pll_c_aid_tracking_s
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile();
|
||||
try
|
||||
{
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -790,7 +798,10 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -54,8 +54,7 @@
|
||||
|
||||
class glonass_l1_ca_dll_pll_c_aid_tracking_sc;
|
||||
|
||||
typedef boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr;
|
||||
using glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>;
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
@@ -130,7 +129,7 @@ private:
|
||||
//gr_complex* d_correlator_outs;
|
||||
lv_16sc_t* d_correlator_outs_16sc;
|
||||
//cpu_multicorrelator multicorrelator_cpu;
|
||||
cpu_multicorrelator_16sc multicorrelator_cpu_16sc;
|
||||
Cpu_Multicorrelator_16sc multicorrelator_cpu_16sc;
|
||||
|
||||
// remaining code phase and carrier phase between tracking loops
|
||||
double d_rem_code_phase_samples;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_tracking_cc.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -48,6 +47,7 @@
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -279,7 +279,15 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::~Glonass_L1_Ca_Dll_Pll_Tracking_cc()
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile();
|
||||
try
|
||||
{
|
||||
Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -566,7 +574,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
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));
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::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);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
d_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset); // count for the processed samples
|
||||
@@ -659,7 +667,10 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -50,8 +50,7 @@
|
||||
|
||||
class Glonass_L1_Ca_Dll_Pll_Tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>
|
||||
glonass_l1_ca_dll_pll_tracking_cc_sptr;
|
||||
using glonass_l1_ca_dll_pll_tracking_cc_sptr = boost::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>;
|
||||
|
||||
glonass_l1_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_make_tracking_cc(
|
||||
@@ -127,7 +126,7 @@ private:
|
||||
gr_complex* d_ca_code;
|
||||
float* d_local_code_shift_chips;
|
||||
gr_complex* d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
|
||||
// tracking vars
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -48,6 +47,7 @@
|
||||
#include <pmt/pmt.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -323,7 +323,15 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::~glonass_l2_ca_dll_pll_c_aid_tracking_c
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile();
|
||||
try
|
||||
{
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -798,7 +806,10 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
|
||||
class glonass_l2_ca_dll_pll_c_aid_tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr;
|
||||
using glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>;
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
@@ -124,7 +123,7 @@ private:
|
||||
gr_complex* d_ca_code;
|
||||
float* d_local_code_shift_chips;
|
||||
gr_complex* d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
// remaining code phase and carrier phase between tracking loops
|
||||
double d_rem_code_phase_samples;
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -47,6 +46,7 @@
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -528,7 +528,15 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::~glonass_l2_ca_dll_pll_c_aid_tracking_s
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile();
|
||||
try
|
||||
{
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -789,7 +797,10 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
class glonass_l2_ca_dll_pll_c_aid_tracking_sc;
|
||||
|
||||
typedef boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr;
|
||||
using glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>;
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
@@ -128,7 +127,7 @@ private:
|
||||
//gr_complex* d_correlator_outs;
|
||||
lv_16sc_t* d_correlator_outs_16sc;
|
||||
//cpu_multicorrelator multicorrelator_cpu;
|
||||
cpu_multicorrelator_16sc multicorrelator_cpu_16sc;
|
||||
Cpu_Multicorrelator_16sc multicorrelator_cpu_16sc;
|
||||
|
||||
// remaining code phase and carrier phase between tracking loops
|
||||
double d_rem_code_phase_samples;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_tracking_cc.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -48,6 +47,7 @@
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -279,7 +279,15 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::~Glonass_L2_Ca_Dll_Pll_Tracking_cc()
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile();
|
||||
try
|
||||
{
|
||||
Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -566,7 +574,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
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));
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::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);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
d_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset); // count for the processed samples
|
||||
@@ -659,7 +667,10 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
|
||||
class Glonass_L2_Ca_Dll_Pll_Tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>
|
||||
glonass_l2_ca_dll_pll_tracking_cc_sptr;
|
||||
using glonass_l2_ca_dll_pll_tracking_cc_sptr = boost::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>;
|
||||
|
||||
glonass_l2_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_make_tracking_cc(
|
||||
@@ -125,7 +124,7 @@ private:
|
||||
gr_complex* d_ca_code;
|
||||
float* d_local_code_shift_chips;
|
||||
gr_complex* d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
|
||||
// tracking vars
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -41,6 +40,7 @@
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -305,7 +305,15 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::~gps_l1_ca_dll_pll_c_aid_tracking_cc()
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile();
|
||||
try
|
||||
{
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -779,7 +787,10 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
|
||||
class gps_l1_ca_dll_pll_c_aid_tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_cc>
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr;
|
||||
using gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_cc>;
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
@@ -122,7 +121,7 @@ private:
|
||||
gr_complex* d_ca_code;
|
||||
float* d_local_code_shift_chips;
|
||||
gr_complex* d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
// remaining code phase and carrier phase between tracking loops
|
||||
double d_rem_code_phase_samples;
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -41,6 +40,7 @@
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -306,7 +306,15 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::~gps_l1_ca_dll_pll_c_aid_tracking_sc()
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile();
|
||||
try
|
||||
{
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -780,7 +788,10 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
class gps_l1_ca_dll_pll_c_aid_tracking_sc;
|
||||
|
||||
typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_sc>
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr;
|
||||
using gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_sc>;
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
@@ -127,7 +126,7 @@ private:
|
||||
//gr_complex* d_correlator_outs;
|
||||
lv_16sc_t* d_correlator_outs_16sc;
|
||||
//cpu_multicorrelator multicorrelator_cpu;
|
||||
cpu_multicorrelator_16sc multicorrelator_cpu_16sc;
|
||||
Cpu_Multicorrelator_16sc multicorrelator_cpu_16sc;
|
||||
|
||||
// remaining code phase and carrier phase between tracking loops
|
||||
double d_rem_code_phase_samples;
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "gps_l1_ca_dll_pll_tracking_gpu_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
|
||||
#include "gps_l1_ca_kf_tracking_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -49,6 +48,7 @@
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
@@ -375,7 +375,15 @@ Gps_L1_Ca_Kf_Tracking_cc::~Gps_L1_Ca_Kf_Tracking_cc()
|
||||
{
|
||||
std::cout << "Writing .mat files ...";
|
||||
}
|
||||
Gps_L1_Ca_Kf_Tracking_cc::save_matfile();
|
||||
try
|
||||
{
|
||||
Gps_L1_Ca_Kf_Tracking_cc::save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
|
||||
}
|
||||
|
||||
if (d_channel == 0)
|
||||
{
|
||||
std::cout << " done." << std::endl;
|
||||
@@ -842,7 +850,10 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -53,8 +53,7 @@
|
||||
|
||||
class Gps_L1_Ca_Kf_Tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<Gps_L1_Ca_Kf_Tracking_cc>
|
||||
gps_l1_ca_kf_tracking_cc_sptr;
|
||||
using gps_l1_ca_kf_tracking_cc_sptr = boost::shared_ptr<Gps_L1_Ca_Kf_Tracking_cc>;
|
||||
|
||||
gps_l1_ca_kf_tracking_cc_sptr
|
||||
gps_l1_ca_kf_make_tracking_cc(uint32_t order,
|
||||
@@ -62,7 +61,7 @@ gps_l1_ca_kf_make_tracking_cc(uint32_t order,
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
float dll_bw_hz,
|
||||
float early_late_space_chips,
|
||||
bool bce_run,
|
||||
uint32_t bce_ptrans,
|
||||
@@ -174,7 +173,7 @@ private:
|
||||
float* d_ca_code;
|
||||
float* d_local_code_shift_chips;
|
||||
gr_complex* d_correlator_outs;
|
||||
cpu_multicorrelator_real_codes multicorrelator_cpu;
|
||||
Cpu_Multicorrelator_Real_Codes multicorrelator_cpu;
|
||||
|
||||
// tracking vars
|
||||
double d_code_freq_chips;
|
||||
|
||||
@@ -37,19 +37,17 @@
|
||||
|
||||
#include "gps_l1_ca_tcp_connector_tracking_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tcp_communication.h"
|
||||
#include "tcp_packet_data.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
@@ -206,7 +204,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
T_prn_mod_samples = T_prn_mod_seconds * static_cast<float>(d_fs_in);
|
||||
|
||||
d_next_prn_length_samples = round(T_prn_mod_samples);
|
||||
d_next_prn_length_samples = std::round(T_prn_mod_samples);
|
||||
|
||||
float T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
float T_prn_true_samples = T_prn_true_seconds * static_cast<float>(d_fs_in);
|
||||
@@ -215,7 +213,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
float N_prn_diff;
|
||||
N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
float 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<float>(d_fs_in)), T_prn_true_samples);
|
||||
corrected_acq_phase_samples = std::fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<float>(d_fs_in)), T_prn_true_samples);
|
||||
if (corrected_acq_phase_samples < 0)
|
||||
{
|
||||
corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples;
|
||||
@@ -336,7 +334,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
float code_error = 0.0;
|
||||
float code_nco = 0.0;
|
||||
|
||||
tcp_packet_data tcp_data;
|
||||
Tcp_Packet_Data tcp_data;
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
|
||||
@@ -359,8 +357,8 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
float acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
acq_trk_shif_correction_samples = d_next_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_next_prn_length_samples));
|
||||
samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
acq_trk_shif_correction_samples = d_next_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_next_prn_length_samples));
|
||||
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
current_synchro_data.fs = d_fs_in;
|
||||
*out[0] = current_synchro_data;
|
||||
@@ -463,7 +461,10 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
}
|
||||
else
|
||||
{
|
||||
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 > FLAGS_max_lock_fail)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
class Gps_L1_Ca_Tcp_Connector_Tracking_cc;
|
||||
|
||||
typedef boost::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc> gps_l1_ca_tcp_connector_tracking_cc_sptr;
|
||||
using gps_l1_ca_tcp_connector_tracking_cc_sptr = boost::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc>;
|
||||
|
||||
gps_l1_ca_tcp_connector_tracking_cc_sptr
|
||||
gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
// correlator
|
||||
float *d_local_code_shift_chips;
|
||||
gr_complex *d_correlator_outs;
|
||||
cpu_multicorrelator multicorrelator_cpu;
|
||||
Cpu_Multicorrelator multicorrelator_cpu;
|
||||
|
||||
// tracking vars
|
||||
double d_code_freq_hz;
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
size_t d_port;
|
||||
int32_t d_listen_connection;
|
||||
float d_control_id;
|
||||
tcp_communication d_tcp_com;
|
||||
Tcp_Communication d_tcp_com;
|
||||
|
||||
//PRN period in samples
|
||||
int32_t d_current_prn_length_samples;
|
||||
|
||||
@@ -71,27 +71,45 @@ list(SORT TRACKING_LIB_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${TRACKING_LIB_HEADERS})
|
||||
|
||||
add_library(tracking_lib ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
|
||||
add_library(tracking_libs ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
|
||||
|
||||
target_link_libraries(tracking_lib
|
||||
target_link_libraries(tracking_libs
|
||||
PUBLIC
|
||||
Armadillo::armadillo
|
||||
Boost::boost
|
||||
Gnuradio::runtime
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
gnss_system_parameters
|
||||
core_system_parameters
|
||||
${OPT_TRACKING_LIBRARIES}
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
target_include_directories(tracking_lib
|
||||
target_include_directories(tracking_libs
|
||||
PUBLIC
|
||||
${OPT_TRACKING_INCLUDES}
|
||||
)
|
||||
|
||||
set_property(TARGET tracking_lib
|
||||
if(OS_IS_MACOSX)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang
|
||||
target_compile_definitions(tracking_libs
|
||||
PUBLIC
|
||||
-DBOOST_ASIO_HAS_STD_STRING_VIEW
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(tracking_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET tracking_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <cmath>
|
||||
|
||||
|
||||
cpu_multicorrelator::cpu_multicorrelator()
|
||||
Cpu_Multicorrelator::Cpu_Multicorrelator()
|
||||
{
|
||||
d_sig_in = nullptr;
|
||||
d_local_code_in = nullptr;
|
||||
@@ -49,16 +49,16 @@ cpu_multicorrelator::cpu_multicorrelator()
|
||||
}
|
||||
|
||||
|
||||
cpu_multicorrelator::~cpu_multicorrelator()
|
||||
Cpu_Multicorrelator::~Cpu_Multicorrelator()
|
||||
{
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
{
|
||||
cpu_multicorrelator::free();
|
||||
Cpu_Multicorrelator::free();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator::init(
|
||||
bool Cpu_Multicorrelator::init(
|
||||
int max_signal_length_samples,
|
||||
int n_correlators)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ bool cpu_multicorrelator::init(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator::set_local_code_and_taps(
|
||||
bool Cpu_Multicorrelator::set_local_code_and_taps(
|
||||
int code_length_chips,
|
||||
const std::complex<float>* local_code_in,
|
||||
float* shifts_chips)
|
||||
@@ -87,7 +87,7 @@ bool cpu_multicorrelator::set_local_code_and_taps(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in)
|
||||
bool Cpu_Multicorrelator::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in)
|
||||
{
|
||||
// Save CPU pointers
|
||||
d_sig_in = sig_in;
|
||||
@@ -96,7 +96,7 @@ bool cpu_multicorrelator::set_input_output_vectors(std::complex<float>* corr_out
|
||||
}
|
||||
|
||||
|
||||
void cpu_multicorrelator::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
|
||||
void Cpu_Multicorrelator::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
|
||||
{
|
||||
volk_gnsssdr_32fc_xn_resampler_32fc_xn(d_local_codes_resampled,
|
||||
d_local_code_in,
|
||||
@@ -109,7 +109,7 @@ void cpu_multicorrelator::update_local_code(int correlator_length_samples, float
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator::Carrier_wipeoff_multicorrelator_resampler(
|
||||
bool Cpu_Multicorrelator::Carrier_wipeoff_multicorrelator_resampler(
|
||||
float rem_carrier_phase_in_rad,
|
||||
float phase_step_rad,
|
||||
float rem_code_phase_chips,
|
||||
@@ -126,7 +126,7 @@ bool cpu_multicorrelator::Carrier_wipeoff_multicorrelator_resampler(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator::free()
|
||||
bool Cpu_Multicorrelator::free()
|
||||
{
|
||||
// Free memory
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
/*!
|
||||
* \brief Class that implements carrier wipe-off and correlators.
|
||||
*/
|
||||
class cpu_multicorrelator
|
||||
class Cpu_Multicorrelator
|
||||
{
|
||||
public:
|
||||
cpu_multicorrelator();
|
||||
~cpu_multicorrelator();
|
||||
Cpu_Multicorrelator();
|
||||
~Cpu_Multicorrelator();
|
||||
bool init(int max_signal_length_samples, int n_correlators);
|
||||
bool set_local_code_and_taps(int code_length_chips, const std::complex<float> *local_code_in, float *shifts_chips);
|
||||
bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <cmath>
|
||||
|
||||
|
||||
bool cpu_multicorrelator_16sc::init(
|
||||
bool Cpu_Multicorrelator_16sc::init(
|
||||
int max_signal_length_samples,
|
||||
int n_correlators)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ bool cpu_multicorrelator_16sc::init(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_16sc::set_local_code_and_taps(
|
||||
bool Cpu_Multicorrelator_16sc::set_local_code_and_taps(
|
||||
int code_length_chips,
|
||||
const lv_16sc_t* local_code_in,
|
||||
float* shifts_chips)
|
||||
@@ -66,7 +66,7 @@ bool cpu_multicorrelator_16sc::set_local_code_and_taps(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_16sc::set_input_output_vectors(lv_16sc_t* corr_out, const lv_16sc_t* sig_in)
|
||||
bool Cpu_Multicorrelator_16sc::set_input_output_vectors(lv_16sc_t* corr_out, const lv_16sc_t* sig_in)
|
||||
{
|
||||
// Save CPU pointers
|
||||
d_sig_in = sig_in;
|
||||
@@ -75,7 +75,7 @@ bool cpu_multicorrelator_16sc::set_input_output_vectors(lv_16sc_t* corr_out, con
|
||||
}
|
||||
|
||||
|
||||
void cpu_multicorrelator_16sc::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
|
||||
void Cpu_Multicorrelator_16sc::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
|
||||
{
|
||||
volk_gnsssdr_16ic_xn_resampler_16ic_xn(d_local_codes_resampled,
|
||||
d_local_code_in,
|
||||
@@ -88,7 +88,7 @@ void cpu_multicorrelator_16sc::update_local_code(int correlator_length_samples,
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler(
|
||||
bool Cpu_Multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler(
|
||||
float rem_carrier_phase_in_rad,
|
||||
float phase_step_rad,
|
||||
float rem_code_phase_chips,
|
||||
@@ -105,7 +105,7 @@ bool cpu_multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler(
|
||||
}
|
||||
|
||||
|
||||
cpu_multicorrelator_16sc::cpu_multicorrelator_16sc()
|
||||
Cpu_Multicorrelator_16sc::Cpu_Multicorrelator_16sc()
|
||||
{
|
||||
d_sig_in = nullptr;
|
||||
d_local_code_in = nullptr;
|
||||
@@ -117,16 +117,16 @@ cpu_multicorrelator_16sc::cpu_multicorrelator_16sc()
|
||||
}
|
||||
|
||||
|
||||
cpu_multicorrelator_16sc::~cpu_multicorrelator_16sc()
|
||||
Cpu_Multicorrelator_16sc::~Cpu_Multicorrelator_16sc()
|
||||
{
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
{
|
||||
cpu_multicorrelator_16sc::free();
|
||||
Cpu_Multicorrelator_16sc::free();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_16sc::free()
|
||||
bool Cpu_Multicorrelator_16sc::free()
|
||||
{
|
||||
// Free memory
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
/*!
|
||||
* \brief Class that implements carrier wipe-off and correlators.
|
||||
*/
|
||||
class cpu_multicorrelator_16sc
|
||||
class Cpu_Multicorrelator_16sc
|
||||
{
|
||||
public:
|
||||
cpu_multicorrelator_16sc();
|
||||
~cpu_multicorrelator_16sc();
|
||||
Cpu_Multicorrelator_16sc();
|
||||
~Cpu_Multicorrelator_16sc();
|
||||
bool init(int max_signal_length_samples, int n_correlators);
|
||||
bool set_local_code_and_taps(int code_length_chips, const lv_16sc_t *local_code_in, float *shifts_chips);
|
||||
bool set_input_output_vectors(lv_16sc_t *corr_out, const lv_16sc_t *sig_in);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
|
||||
cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes()
|
||||
Cpu_Multicorrelator_Real_Codes::Cpu_Multicorrelator_Real_Codes()
|
||||
{
|
||||
d_sig_in = nullptr;
|
||||
d_local_code_in = nullptr;
|
||||
@@ -50,16 +50,16 @@ cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes()
|
||||
}
|
||||
|
||||
|
||||
cpu_multicorrelator_real_codes::~cpu_multicorrelator_real_codes()
|
||||
Cpu_Multicorrelator_Real_Codes::~Cpu_Multicorrelator_Real_Codes()
|
||||
{
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
{
|
||||
cpu_multicorrelator_real_codes::free();
|
||||
Cpu_Multicorrelator_Real_Codes::free();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_real_codes::init(
|
||||
bool Cpu_Multicorrelator_Real_Codes::init(
|
||||
int max_signal_length_samples,
|
||||
int n_correlators)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ bool cpu_multicorrelator_real_codes::init(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_real_codes::set_local_code_and_taps(
|
||||
bool Cpu_Multicorrelator_Real_Codes::set_local_code_and_taps(
|
||||
int code_length_chips,
|
||||
const float* local_code_in,
|
||||
float* shifts_chips)
|
||||
@@ -89,7 +89,7 @@ bool cpu_multicorrelator_real_codes::set_local_code_and_taps(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_real_codes::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in)
|
||||
bool Cpu_Multicorrelator_Real_Codes::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in)
|
||||
{
|
||||
// Save CPU pointers
|
||||
d_sig_in = sig_in;
|
||||
@@ -98,7 +98,7 @@ bool cpu_multicorrelator_real_codes::set_input_output_vectors(std::complex<float
|
||||
}
|
||||
|
||||
|
||||
void cpu_multicorrelator_real_codes::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips)
|
||||
void Cpu_Multicorrelator_Real_Codes::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips)
|
||||
{
|
||||
if (d_use_high_dynamics_resampler)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ void cpu_multicorrelator_real_codes::update_local_code(int correlator_length_sam
|
||||
}
|
||||
|
||||
// Overload Carrier_wipeoff_multicorrelator_resampler to ensure back compatibility
|
||||
bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler(
|
||||
bool Cpu_Multicorrelator_Real_Codes::Carrier_wipeoff_multicorrelator_resampler(
|
||||
float rem_carrier_phase_in_rad,
|
||||
float phase_step_rad,
|
||||
float phase_rate_step_rad,
|
||||
@@ -151,7 +151,7 @@ bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler(
|
||||
return true;
|
||||
}
|
||||
// Overload Carrier_wipeoff_multicorrelator_resampler to ensure back compatibility
|
||||
bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler(
|
||||
bool Cpu_Multicorrelator_Real_Codes::Carrier_wipeoff_multicorrelator_resampler(
|
||||
float rem_carrier_phase_in_rad,
|
||||
float phase_step_rad,
|
||||
float rem_code_phase_chips,
|
||||
@@ -169,7 +169,7 @@ bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler(
|
||||
}
|
||||
|
||||
|
||||
bool cpu_multicorrelator_real_codes::free()
|
||||
bool Cpu_Multicorrelator_Real_Codes::free()
|
||||
{
|
||||
// Free memory
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
@@ -185,7 +185,7 @@ bool cpu_multicorrelator_real_codes::free()
|
||||
}
|
||||
|
||||
|
||||
void cpu_multicorrelator_real_codes::set_high_dynamics_resampler(
|
||||
void Cpu_Multicorrelator_Real_Codes::set_high_dynamics_resampler(
|
||||
bool use_high_dynamics_resampler)
|
||||
{
|
||||
d_use_high_dynamics_resampler = use_high_dynamics_resampler;
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
/*!
|
||||
* \brief Class that implements carrier wipe-off and correlators.
|
||||
*/
|
||||
class cpu_multicorrelator_real_codes
|
||||
class Cpu_Multicorrelator_Real_Codes
|
||||
{
|
||||
public:
|
||||
cpu_multicorrelator_real_codes();
|
||||
Cpu_Multicorrelator_Real_Codes();
|
||||
void set_high_dynamics_resampler(bool use_high_dynamics_resampler);
|
||||
~cpu_multicorrelator_real_codes();
|
||||
~Cpu_Multicorrelator_Real_Codes();
|
||||
bool init(int max_signal_length_samples, int n_correlators);
|
||||
bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips);
|
||||
bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
tcp_communication::tcp_communication() : tcp_socket_(io_service_) {} // NOLINT
|
||||
Tcp_Communication::Tcp_Communication() : tcp_socket_(io_service_) {} // NOLINT
|
||||
|
||||
|
||||
tcp_communication::~tcp_communication() = default;
|
||||
Tcp_Communication::~Tcp_Communication() = default;
|
||||
|
||||
|
||||
int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
int Tcp_Communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -73,7 +73,7 @@ int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
}
|
||||
|
||||
|
||||
void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, tcp_packet_data* tcp_data_)
|
||||
void Tcp_Communication::send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, Tcp_Packet_Data* tcp_data_)
|
||||
{
|
||||
int controlc = 0;
|
||||
boost::array<float, NUM_RX_VARIABLES> readbuf;
|
||||
@@ -108,7 +108,7 @@ void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, N
|
||||
}
|
||||
|
||||
|
||||
void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, tcp_packet_data* tcp_data_)
|
||||
void Tcp_Communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, Tcp_Packet_Data* tcp_data_)
|
||||
{
|
||||
int controlc = 0;
|
||||
boost::array<float, NUM_RX_VARIABLES> readbuf;
|
||||
@@ -143,7 +143,7 @@ void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NU
|
||||
}
|
||||
|
||||
|
||||
void tcp_communication::close_tcp_connection(size_t d_port_)
|
||||
void Tcp_Communication::close_tcp_connection(size_t d_port_)
|
||||
{
|
||||
// Close the TCP connection
|
||||
tcp_socket_.close();
|
||||
|
||||
@@ -43,15 +43,15 @@
|
||||
/*!
|
||||
* \brief TCP communication class
|
||||
*/
|
||||
class tcp_communication
|
||||
class Tcp_Communication
|
||||
{
|
||||
public:
|
||||
tcp_communication();
|
||||
~tcp_communication();
|
||||
Tcp_Communication();
|
||||
~Tcp_Communication();
|
||||
|
||||
int listen_tcp_connection(size_t d_port_, size_t d_port_ch0_);
|
||||
void send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, tcp_packet_data *tcp_data_);
|
||||
void send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, tcp_packet_data *tcp_data_);
|
||||
void send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, Tcp_Packet_Data *tcp_data_);
|
||||
void send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, Tcp_Packet_Data *tcp_data_);
|
||||
void close_tcp_connection(size_t d_port_);
|
||||
|
||||
private:
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
*/
|
||||
#include "tcp_packet_data.h"
|
||||
|
||||
tcp_packet_data::tcp_packet_data()
|
||||
Tcp_Packet_Data::Tcp_Packet_Data()
|
||||
{
|
||||
proc_pack_code_error = 0;
|
||||
proc_pack_carr_error = 0;
|
||||
proc_pack_carrier_doppler_hz = 0;
|
||||
}
|
||||
|
||||
tcp_packet_data::~tcp_packet_data() = default;
|
||||
Tcp_Packet_Data::~Tcp_Packet_Data() = default;
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
/*!
|
||||
* \brief Class that implements a TCP data packet
|
||||
*/
|
||||
class tcp_packet_data
|
||||
class Tcp_Packet_Data
|
||||
{
|
||||
public:
|
||||
tcp_packet_data();
|
||||
~tcp_packet_data();
|
||||
Tcp_Packet_Data();
|
||||
~Tcp_Packet_Data();
|
||||
float proc_pack_code_error;
|
||||
float proc_pack_carr_error;
|
||||
float proc_pack_carrier_doppler_hz;
|
||||
|
||||
@@ -64,7 +64,7 @@ double fll_four_quadrant_atan(gr_complex prompt_s1, gr_complex prompt_s2, double
|
||||
*/
|
||||
double pll_four_quadrant_atan(gr_complex prompt_s1)
|
||||
{
|
||||
return atan2(prompt_s1.imag(), prompt_s1.real());
|
||||
return static_cast<double>(std::atan2(prompt_s1.imag(), prompt_s1.real()));
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1)
|
||||
{
|
||||
if (prompt_s1.real() != 0.0)
|
||||
{
|
||||
return atan(prompt_s1.imag() / prompt_s1.real());
|
||||
return static_cast<double>(std::atan(prompt_s1.imag() / prompt_s1.real()));
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user