1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

the tracking module is now sending 1 synchro_data per data symbol.

This commit is contained in:
Marc Majoral 2019-07-17 18:01:27 +02:00
parent 58cc961aec
commit 4c22a1ce1a
17 changed files with 738 additions and 1687 deletions

View File

@ -24,7 +24,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -32,16 +32,15 @@
#ifndef GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
#include "acq_conf.h"
#include "channel_fsm.h"
#include "gnss_synchro.h"
#include "pcps_acquisition_fpga.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <volk/volk_complex.h> // for lv_16sc_t
#include <cstddef> // for size_t
#include <memory>
#include <string>
#include <vector>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -73,8 +72,7 @@ public:
size_t item_size() override
{
size_t item_size = sizeof(lv_16sc_t);
return item_size;
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -85,7 +83,7 @@ public:
/*!
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
* to efficiently exchange synchronization data between acquisition and
* tracking blocks
* tracking blocks
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
@ -157,6 +155,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
bool acquire_pilot_;
uint32_t channel_;
std::weak_ptr<ChannelFsm> channel_fsm_;

View File

@ -24,7 +24,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -34,16 +34,12 @@
#include "channel_fsm.h"
#include "gnss_synchro.h"
#include "pcps_acquisition_fpga.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <volk/volk_complex.h> // for lv_16sc_t
#include <cstddef> // for size_t
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
class Gnss_Synchro;
class ConfigurationInterface;
@ -76,7 +72,7 @@ public:
inline size_t item_size() override
{
return sizeof(lv_16sc_t);
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -87,7 +83,7 @@ public:
/*!
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
* to efficiently exchange synchronization data between acquisition and
* tracking blocks
* tracking blocks
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
@ -169,6 +165,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
std::string item_type_;
std::string dump_filename_;
std::string role_;

View File

@ -38,14 +38,11 @@
#include "channel_fsm.h"
#include "pcps_acquisition_fpga.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <volk/volk_complex.h> // for lv_16sc_t
#include <cstddef> // for size_t
#include <memory>
#include <string>
#include <vector>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -77,8 +74,7 @@ public:
inline size_t item_size() override
{
size_t item_size = sizeof(lv_16sc_t);
return item_size;
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -161,6 +157,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
uint32_t channel_;
std::weak_ptr<ChannelFsm> channel_fsm_;
uint32_t doppler_max_;

View File

@ -27,7 +27,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -37,14 +37,11 @@
#include "channel_fsm.h"
#include "pcps_acquisition_fpga.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <volk/volk_complex.h> // for lv_16sc_t
#include <cstddef> // for size_t
#include <memory>
#include <string>
#include <vector>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -76,7 +73,7 @@ public:
inline size_t item_size() override
{
return sizeof(lv_16sc_t);
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -159,6 +156,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
std::string item_type_;
uint32_t channel_;
std::weak_ptr<ChannelFsm> channel_fsm_;

View File

@ -29,7 +29,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -41,12 +41,8 @@
#include "dll_pll_conf_fpga.h"
#include "galileo_e1_signal_processing.h"
#include "gnss_sdr_flags.h"
#include "gnss_synchro.h"
#include <glog/logging.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <cmath> // for round
#include <cstring> // for memcpy
#include <iostream> // for operator<<,
// the following flags are FPGA-specific and they are using arrange the values of the local code in the way the FPGA
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
@ -81,7 +77,6 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
{
trk_param_fpga.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)
{
@ -173,31 +168,19 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
trk_param_fpga.system = 'E';
char sig_[3] = "1B";
std::memcpy(trk_param_fpga.signal, sig_, 3);
int32_t cn0_samples = configuration->property(role + ".cn0_samples", 20);
if (FLAGS_cn0_samples != 20)
{
cn0_samples = FLAGS_cn0_samples;
}
trk_param_fpga.cn0_samples = configuration->property(role + ".cn0_samples", trk_param_fpga.cn0_samples);
trk_param_fpga.cn0_min = configuration->property(role + ".cn0_min", trk_param_fpga.cn0_min);
trk_param_fpga.max_code_lock_fail = configuration->property(role + ".max_lock_fail", trk_param_fpga.max_code_lock_fail);
trk_param_fpga.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param_fpga.max_carrier_lock_fail);
trk_param_fpga.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param_fpga.carrier_lock_th);
// int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
// if (FLAGS_max_lock_fail != 50)
// {
// max_lock_fail = FLAGS_max_lock_fail;
// }
// trk_param_fpga.max_lock_fail = max_lock_fail;
trk_param_fpga.cn0_samples = cn0_samples;
int32_t cn0_min = configuration->property(role + ".cn0_min", 25);
if (FLAGS_cn0_min != 25)
{
cn0_min = FLAGS_cn0_min;
}
trk_param_fpga.cn0_min = cn0_min;
int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
if (FLAGS_max_lock_fail != 50)
{
max_lock_fail = FLAGS_max_lock_fail;
}
trk_param_fpga.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;
}
trk_param_fpga.carrier_lock_th = carrier_lock_th;
// FPGA configuration parameters
std::string default_device_name = "/dev/uio";

View File

@ -29,7 +29,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -39,12 +39,9 @@
#include "dll_pll_veml_tracking_fpga.h"
#include "tracking_interface.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, basic_block_sptr
#include <cstddef> // for size_t
#include <cstdint> // for uint32_t
#include <string> // for string
#include <string>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -74,7 +71,7 @@ public:
inline size_t item_size() override
{
return sizeof(int);
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -95,7 +92,6 @@ public:
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
void start_tracking() override;
/*!
* \brief Stop running tracking
*/
@ -103,6 +99,7 @@ public:
private:
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -24,7 +24,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -36,14 +36,8 @@
#include "dll_pll_conf_fpga.h"
#include "galileo_e5_signal_processing.h"
#include "gnss_sdr_flags.h"
#include "gnss_synchro.h"
#include <glog/logging.h>
#include <gnuradio/gr_complex.h> // for gr_complex
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <cmath> // for round
#include <complex>
#include <cstring> // for memcpy
#include <iostream>
// the following flags are FPGA-specific and they are using arrange the values of the local code in the way the FPGA
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
@ -167,30 +161,19 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
trk_param_fpga.system = 'E';
char sig_[3] = "5X";
std::memcpy(trk_param_fpga.signal, sig_, 3);
int32_t cn0_samples = configuration->property(role + ".cn0_samples", 20);
if (FLAGS_cn0_samples != 20)
{
cn0_samples = FLAGS_cn0_samples;
}
trk_param_fpga.cn0_samples = cn0_samples;
int32_t cn0_min = configuration->property(role + ".cn0_min", 25);
if (FLAGS_cn0_min != 25)
{
cn0_min = FLAGS_cn0_min;
}
trk_param_fpga.cn0_min = cn0_min;
int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
if (FLAGS_max_lock_fail != 50)
{
max_lock_fail = FLAGS_max_lock_fail;
}
trk_param_fpga.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;
}
trk_param_fpga.carrier_lock_th = carrier_lock_th;
trk_param_fpga.cn0_samples = configuration->property(role + ".cn0_samples", trk_param_fpga.cn0_samples);
trk_param_fpga.cn0_min = configuration->property(role + ".cn0_min", trk_param_fpga.cn0_min);
trk_param_fpga.max_code_lock_fail = configuration->property(role + ".max_lock_fail", trk_param_fpga.max_code_lock_fail);
trk_param_fpga.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param_fpga.max_carrier_lock_fail);
trk_param_fpga.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param_fpga.carrier_lock_th);
// int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
// if (FLAGS_max_lock_fail != 50)
// {
// max_lock_fail = FLAGS_max_lock_fail;
// }
// trk_param_fpga.max_lock_fail = max_lock_fail;
d_data_codes = nullptr;

