mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
9094f4b4f5
@ -121,7 +121,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
//std::map<int, int> rtcm_msg_rate_ms;
|
||||
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms;
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms;
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms;
|
||||
@ -644,7 +644,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
If the baseline length is very short like 1 m, the iteration may be effective to handle
|
||||
the nonlinearity of measurement equation. */
|
||||
|
||||
/// Statistics
|
||||
// Statistics
|
||||
double bias_0 = configuration->property(role + ".bias_0", 30.0);
|
||||
|
||||
double iono_0 = configuration->property(role + ".iono_0", 0.03);
|
||||
|
@ -175,9 +175,9 @@ int Nmea_Printer::init_serial(const std::string& serial_device)
|
||||
* Opens the serial device and sets the default baud rate for a NMEA transmission (9600,8,N,1)
|
||||
*/
|
||||
int fd = 0;
|
||||
struct termios options
|
||||
{
|
||||
};
|
||||
// clang-format off
|
||||
struct termios options{};
|
||||
// clang-format on
|
||||
int64_t BAUD;
|
||||
int64_t DATABITS;
|
||||
int64_t STOPBITS;
|
||||
|
@ -1379,7 +1379,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
||||
{
|
||||
line += std::string("N: GNSS NAV DATA");
|
||||
line += std::string(4, ' ');
|
||||
//! \todo Add here other systems...
|
||||
//todo Add here other systems...
|
||||
line += std::string("G: GPS");
|
||||
line += std::string(14, ' ');
|
||||
// ...
|
||||
@ -1744,7 +1744,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
|
||||
{
|
||||
line += std::string("N: GNSS NAV DATA");
|
||||
line += std::string(4, ' ');
|
||||
//! \todo Add here other systems...
|
||||
//todo: Add here other systems...
|
||||
line += std::string("F: BDS");
|
||||
line += std::string(14, ' ');
|
||||
// ...
|
||||
@ -11771,7 +11771,7 @@ int32_t Rinex_Printer::signalStrength(const double snr)
|
||||
boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Message& nav_msg)
|
||||
{
|
||||
// if we are processing a file -> wait to leap second to resolve the ambiguity else take the week from the local system time
|
||||
//: idea resolve the ambiguity with the leap second http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm
|
||||
// idea: resolve the ambiguity with the leap second http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm
|
||||
const double utc_t = nav_msg.utc_time(nav_msg.d_TOW);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
||||
if (nav_msg.i_GPS_week < 512)
|
||||
|
@ -1887,13 +1887,13 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
index += 1;
|
||||
if (glonass_gnav_alm_health)
|
||||
{
|
||||
} //Avoid comiler warning
|
||||
} // Avoid compiler warning
|
||||
|
||||
glonass_gnav_alm_health_ind = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
if (glonass_gnav_alm_health_ind)
|
||||
{
|
||||
} //Avoid comiler warning
|
||||
} // Avoid compiler warning
|
||||
|
||||
glonass_gnav_eph.d_P_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 2)));
|
||||
glonass_gnav_eph.d_P_1 = (glonass_gnav_eph.d_P_1 + 1) * 15;
|
||||
|
@ -384,7 +384,9 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
* Opens the serial device and sets the default baud rate for a RTCM transmission (9600,8,N,1)
|
||||
*/
|
||||
int32_t fd = 0;
|
||||
// clang-format off
|
||||
struct termios options{};
|
||||
// clang-format on
|
||||
int64_t BAUD;
|
||||
int64_t DATABITS;
|
||||
int64_t STOPBITS;
|
||||
|
@ -94,7 +94,6 @@ Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_flag_dump_enabled = flag_dump_to_file;
|
||||
d_flag_dump_mat_enabled = flag_dump_to_mat;
|
||||
count_valid_position = 0;
|
||||
this->set_averaging_flag(false);
|
||||
rtk_ = rtk;
|
||||
|
||||
@ -443,9 +442,9 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
int valid_obs = 0; // valid observations counter
|
||||
int glo_valid_obs = 0; // GLONASS L1/L2 valid observations counter
|
||||
|
||||
std::array<obsd_t, MAXOBS> obs_data{};
|
||||
std::vector<eph_t> eph_data(MAXOBS);
|
||||
std::vector<geph_t> geph_data(MAXOBS);
|
||||
obs_data.fill({});
|
||||
eph_data.fill({});
|
||||
geph_data.fill({});
|
||||
|
||||
// Workaround for NAV/CNAV clash problem
|
||||
bool gps_dual_band = false;
|
||||
@ -914,7 +913,13 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
}
|
||||
|
||||
/* update carrier wave length using native function call in RTKlib */
|
||||
uniqnav(&nav_data);
|
||||
for (int i = 0; i < MAXSAT; i++)
|
||||
{
|
||||
for (int j = 0; j < NFREQ; j++)
|
||||
{
|
||||
nav_data.lam[i][j] = satwavelen(i + 1, j, &nav_data);
|
||||
}
|
||||
}
|
||||
|
||||
result = rtkpos(&rtk_, obs_data.data(), valid_obs + glo_valid_obs, &nav_data);
|
||||
|
||||
|
@ -126,8 +126,6 @@ public:
|
||||
Beidou_Dnav_Iono beidou_dnav_iono;
|
||||
std::map<int, Beidou_Dnav_Almanac> beidou_dnav_almanac_map;
|
||||
|
||||
int count_valid_position;
|
||||
|
||||
private:
|
||||
rtk_t rtk_{};
|
||||
std::string d_dump_filename;
|
||||
@ -137,6 +135,9 @@ private:
|
||||
bool d_flag_dump_mat_enabled;
|
||||
int d_nchannels; // Number of available channels for positioning
|
||||
std::array<double, 4> dop_{};
|
||||
std::array<obsd_t, MAXOBS> obs_data{};
|
||||
std::array<eph_t, MAXOBS> eph_data{};
|
||||
std::array<geph_t, MAXOBS> geph_data{};
|
||||
Monitor_Pvt monitor_pvt{};
|
||||
};
|
||||
|
||||
|
@ -98,6 +98,7 @@ target_link_libraries(acquisition_adapters
|
||||
algorithms_libs
|
||||
gnss_sdr_flags
|
||||
acquisition_gr_blocks
|
||||
acquisition_libs
|
||||
channel_libs
|
||||
core_system_parameters
|
||||
Gnuradio::blocks
|
||||
@ -108,7 +109,6 @@ target_link_libraries(acquisition_adapters
|
||||
Glog::glog
|
||||
Gnuradio::fft
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
acquisition_libs
|
||||
)
|
||||
|
||||
target_include_directories(acquisition_adapters
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -212,6 +212,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_st
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -396,6 +397,7 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_right_block()
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||
{
|
||||
acquisition_->set_resampler_latency(latency_samples);
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
@ -116,13 +115,13 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
{
|
||||
// set local signal generator to Galileo E1 pilot component (1C)
|
||||
std::array<char, 3> pilot_signal = {{'1', 'C', '\0'}};
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), pilot_signal,
|
||||
galileo_e1_code_gen_complex_sampled(code, pilot_signal,
|
||||
cboc, PRN, fs_in, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::array<char, 3> data_signal = {{'1', 'B', '\0'}};
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), data_signal,
|
||||
galileo_e1_code_gen_complex_sampled(code, data_signal,
|
||||
cboc, PRN, fs_in, 0, false);
|
||||
}
|
||||
|
||||
@ -213,6 +212,7 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_step(unsigned int dopple
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -220,6 +220,7 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_center(int doppler_cente
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -186,7 +186,6 @@ signed int GalileoE1PcpsCccwsrAmbiguousAcquisition::mag()
|
||||
void GalileoE1PcpsCccwsrAmbiguousAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -199,12 +198,12 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code()
|
||||
|
||||
std::array<char, 3> signal = {{'1', 'B', '\0'}};
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<gr_complex>(code_data_.data(), vector_length_), signal,
|
||||
galileo_e1_code_gen_complex_sampled(code_data_, signal,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
std::array<char, 3> signal_C = {{'1', 'C', '\0'}};
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<gr_complex>(code_pilot_.data(), vector_length_), signal_C,
|
||||
galileo_e1_code_gen_complex_sampled(code_pilot_, signal_C,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
acquisition_cc_->set_local_code(code_data_.data(), code_pilot_.data());
|
||||
|
@ -209,7 +209,6 @@ signed int GalileoE5aNoncoherentIQAcquisitionCaf::mag()
|
||||
void GalileoE5aNoncoherentIQAcquisitionCaf::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -223,17 +222,17 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
||||
if (gnss_synchro_->Signal[0] == '5' && gnss_synchro_->Signal[1] == 'X')
|
||||
{
|
||||
std::array<char, 3> a = {{'5', 'I', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(codeI.data(), code_length_), a,
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI, a,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
std::array<char, 3> b = {{'5', 'Q', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(codeQ.data(), code_length_), b,
|
||||
galileo_e5_a_code_gen_complex_sampled(codeQ, b,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::array<char, 3> signal_type_ = {{'5', 'X', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(codeI.data(), code_length_), signal_type_,
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI, signal_type_,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
}
|
||||
// WARNING: 3ms are coherently integrated. Secondary sequence (1,1,1)
|
||||
|
@ -85,7 +85,6 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters_.blocking = blocking_;
|
||||
|
||||
|
||||
acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
||||
if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex")
|
||||
{
|
||||
@ -351,6 +350,7 @@ gr::basic_block_sptr GalileoE5aPcpsAcquisition::get_right_block()
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||
{
|
||||
acquisition_->set_resampler_latency(latency_samples);
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
@ -128,7 +127,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
signal_[1] = 'I';
|
||||
}
|
||||
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), signal_, PRN, fs_in, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, PRN, fs_in, 0);
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
@ -216,6 +215,7 @@ void GalileoE5aPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -223,6 +223,7 @@ void GalileoE5aPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -151,13 +151,12 @@ signed int GpsL1CaPcpsAcquisitionFineDoppler::mag()
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::set_local_code()
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code_.data(), vector_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -103,7 +102,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
// temporary maxima search
|
||||
for (uint32_t PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), PRN, fs_in, 0); // generate PRN code
|
||||
gps_l1_ca_code_gen_complex_sampled(code, PRN, fs_in, 0); // generate PRN code
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
@ -192,6 +191,7 @@ void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -199,6 +199,7 @@ void GpsL1CaPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -143,15 +143,16 @@ signed int GpsL1CaPcpsAssistedAcquisition::mag()
|
||||
void GpsL1CaPcpsAssistedAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAssistedAcquisition::set_local_code()
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<gr_complex>(code_.get(), vector_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
acquisition_cc_->set_local_code(code_.get());
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAssistedAcquisition::reset()
|
||||
{
|
||||
acquisition_cc_->set_active(true);
|
||||
|
@ -198,7 +198,6 @@ signed int GpsL1CaPcpsOpenClAcquisition::mag()
|
||||
void GpsL1CaPcpsOpenClAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -233,7 +232,6 @@ void GpsL1CaPcpsOpenClAcquisition::reset()
|
||||
float GpsL1CaPcpsOpenClAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
// Calculate the threshold
|
||||
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -224,7 +224,6 @@ signed int GpsL1CaPcpsQuickSyncAcquisition::mag()
|
||||
void GpsL1CaPcpsQuickSyncAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,7 +186,6 @@ signed int GpsL1CaPcpsTongAcquisition::mag()
|
||||
void GpsL1CaPcpsTongAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -211,6 +211,7 @@ void GpsL2MPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -218,6 +219,7 @@ void GpsL2MPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
acquisition_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -235,7 +237,6 @@ signed int GpsL2MPcpsAcquisition::mag()
|
||||
void GpsL2MPcpsAcquisition::init()
|
||||
{
|
||||
acquisition_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,7 +105,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), PRN, fs_in_);
|
||||
gps_l2c_m_code_gen_complex_sampled(code, PRN, fs_in_);
|
||||
// fill in zero padding
|
||||
for (unsigned int s = code_length; s < nsamples_total; s++)
|
||||
{
|
||||
@ -204,7 +204,6 @@ signed int GpsL2MPcpsAcquisitionFpga::mag()
|
||||
void GpsL2MPcpsAcquisitionFpga::init()
|
||||
{
|
||||
acquisition_fpga_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
|
@ -206,6 +206,7 @@ void GpsL5iPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -213,6 +214,7 @@ void GpsL5iPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
acquisition_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "GPS_L5.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
@ -107,7 +106,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
|
||||
for (uint32_t PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l5i_code_gen_complex_sampled(gsl::span<gr_complex>(code.data(), nsamples_total), PRN, fs_in);
|
||||
gps_l5i_code_gen_complex_sampled(code, PRN, fs_in);
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
@ -196,6 +195,7 @@ void GpsL5iPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -203,6 +203,7 @@ void GpsL5iPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -221,6 +222,7 @@ void GpsL5iPcpsAcquisitionFpga::init()
|
||||
acquisition_fpga_->init();
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_local_code()
|
||||
{
|
||||
acquisition_fpga_->set_local_code();
|
||||
|
@ -36,6 +36,7 @@
|
||||
#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -236,6 +236,8 @@ void Channel::assist_acquisition_doppler(double Carrier_Doppler_hz)
|
||||
{
|
||||
acq_->set_doppler_center(static_cast<int>(Carrier_Doppler_hz));
|
||||
}
|
||||
|
||||
|
||||
void Channel::start_acquisition()
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
|
@ -152,10 +152,10 @@ void beidou_b1i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u
|
||||
const int32_t _codeFreqBasis = 2046000; // Hz
|
||||
const int32_t _codeLength = 2046;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
|
||||
@ -163,18 +163,17 @@ void beidou_b1i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read C/A code values -------------------------
|
||||
// --- Make index array to read C/A code values --------------------
|
||||
// The length of the index array depends on the sampling frequency -
|
||||
// number of samples per millisecond (because one C/A code period is one
|
||||
// millisecond).
|
||||
|
||||
// _codeValueIndex = ceil((_ts * ((float)i + 1)) / _tc) - 1;
|
||||
aux = (_ts * (i + 1)) / _tc;
|
||||
_codeValueIndex = auxCeil(aux) - 1;
|
||||
|
||||
//--- Make the digitized version of the C/A code -----------------------
|
||||
// --- Make the digitized version of the C/A code ------------------
|
||||
// The "upsampled" code is made by selecting values form the CA code
|
||||
// chip array (caCode) for the time instances of each sample.
|
||||
if (i == _samplesPerCode - 1)
|
||||
|
@ -214,19 +214,19 @@ void beidou_b3i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u
|
||||
const int32_t _codeFreqBasis = 10230000; // Hz
|
||||
const int32_t _codeLength = 10230;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
beidou_b3i_code_gen_complex(_code, _prn, _chip_shift); // generate C/A code 1 sample per chip
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read C/A code values -------------------------
|
||||
// --- Make index array to read C/A code values --------------------
|
||||
// The length of the index array depends on the sampling frequency -
|
||||
// number of samples per millisecond (because one C/A code period is one
|
||||
// millisecond).
|
||||
@ -234,7 +234,7 @@ void beidou_b3i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u
|
||||
aux = (_ts * (i + 1)) / _tc;
|
||||
_codeValueIndex = auxCeil(aux) - 1;
|
||||
|
||||
//--- Make the digitized version of the C/A code -----------------------
|
||||
// --- Make the digitized version of the C/A code ------------------
|
||||
// The "upsampled" code is made by selecting values form the CA code
|
||||
// chip array (caCode) for the time instances of each sample.
|
||||
if (i == _samplesPerCode - 1)
|
||||
|
@ -112,10 +112,10 @@ void glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest
|
||||
const int32_t _codeFreqBasis = 511000; // Hz
|
||||
const int32_t _codeLength = 511;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
|
||||
@ -123,9 +123,9 @@ void glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read C/A code values -------------------------
|
||||
// --- Make index array to read C/A code values --------------------
|
||||
// The length of the index array depends on the sampling frequency -
|
||||
// number of samples per millisecond (because one C/A code period is one
|
||||
// millisecond).
|
||||
@ -133,7 +133,7 @@ void glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest
|
||||
aux = (_ts * (i + 1)) / _tc;
|
||||
_codeValueIndex = auxCeil(aux) - 1;
|
||||
|
||||
//--- Make the digitized version of the C/A code -----------------------
|
||||
// --- Make the digitized version of the C/A code ------------------
|
||||
// The "upsampled" code is made by selecting values form the CA code
|
||||
// chip array (caCode) for the time instances of each sample.
|
||||
if (i == _samplesPerCode - 1)
|
||||
|
@ -112,10 +112,10 @@ void glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest
|
||||
const int32_t _codeFreqBasis = 511000; // Hz
|
||||
const int32_t _codeLength = 511;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
|
||||
@ -123,9 +123,9 @@ void glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read C/A code values -------------------------
|
||||
// --- Make index array to read C/A code values --------------------
|
||||
// The length of the index array depends on the sampling frequency -
|
||||
// number of samples per millisecond (because one C/A code period is one
|
||||
// millisecond).
|
||||
@ -133,7 +133,7 @@ void glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest
|
||||
aux = (_ts * (i + 1)) / _tc;
|
||||
_codeValueIndex = auxCeil(aux) - 1;
|
||||
|
||||
//--- Make the digitized version of the C/A code -----------------------
|
||||
// --- Make the digitized version of the C/A code ------------------
|
||||
// The "upsampled" code is made by selecting values form the CA code
|
||||
// chip array (caCode) for the time instances of each sample.
|
||||
if (i == _samplesPerCode - 1)
|
||||
|
@ -41,17 +41,17 @@ template <class T>
|
||||
class Gnss_circular_deque
|
||||
{
|
||||
public:
|
||||
Gnss_circular_deque(); // Default constructor
|
||||
Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann); // nchann = number of channels; max_size = channel capacity
|
||||
unsigned int size(const unsigned int ch); // Returns the number of available elements in a channel
|
||||
T& at(const unsigned int ch, const unsigned int pos); // Returns a reference to an element
|
||||
T& front(const unsigned int ch); // Returns a reference to the first element in the deque
|
||||
T& back(const unsigned int ch); // Returns a reference to the last element in the deque
|
||||
void push_back(const unsigned int ch, const T& new_data); // Inserts an element at the end of the deque
|
||||
void pop_front(const unsigned int ch); // Removes the first element of the deque
|
||||
void clear(const unsigned int ch); // Removes all the elements of the deque (Sets size to 0). Capacity is not modified
|
||||
void reset(const unsigned int max_size, const unsigned int nchann); // Removes all the elements in all the channels. Re-sets the number of channels and their capacity
|
||||
void reset(); // Removes all the channels (Sets nchann to 0)
|
||||
Gnss_circular_deque(); //!< Default constructor
|
||||
Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann); //!< nchann = number of channels; max_size = channel capacity
|
||||
unsigned int size(const unsigned int ch); //!< Returns the number of available elements in a channel
|
||||
T& at(const unsigned int ch, const unsigned int pos); //!< Returns a reference to an element
|
||||
T& front(const unsigned int ch); //!< Returns a reference to the first element in the deque
|
||||
T& back(const unsigned int ch); //!< Returns a reference to the last element in the deque
|
||||
void push_back(const unsigned int ch, const T& new_data); //!< Inserts an element at the end of the deque
|
||||
void pop_front(const unsigned int ch); //!< Removes the first element of the deque
|
||||
void clear(const unsigned int ch); //!< Removes all the elements of the deque (Sets size to 0). Capacity is not modified
|
||||
void reset(const unsigned int max_size, const unsigned int nchann); //!< Removes all the elements in all the channels. Re-sets the number of channels and their capacity
|
||||
void reset(); //!< Removes all the channels (Sets nchann to 0)
|
||||
|
||||
private:
|
||||
std::vector<boost::circular_buffer<T>> d_data;
|
||||
@ -64,18 +64,21 @@ Gnss_circular_deque<T>::Gnss_circular_deque()
|
||||
reset();
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
Gnss_circular_deque<T>::Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann)
|
||||
{
|
||||
reset(max_size, nchann);
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
unsigned int Gnss_circular_deque<T>::size(const unsigned int ch)
|
||||
{
|
||||
return d_data.at(ch).size();
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
T& Gnss_circular_deque<T>::back(const unsigned int ch)
|
||||
{
|
||||
@ -96,12 +99,14 @@ T& Gnss_circular_deque<T>::at(const unsigned int ch, const unsigned int pos)
|
||||
return d_data.at(ch).at(pos);
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void Gnss_circular_deque<T>::clear(const unsigned int ch)
|
||||
{
|
||||
d_data.at(ch).clear();
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void Gnss_circular_deque<T>::reset(const unsigned int max_size, const unsigned int nchann)
|
||||
{
|
||||
@ -115,18 +120,21 @@ void Gnss_circular_deque<T>::reset(const unsigned int max_size, const unsigned i
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void Gnss_circular_deque<T>::reset()
|
||||
{
|
||||
d_data.clear();
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void Gnss_circular_deque<T>::pop_front(const unsigned int ch)
|
||||
{
|
||||
d_data.at(ch).pop_front();
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void Gnss_circular_deque<T>::push_back(const unsigned int ch, const T& new_data)
|
||||
{
|
||||
|
@ -165,13 +165,13 @@ void resampler(const gsl::span<float> _from, gsl::span<float> _dest, float _fs_i
|
||||
{
|
||||
uint32_t _codeValueIndex;
|
||||
float aux;
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
const float _t_in = 1 / _fs_in; // Incoming sampling period in sec
|
||||
const float _t_out = 1 / _fs_out; // Out sampling period in sec
|
||||
for (uint32_t i = 0; i < _dest.size() - 1; i++)
|
||||
{
|
||||
//=== Digitizing ===================================================
|
||||
//--- compute index array to read sampled values -------------------
|
||||
// === Digitizing ==================================================
|
||||
// --- compute index array to read sampled values ------------------
|
||||
aux = (_t_out * (i + 1)) / _t_in;
|
||||
_codeValueIndex = auxCeil2(aux) - 1;
|
||||
|
||||
@ -188,13 +188,13 @@ void resampler(gsl::span<const std::complex<float>> _from, gsl::span<std::comple
|
||||
{
|
||||
uint32_t _codeValueIndex;
|
||||
float aux;
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
const float _t_in = 1 / _fs_in; // Incoming sampling period in sec
|
||||
const float _t_out = 1 / _fs_out; // Out sampling period in sec
|
||||
for (uint32_t i = 0; i < _dest.size() - 1; i++)
|
||||
{
|
||||
//=== Digitizing ===================================================
|
||||
//--- compute index array to read sampled values -------------------
|
||||
// === Digitizing ==================================================
|
||||
// --- compute index array to read sampled values ------------------
|
||||
aux = (_t_out * (i + 1)) / _t_in;
|
||||
_codeValueIndex = auxCeil2(aux) - 1;
|
||||
|
||||
|
@ -101,21 +101,21 @@ void gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui
|
||||
float _tc;
|
||||
const int32_t _codeLength = GPS_L2_M_CODE_LENGTH_CHIPS;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L2_M_CODE_RATE_HZ); // L2C chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read L2C code values -------------------------
|
||||
// --- Make index array to read L2C code values --------------------
|
||||
_codeValueIndex = std::ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
|
||||
//--- Make the digitized version of the L2C code -----------------------
|
||||
// --- Make the digitized version of the L2C code ------------------
|
||||
if (i == _samplesPerCode - 1)
|
||||
{
|
||||
// --- Correct the last index (due to number rounding issues) -----------
|
||||
|
@ -218,21 +218,21 @@ void gps_l5i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint
|
||||
float _tc;
|
||||
const int32_t _codeLength = GPS_L5I_CODE_LENGTH_CHIPS;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_HZ); // L5I primary chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read L5 code values -------------------------
|
||||
// --- Make index array to read L5 code values ---------------------
|
||||
_codeValueIndex = static_cast<int32_t>(std::ceil(_ts * static_cast<float>(i + 1) / _tc)) - 1;
|
||||
|
||||
//--- Make the digitized version of the L5I code -----------------------
|
||||
// --- Make the digitized version of the L5I code ------------------
|
||||
if (i == _samplesPerCode - 1)
|
||||
{
|
||||
// --- Correct the last index (due to number rounding issues) -----------
|
||||
@ -292,21 +292,21 @@ void gps_l5q_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint
|
||||
float _tc;
|
||||
const int32_t _codeLength = GPS_L5Q_CODE_LENGTH_CHIPS;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_HZ); // L5Q chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read L5 code values -------------------------
|
||||
// --- Make index array to read L5 code values ---------------------
|
||||
_codeValueIndex = static_cast<int32_t>(std::ceil(_ts * static_cast<float>(i + 1) / _tc)) - 1;
|
||||
|
||||
//--- Make the digitized version of the L5Q code -----------------------
|
||||
// --- Make the digitized version of the L5Q code ------------------
|
||||
if (i == _samplesPerCode - 1)
|
||||
{
|
||||
// --- Correct the last index (due to number rounding issues) -----------
|
||||
|
@ -162,19 +162,19 @@ void gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui
|
||||
const int32_t _codeFreqBasis = 1023000; // Hz
|
||||
const int32_t _codeLength = 1023;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
gps_l1_ca_code_gen_complex(_code, _prn, _chip_shift); // generate C/A code 1 sample per chip
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing ===================================================
|
||||
// === Digitizing ==================================================
|
||||
|
||||
//--- Make index array to read C/A code values ---------------------
|
||||
// --- Make index array to read C/A code values --------------------
|
||||
// The length of the index array depends on the sampling frequency -
|
||||
// number of samples per millisecond (because one C/A code period is one
|
||||
// millisecond).
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <iostream> // for cerr, cout
|
||||
#include <limits> // for numeric_limits
|
||||
#include <utility> // for move
|
||||
#include <vector> // for vector
|
||||
|
||||
#if HAS_STD_FILESYSTEM
|
||||
#include <system_error>
|
||||
@ -475,7 +476,7 @@ void hybrid_observables_gs::update_TOW(const std::vector<Gnss_Synchro> &data)
|
||||
std::vector<Gnss_Synchro>::const_iterator it;
|
||||
if (!T_rx_TOW_set)
|
||||
{
|
||||
//uint32_t TOW_ref = std::numeric_limits<uint32_t>::max();
|
||||
// int32_t TOW_ref = std::numeric_limits<uint32_t>::max();
|
||||
uint32_t TOW_ref = 0U;
|
||||
for (it = data.cbegin(); it != data.cend(); it++)
|
||||
{
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include <cstdint> // for int32_t
|
||||
#include <fstream> // for string, ofstream
|
||||
#include <memory> // for shared_ptr
|
||||
#include <vector> // for vector
|
||||
|
||||
class Gnss_Synchro;
|
||||
class hybrid_observables_gs;
|
||||
|
@ -85,7 +85,9 @@ private:
|
||||
int fifo_items;
|
||||
int d_sock_raw;
|
||||
int d_udp_port;
|
||||
// clang-format off
|
||||
struct sockaddr_in si_me{};
|
||||
// clang-format on
|
||||
std::string d_src_device;
|
||||
std::string d_origin_address;
|
||||
int d_udp_payload_size;
|
||||
|
@ -287,7 +287,7 @@ void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satell
|
||||
// Update satellite information for DNAV decoder
|
||||
sat_prn = d_satellite.get_PRN();
|
||||
d_nav.i_satellite_PRN = sat_prn;
|
||||
d_nav.i_signal_type = 1; //!< BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q)
|
||||
d_nav.i_signal_type = 1; // BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q)
|
||||
|
||||
// Update tel dec parameters for D2 NAV Messages
|
||||
if (sat_prn > 0 and sat_prn < 6)
|
||||
|
@ -387,6 +387,7 @@ void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::reset()
|
||||
{
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
@ -397,6 +398,7 @@ void beidou_b3i_telemetry_decoder_gs::reset()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int beidou_b3i_telemetry_decoder_gs::general_work(
|
||||
int noutput_items __attribute__((unused)),
|
||||
gr_vector_int &ninput_items __attribute__((unused)),
|
||||
|
@ -46,8 +46,9 @@
|
||||
#define LMORE 5 //
|
||||
|
||||
|
||||
sbas_l1_telemetry_decoder_gs_sptr
|
||||
sbas_l1_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
|
||||
sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
|
||||
const Gnss_Satellite &satellite,
|
||||
bool dump)
|
||||
{
|
||||
return sbas_l1_telemetry_decoder_gs_sptr(new sbas_l1_telemetry_decoder_gs(satellite, dump));
|
||||
}
|
||||
@ -114,9 +115,6 @@ sbas_l1_telemetry_decoder_gs::Sample_Aligner::Sample_Aligner()
|
||||
}
|
||||
|
||||
|
||||
sbas_l1_telemetry_decoder_gs::Sample_Aligner::~Sample_Aligner() = default;
|
||||
|
||||
|
||||
void sbas_l1_telemetry_decoder_gs::Sample_Aligner::reset()
|
||||
{
|
||||
d_past_sample = 0;
|
||||
@ -194,19 +192,12 @@ sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::Symbol_Aligner_And_Dec
|
||||
const int32_t nn = 2;
|
||||
std::array<int32_t, nn> g_encoder{121, 91};
|
||||
|
||||
d_vd1 = new Viterbi_Decoder(g_encoder.data(), d_KK, nn);
|
||||
d_vd2 = new Viterbi_Decoder(g_encoder.data(), d_KK, nn);
|
||||
d_vd1 = std::make_shared<Viterbi_Decoder>(g_encoder.data(), d_KK, nn);
|
||||
d_vd1 = std::make_shared<Viterbi_Decoder>(g_encoder.data(), d_KK, nn);
|
||||
d_past_symbol = 0;
|
||||
}
|
||||
|
||||
|
||||
sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::~Symbol_Aligner_And_Decoder()
|
||||
{
|
||||
delete d_vd1;
|
||||
delete d_vd2;
|
||||
}
|
||||
|
||||
|
||||
void sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::reset()
|
||||
{
|
||||
d_past_symbol = 0;
|
||||
@ -229,11 +220,11 @@ bool sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::get_bits(const st
|
||||
symbols_vd2.push_back(*symbol_it);
|
||||
}
|
||||
// arrays for decoded bits
|
||||
auto *bits_vd1 = new int32_t[nbits_requested];
|
||||
auto *bits_vd2 = new int32_t[nbits_requested];
|
||||
std::vector<int32_t> bits_vd1(nbits_requested);
|
||||
std::vector<int32_t> bits_vd2(nbits_requested);
|
||||
// decode
|
||||
float metric_vd1 = d_vd1->decode_continuous(symbols_vd1.data(), traceback_depth, bits_vd1, nbits_requested, nbits_decoded);
|
||||
float metric_vd2 = d_vd2->decode_continuous(symbols_vd2.data(), traceback_depth, bits_vd2, nbits_requested, nbits_decoded);
|
||||
float metric_vd1 = d_vd1->decode_continuous(symbols_vd1.data(), traceback_depth, bits_vd1.data(), nbits_requested, nbits_decoded);
|
||||
float metric_vd2 = d_vd2->decode_continuous(symbols_vd2.data(), traceback_depth, bits_vd2.data(), nbits_requested, nbits_decoded);
|
||||
// choose the bits with the better metric
|
||||
for (int32_t i = 0; i < nbits_decoded; i++)
|
||||
{
|
||||
@ -247,8 +238,6 @@ bool sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::get_bits(const st
|
||||
}
|
||||
}
|
||||
d_past_symbol = symbols.back();
|
||||
delete[] bits_vd1;
|
||||
delete[] bits_vd2;
|
||||
return metric_vd1 > metric_vd2;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -40,6 +40,7 @@
|
||||
#include <cstdint>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility> // for pair
|
||||
#include <vector>
|
||||
@ -50,12 +51,13 @@ class sbas_l1_telemetry_decoder_gs;
|
||||
|
||||
using sbas_l1_telemetry_decoder_gs_sptr = boost::shared_ptr<sbas_l1_telemetry_decoder_gs>;
|
||||
|
||||
sbas_l1_telemetry_decoder_gs_sptr
|
||||
sbas_l1_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
|
||||
sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
|
||||
const Gnss_Satellite &satellite,
|
||||
bool dump);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
|
||||
*
|
||||
* \brief This class implements a block that decodes the SBAS integrity and
|
||||
* corrections data defined in RTCA MOPS DO-229
|
||||
*/
|
||||
class sbas_l1_telemetry_decoder_gs : public gr::block
|
||||
{
|
||||
@ -67,6 +69,7 @@ public:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
@ -74,8 +77,10 @@ public:
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend sbas_l1_telemetry_decoder_gs_sptr
|
||||
sbas_l1_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
|
||||
friend sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
|
||||
const Gnss_Satellite &satellite,
|
||||
bool dump);
|
||||
|
||||
sbas_l1_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
|
||||
|
||||
void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits);
|
||||
@ -103,7 +108,7 @@ private:
|
||||
{
|
||||
public:
|
||||
Sample_Aligner();
|
||||
~Sample_Aligner();
|
||||
~Sample_Aligner() = default;
|
||||
void reset();
|
||||
/*
|
||||
* samples length must be a multiple of two
|
||||
@ -125,14 +130,14 @@ private:
|
||||
{
|
||||
public:
|
||||
Symbol_Aligner_And_Decoder();
|
||||
~Symbol_Aligner_And_Decoder();
|
||||
~Symbol_Aligner_And_Decoder() = default;
|
||||
void reset();
|
||||
bool get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits);
|
||||
|
||||
private:
|
||||
int32_t d_KK;
|
||||
Viterbi_Decoder *d_vd1;
|
||||
Viterbi_Decoder *d_vd2;
|
||||
std::shared_ptr<Viterbi_Decoder> d_vd1;
|
||||
std::shared_ptr<Viterbi_Decoder> d_vd2;
|
||||
double d_past_symbol;
|
||||
} d_symbol_aligner_and_decoder;
|
||||
|
||||
@ -157,7 +162,7 @@ private:
|
||||
void get_valid_frames(const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs);
|
||||
|
||||
private:
|
||||
typedef boost::crc_optimal<24, 0x1864CFBu, 0x0, 0x0, false, false> crc_24_q_type;
|
||||
typedef boost::crc_optimal<24, 0x1864CFBU, 0x0, 0x0, false, false> crc_24_q_type;
|
||||
crc_24_q_type d_checksum_agent;
|
||||
void zerropad_front_and_convert_to_bytes(const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
|
||||
void zerropad_back_and_convert_to_bytes(const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes);
|
||||
|
@ -92,6 +92,7 @@ public:
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
|
@ -89,6 +89,7 @@ public:
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
|
@ -61,7 +61,6 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
float dll_bw_narrow_hz;
|
||||
float early_late_space_chips;
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
//vector_length = configuration->property(role + ".vector_length", 2048);
|
||||
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
|
@ -59,7 +59,6 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
float dll_bw_narrow_hz;
|
||||
float early_late_space_chips;
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
//vector_length = configuration->property(role + ".vector_length", 2048);
|
||||
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", false);
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
|
@ -214,7 +214,6 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga);
|
||||
channel_ = 0;
|
||||
|
@ -115,6 +115,16 @@ GpsL1CaKfTracking::GpsL1CaKfTracking(
|
||||
}
|
||||
channel_ = 0;
|
||||
DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")";
|
||||
if (in_streams_ == 0)
|
||||
{
|
||||
in_streams_ = 1;
|
||||
// Avoid compiler warning
|
||||
}
|
||||
if (out_streams_ == 0)
|
||||
{
|
||||
out_streams_ = 1;
|
||||
// Avoid compiler warning
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,6 +89,7 @@ public:
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
|
@ -175,6 +175,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
trk_param_fpga.device_name = device_name;
|
||||
uint32_t device_base = configuration->property(role + ".device_base", 27);
|
||||
trk_param_fpga.device_base = device_base;
|
||||
|
||||
// ################# PRE-COMPUTE ALL THE CODES #################
|
||||
uint32_t code_samples_per_chip = 1;
|
||||
auto code_length_chips = static_cast<uint32_t>(GPS_L5I_CODE_LENGTH_CHIPS);
|
||||
|
@ -326,7 +326,6 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_symbols_per_bit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << "Invalid System argument when instantiating tracking blocks";
|
||||
@ -1537,8 +1536,6 @@ void dll_pll_veml_tracking::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
//trk_parameters.dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
//trk_parameters.dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(dump_filename_.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << dump_filename_.c_str();
|
||||
|
@ -85,6 +85,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
{
|
||||
// prevent telemetry symbols accumulation in output buffers
|
||||
this->set_max_noutput_items(1);
|
||||
|
||||
trk_parameters = conf_;
|
||||
// Telemetry bit synchronization message port input
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
@ -514,6 +515,7 @@ void dll_pll_veml_tracking_fpga::start_tracking()
|
||||
m_condition.notify_one();
|
||||
}
|
||||
|
||||
|
||||
dll_pll_veml_tracking_fpga::~dll_pll_veml_tracking_fpga()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
@ -606,7 +608,6 @@ bool dll_pll_veml_tracking_fpga::cn0_and_tracking_lock_status(double coh_integra
|
||||
float d_CN0_SNV_dB_Hz_raw = cn0_svn_estimator(d_Prompt_buffer.data(), trk_parameters.cn0_samples, static_cast<float>(coh_integration_time_s));
|
||||
d_CN0_SNV_dB_Hz = d_cn0_smoother.smooth(d_CN0_SNV_dB_Hz_raw);
|
||||
// Carrier lock indicator
|
||||
//d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), trk_parameters.cn0_samples);
|
||||
d_carrier_lock_test = d_carrier_lock_test_smoother.smooth(carrier_lock_detector(d_Prompt_buffer.data(), 1));
|
||||
// Loss of lock detection
|
||||
if (!d_pull_in_transitory)
|
||||
@ -789,15 +790,12 @@ void dll_pll_veml_tracking_fpga::update_tracking_vars()
|
||||
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
|
||||
// keep alignment parameters for the next input buffer
|
||||
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
|
||||
//T_prn_samples_prev = T_prn_samples;
|
||||
T_prn_samples = T_prn_seconds * trk_parameters.fs_in;
|
||||
//K_blk_samples = T_prn_samples + d_rem_code_phase_samples; // initially d_rem_code_phase_samples is zero. It is updated at the end of this function
|
||||
K_blk_samples = T_prn_samples * d_current_fpga_integration_period + d_rem_code_phase_samples; // initially d_rem_code_phase_samples is zero. It is updated at the end of this function
|
||||
|
||||
auto actual_blk_length = static_cast<int32_t>(std::floor(K_blk_samples));
|
||||
//d_next_integration_length_samples = 2 * actual_blk_length - d_current_integration_length_samples;
|
||||
d_next_integration_length_samples = actual_blk_length;
|
||||
//################### PLL COMMANDS #################################################
|
||||
|
||||
// ################## PLL COMMANDS #################################################
|
||||
// carrier phase step (NCO phase increment per sample) [rads/sample]
|
||||
d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in;
|
||||
// carrier phase rate step (NCO phase increment rate per sample) [rads/sample^2]
|
||||
@ -831,7 +829,7 @@ void dll_pll_veml_tracking_fpga::update_tracking_vars()
|
||||
// std::cout << fmod(b, PI_2) / fmod(a, PI_2) << std::endl;
|
||||
d_acc_carrier_phase_rad -= (d_carrier_phase_step_rad * static_cast<double>(d_current_integration_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_integration_length_samples) * static_cast<double>(d_current_integration_length_samples));
|
||||
|
||||
//################### DLL COMMANDS #################################################
|
||||
// ################## DLL COMMANDS #################################################
|
||||
// code phase step (Code resampler phase increment per sample) [chips/sample]
|
||||
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
|
||||
if (trk_parameters.high_dyn)
|
||||
@ -1301,8 +1299,6 @@ void dll_pll_veml_tracking_fpga::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
//trk_parameters.dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
//trk_parameters.dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(dump_filename_.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << dump_filename_.c_str();
|
||||
@ -1506,13 +1502,10 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
case 1: // Pull-in
|
||||
{
|
||||
d_worker_is_done = false;
|
||||
|
||||
|
||||
boost::mutex::scoped_lock lock(d_mutex);
|
||||
while (!d_worker_is_done) m_condition.wait(lock);
|
||||
|
||||
// Signal alignment (skip samples until the incoming signal is aligned with local replica)
|
||||
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
double delta_trk_to_acq_prn_start_samples;
|
||||
@ -1533,7 +1526,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
else
|
||||
{
|
||||
// test mode
|
||||
|
||||
acq_trk_diff_samples = -static_cast<int64_t>(counter_value) + static_cast<int64_t>(d_acq_sample_stamp);
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in;
|
||||
delta_trk_to_acq_prn_start_samples = static_cast<double>(acq_trk_diff_samples) + d_acq_code_phase_samples;
|
||||
@ -1541,9 +1533,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
absolute_samples_offset = static_cast<uint64_t>(delta_trk_to_acq_prn_start_samples);
|
||||
}
|
||||
|
||||
|
||||
multicorrelator_fpga->set_initial_sample(absolute_samples_offset);
|
||||
//d_absolute_samples_offset = absolute_samples_offset;
|
||||
d_sample_counter = absolute_samples_offset;
|
||||
d_sample_counter_next = d_sample_counter;
|
||||
|
||||
@ -1583,7 +1573,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
do_correlation_step();
|
||||
|
||||
// Save single correlation step variables
|
||||
|
||||
if (d_veml)
|
||||
{
|
||||
d_VE_accu = *d_Very_Early;
|
||||
@ -1602,7 +1591,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
}
|
||||
|
||||
// Check lock status
|
||||
|
||||
if (!cn0_and_tracking_lock_status(d_code_period))
|
||||
{
|
||||
clear_tracking_vars();
|
||||
@ -1751,7 +1739,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 3: // coherent integration (correlation time extension)
|
||||
@ -1843,7 +1830,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 5: // coherent integration (correlation time extension)
|
||||
{
|
||||
d_sample_counter = d_sample_counter_next;
|
||||
@ -1889,8 +1875,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 6: // narrow tracking IN THE FPGA
|
||||
{
|
||||
d_sample_counter = d_sample_counter_next;
|
||||
@ -1956,6 +1940,8 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1163,6 +1163,8 @@ void GNSSFlowgraph::remove_signal(const Gnss_Signal& gs)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// project Doppler from primary frequency to secondary frequency
|
||||
double GNSSFlowgraph::project_doppler(std::string searched_signal, double primary_freq_doppler_hz)
|
||||
{
|
||||
@ -1182,6 +1184,7 @@ double GNSSFlowgraph::project_doppler(std::string searched_signal, double primar
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GNSSFlowgraph::acquisition_manager(unsigned int who)
|
||||
{
|
||||
unsigned int current_channel;
|
||||
@ -1285,7 +1288,6 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
|
||||
void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
{
|
||||
//todo: the acquisition events are initiated from the acquisition success or failure queued msg. If the acquisition is disabled for non-assisted secondary freq channels, the engine stops..
|
||||
|
||||
std::lock_guard<std::mutex> lock(signal_list_mutex);
|
||||
DLOG(INFO) << "Received " << what << " from " << who;
|
||||
unsigned int sat = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user