View File

@ -24,7 +24,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -34,12 +34,8 @@
#include "dll_pll_veml_tracking_fpga.h"
#include "tracking_interface.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr
#include <cstdint> // For uint32_t
#include <stddef.h> // for size_t
#include <string>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -68,7 +64,7 @@ public:
inline size_t item_size() override
{
return sizeof(int);
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -95,6 +91,7 @@ public:
private:
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -29,7 +29,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -40,13 +40,9 @@
#include "display.h"
#include "dll_pll_conf_fpga.h"
#include "gnss_sdr_flags.h"
#include "gnss_synchro.h"
#include "gps_sdr_signal_processing.h"
#include <glog/logging.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <cmath> // for round
#include <cstring> // for memcpy
#include <iostream>
#define NUM_PRNs 32 // total number of PRNs
#define GPS_CA_BIT_DURATION_MS 20
@ -61,7 +57,6 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
{
Dll_Pll_Conf_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga();
DLOG(INFO) << "role " << role;
//################# CONFIGURATION PARAMETERS ########################
int32_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int32_t fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
@ -76,7 +71,6 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
{
trk_param_fpga.smoother_length = configuration->property(role + ".smoother_length", 10);
}
bool dump = configuration->property(role + ".dump", false);
trk_param_fpga.dump = dump;
std::string default_dump_filename = "./track_ch";
@ -176,30 +170,19 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
trk_param_fpga.system = 'G';
char sig_[3] = "1C";
std::memcpy(trk_param_fpga.signal, sig_, 3);
int32_t cn0_samples = configuration->property(role + ".cn0_samples", 20);
if (FLAGS_cn0_samples != 20)
{
cn0_samples = FLAGS_cn0_samples;
}
trk_param_fpga.cn0_samples = cn0_samples;
int32_t cn0_min = configuration->property(role + ".cn0_min", 30);
if (FLAGS_cn0_min != 25)
{
cn0_min = FLAGS_cn0_min;
}
trk_param_fpga.cn0_min = cn0_min;
int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
if (FLAGS_max_lock_fail != 50)
{
max_lock_fail = FLAGS_max_lock_fail;
}
trk_param_fpga.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;
}
trk_param_fpga.carrier_lock_th = carrier_lock_th;
trk_param_fpga.cn0_samples = configuration->property(role + ".cn0_samples", trk_param_fpga.cn0_samples);
trk_param_fpga.cn0_min = configuration->property(role + ".cn0_min", trk_param_fpga.cn0_min);
trk_param_fpga.max_code_lock_fail = configuration->property(role + ".max_lock_fail", trk_param_fpga.max_code_lock_fail);
trk_param_fpga.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param_fpga.max_carrier_lock_fail);
trk_param_fpga.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param_fpga.carrier_lock_th);
//int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
//if (FLAGS_max_lock_fail != 50)
// {
// max_lock_fail = FLAGS_max_lock_fail;
// }
//trk_param_fpga.max_lock_fail = max_lock_fail;
// FPGA configuration parameters
std::string default_device_name = "/dev/uio";

View File

@ -29,7 +29,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -39,12 +39,8 @@
#include "dll_pll_veml_tracking_fpga.h"
#include "tracking_interface.h"
#include <gnuradio/runtime_types.h>
#include <cstddef>
#include <string>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -73,7 +69,7 @@ public:
inline size_t item_size() override
{
return sizeof(int);
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -101,6 +97,7 @@ public:
private:
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -100,18 +100,19 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
trk_param_fpga.system = 'G';
char sig_[3] = "2S";
std::memcpy(trk_param_fpga.signal, sig_, 3);
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
trk_param_fpga.cn0_samples = cn0_samples;
int cn0_min = configuration->property(role + ".cn0_min", 25);
if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min;
trk_param_fpga.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;
trk_param_fpga.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;
trk_param_fpga.carrier_lock_th = carrier_lock_th;
trk_param_fpga.cn0_samples = configuration->property(role + ".cn0_samples", trk_param_fpga.cn0_samples);
trk_param_fpga.cn0_min = configuration->property(role + ".cn0_min", trk_param_fpga.cn0_min);
trk_param_fpga.max_code_lock_fail = configuration->property(role + ".max_lock_fail", trk_param_fpga.max_code_lock_fail);
trk_param_fpga.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param_fpga.max_carrier_lock_fail);
trk_param_fpga.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param_fpga.carrier_lock_th);
// int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
// if (FLAGS_max_lock_fail != 50)
// {
// max_lock_fail = FLAGS_max_lock_fail;
// }
// trk_param_fpga.max_lock_fail = max_lock_fail;
// FPGA configuration parameters
std::string default_device_name = "/dev/uio";

View File

@ -30,7 +30,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -42,13 +42,13 @@
#include "display.h"
#include "dll_pll_conf_fpga.h"
#include "gnss_sdr_flags.h"
#include "gnss_synchro.h"
//#include "gnss_synchro.h"
#include "gps_l5_signal.h"
#include <glog/logging.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <cmath> // for round
#include <cstring> // for memcpy
#include <iostream>
//#include <cmath> // for round
//#include <cstring> // for memcpy
//#include <iostream>
#define NUM_PRNs 32 // number of PRNS
@ -174,30 +174,19 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
trk_param_fpga.system = 'G';
char sig_[3] = "L5";
std::memcpy(trk_param_fpga.signal, sig_, 3);
int32_t cn0_samples = configuration->property(role + ".cn0_samples", 20);
if (FLAGS_cn0_samples != 20)
{
cn0_samples = FLAGS_cn0_samples;
}
trk_param_fpga.cn0_samples = cn0_samples;
int32_t cn0_min = configuration->property(role + ".cn0_min", 25);
if (FLAGS_cn0_min != 25)
{
cn0_min = FLAGS_cn0_min;
}
trk_param_fpga.cn0_min = cn0_min;
int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
if (FLAGS_max_lock_fail != 50)
{
max_lock_fail = FLAGS_max_lock_fail;
}
trk_param_fpga.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;
}
trk_param_fpga.carrier_lock_th = carrier_lock_th;
trk_param_fpga.cn0_samples = configuration->property(role + ".cn0_samples", trk_param_fpga.cn0_samples);
trk_param_fpga.cn0_min = configuration->property(role + ".cn0_min", trk_param_fpga.cn0_min);
trk_param_fpga.max_code_lock_fail = configuration->property(role + ".max_lock_fail", trk_param_fpga.max_code_lock_fail);
trk_param_fpga.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param_fpga.max_carrier_lock_fail);
trk_param_fpga.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param_fpga.carrier_lock_th);
//int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
//if (FLAGS_max_lock_fail != 50)
// {
// max_lock_fail = FLAGS_max_lock_fail;
// }
//trk_param_fpga.max_lock_fail = max_lock_fail;
// FPGA configuration parameters
std::string default_device_name = "/dev/uio";

View File

@ -30,7 +30,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
@ -40,12 +40,8 @@
#include "dll_pll_veml_tracking_fpga.h"
#include "tracking_interface.h"
#include <gnuradio/runtime_types.h>
#include <cstddef>
#include <cstdint>
#include <string>
class Gnss_Synchro;
class ConfigurationInterface;
/*!
@ -74,7 +70,7 @@ public:
inline size_t item_size() override
{
return sizeof(int);
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
@ -94,7 +90,6 @@ public:
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
void start_tracking() override;
/*!
* \brief Stop running tracking
*/
@ -102,6 +97,7 @@ public:
private:
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -43,11 +43,8 @@
#include <gnuradio/types.h> // for gr_vector_int, gr_vector...
#include <pmt/pmt.h> // for pmt_t
#include <cstdint> // for int32_t
#include <deque> // for deque
#include <fstream> // for string, ofstream
#include <memory> // for shared_ptr
#include <string>
#include <utility> // for pair
#include <utility> // for pair
#include <vector>
class Fpga_Multicorrelator_8sc;
@ -77,27 +74,25 @@ public:
void reset(void);
//bool stop(void);
// void stop(void);
private:
friend dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_);
void msg_handler_telemetry_to_trk(const pmt::pmt_t &msg);
dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_);
void msg_handler_preamble_index(pmt::pmt_t msg);
bool cn0_and_tracking_lock_status(double coh_integration_time_s);
bool acquire_secondary();
void do_correlation_step(void);
void run_dll_pll();
void update_tracking_vars();
void update_tracking_vars_extend_integration_in_FPGA();
void clear_tracking_vars();
void save_correlation_results();
void save_correlation_results_extended_integration_in_FPGA();
void log_data();
void log_data_extended_integration_in_FPGA(bool extended_correlation_in_fpga_enabled);
int32_t save_matfile();
//void run_state_2(Gnss_Synchro &current_synchro_data);
// tracking configuration vars
Dll_Pll_Conf_Fpga trk_parameters;
bool d_veml;
@ -105,9 +100,8 @@ private:
uint32_t d_channel;
Gnss_Synchro *d_acquisition_gnss_synchro;
//Signal parameters
// Signal parameters
bool d_secondary;
bool interchange_iq;
double d_signal_carrier_freq;
double d_code_period;
double d_code_chip_rate;
@ -122,9 +116,6 @@ private:
std::string *d_data_secondary_code_string;
std::string signal_pretty_name;
int32_t *d_preambles_symbols;
int32_t d_preamble_length_symbols;
boost::circular_buffer<float> d_symbol_history;
// dll filter buffer
boost::circular_buffer<float> d_dll_filt_history;
@ -150,7 +141,6 @@ private:
int32_t d_current_symbol;
int32_t d_current_data_symbol;
gr_complex d_VE_accu;
gr_complex d_E_accu;
gr_complex d_P_accu;
@ -158,9 +148,6 @@ private:
gr_complex d_L_accu;
gr_complex d_VL_accu;
// gr_complex d_P_data_accu; // when the extended integration is done in the FPGA we need to accumulate the pilot correlator results too
uint32_t d_num_current_syncrho_repetitions;
gr_complex d_P_data_accu;
gr_complex *d_Prompt_Data;
@ -170,14 +157,12 @@ private:
double d_carrier_phase_step_rad;
double d_carrier_phase_rate_step_rad;
boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
// remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples;
double d_rem_code_phase_samples_first;
double d_rem_code_phase_samples_next;
double d_rem_code_phase_samples_prev;
float d_rem_carr_phase_rad;
// PLL and DLL filter library
Tracking_loop_filter d_code_loop_filter;
Tracking_FLL_PLL_filter d_carrier_loop_filter;
@ -202,98 +187,44 @@ private:
double T_prn_seconds;
double T_prn_samples;
double K_blk_samples;
//double K_blk_samples_prev;
// integration period in samples
int32_t d_current_integration_length_samples;
// processing samples counters
uint64_t d_sample_counter;
uint64_t d_acq_sample_stamp;
uint64_t d_absolute_samples_offset;
// CN0 estimation and lock detector
int32_t d_cn0_estimation_counter;
int32_t d_carrier_lock_fail_counter;
//std::deque<float> d_carrier_lock_detector_queue;
int32_t d_code_lock_fail_counter;
double d_carrier_lock_test;
double d_CN0_SNV_dB_Hz;
double d_carrier_lock_threshold;
boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
//std::deque<gr_complex> d_Prompt_buffer_deque;
std::vector<gr_complex> d_Prompt_buffer;
Exponential_Smoother d_cn0_smoother;
bool d_extended_correlation_in_fpga;
Exponential_Smoother d_carrier_lock_test_smoother;
// file dump
std::ofstream d_dump_file;
std::string d_dump_filename;
bool d_dump;
bool d_dump_mat;
// extra
int32_t d_correlation_length_samples;
bool d_extended_correlation_in_fpga;
bool d_current_extended_correlation_in_fpga;
int32_t d_next_integration_length_samples;
int32_t d_extended_integration_first_prn_length_samples;
int32_t d_extended_integration_next_prn_length_samples;
double d_extended_integration_first_acc_carrier_phase_rad;
double d_extended_integration_next_acc_carrier_phase_rad_step;
uint64_t d_sample_counter_next;
// DEBUG STUFF
uint64_t d_current_synchro_data_Tracking_sample_counter[20];
double d_current_synchro_data_Code_phase_samples[20];
double d_current_synchro_data_Carrier_phase_rads[20];
double d_current_synchro_data_Carrier_Doppler_hz[20];
double d_current_synchro_data_CN0_dB_hz[20];
bool d_current_synchro_data_Flag_valid_symbol_output[20];
int32_t d_current_synchro_data_correlation_length_ms[20];
double d_current_synchro_data_Prompt_I[20];
double d_current_synchro_data_Prompt_Q[20];
double T_prn_samples_prev;
int32_t d_actual_blk_length;
bool d_flag_printout;
std::string *d_secondary_code_string_data;
std::string *d_secondary_code_string_pilot;
uint32_t d_secondary_code_length_data;
uint32_t d_secondary_code_length_pilot;
uint32_t d_first_length_secondary_code;
uint32_t d_next_length_secondary_code;
uint32_t d_debug_counter;
uint32_t d_secondary_code_post_apply_counter; // init in set_gnss_synchro
std::string *d_secondary_code_string_post_apply; // init in constructor
uint32_t d_secondary_code_post_apply_length; // init in constructor
bool enable_post_apply_secondary_code;
uint32_t d_secondary_code_debug_counter_whole_bits;
bool d_sc_remodulate_enabled;
bool d_sc_demodulate_enabled;
bool d_sc_prompt_changed;
float debug_d_rem_carr_phase_rad;
uint32_t debug_first_time;
uint32_t d_extend_fpga_integration_periods;
int32_t d_extend_fpga_integration_periods;
uint32_t d_fpga_integration_period;
uint32_t d_current_fpga_integration_period;
bool d_worker_is_done;
boost::condition_variable m_condition;
boost::mutex d_mutex;
bool d_stop_tracking;
};

View File

@ -32,6 +32,7 @@
#include "dll_pll_conf_fpga.h"
#include "gnss_sdr_flags.h"
#include <cstring>
Dll_Pll_Conf_Fpga::Dll_Pll_Conf_Fpga()
@ -63,10 +64,12 @@ Dll_Pll_Conf_Fpga::Dll_Pll_Conf_Fpga()
early_late_space_narrow_chips = 0.1;
very_early_late_space_narrow_chips = 0.1;
extend_correlation_symbols = 5;
cn0_samples = 20;
cn0_min = 25;
max_lock_fail = 50;
carrier_lock_th = 0.85;
cn0_samples = FLAGS_cn0_samples;
cn0_min = FLAGS_cn0_min;
max_carrier_lock_fail = FLAGS_max_carrier_lock_fail;
max_code_lock_fail = FLAGS_max_lock_fail;
carrier_lock_th = FLAGS_carrier_lock_th;
//max_lock_fail = 50;
enable_doppler_correction = false;
track_pilot = false;
system = 'G';

View File

@ -42,6 +42,7 @@ class Dll_Pll_Conf_Fpga
{
public:
/* DLL/PLL tracking configuration */
int fll_filter_order;
bool enable_fll_pull_in;
bool enable_fll_steady_state;
@ -50,7 +51,6 @@ public:
int pll_filter_order;
int dll_filter_order;
double fs_in;
uint32_t vector_length;
bool dump;
@ -71,7 +71,9 @@ public:
bool high_dyn;
int32_t cn0_samples;
int32_t cn0_min;
int32_t max_lock_fail;
int32_t max_code_lock_fail;
int32_t max_carrier_lock_fail;
//int32_t max_lock_fail;
uint32_t smoother_length;
double carrier_lock_th;
bool track_pilot;