mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
12056dfc0a
@ -3366,6 +3366,7 @@ std::map<std::string, int> Rtcm::gps_signal_map = [] {
|
|||||||
gps_signal_map_["5I"] = 22;
|
gps_signal_map_["5I"] = 22;
|
||||||
gps_signal_map_["5Q"] = 23;
|
gps_signal_map_["5Q"] = 23;
|
||||||
gps_signal_map_["5X"] = 24;
|
gps_signal_map_["5X"] = 24;
|
||||||
|
gps_signal_map_["L5"] = 24; // Workaround. TODO: check if it was I or Q
|
||||||
return gps_signal_map_;
|
return gps_signal_map_;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
@ -98,6 +98,8 @@ target_link_libraries(tracking_adapters
|
|||||||
tracking_gr_blocks
|
tracking_gr_blocks
|
||||||
algorithms_libs
|
algorithms_libs
|
||||||
gnss_sdr_flags
|
gnss_sdr_flags
|
||||||
|
PRIVATE
|
||||||
|
Volkgnsssdr::volkgnsssdr
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(tracking_adapters
|
target_include_directories(tracking_adapters
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "galileo_e1_signal_processing.h"
|
#include "galileo_e1_signal_processing.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "galileo_e5_signal_processing.h"
|
#include "galileo_e5_signal_processing.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
|
@ -41,14 +41,12 @@
|
|||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include "gps_sdr_signal_processing.h"
|
#include "gps_sdr_signal_processing.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
|
||||||
#define NUM_PRNs 32
|
#define NUM_PRNs 32
|
||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
void GpsL1CaDllPllTrackingFpga::stop_tracking()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||||
ConfigurationInterface* configuration, const std::string& role,
|
ConfigurationInterface* configuration, const std::string& role,
|
||||||
@ -148,16 +146,24 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
|||||||
DLOG(INFO) << "tracking(" << tracking_fpga_sc->unique_id() << ")";
|
DLOG(INFO) << "tracking(" << tracking_fpga_sc->unique_id() << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaDllPllTrackingFpga::~GpsL1CaDllPllTrackingFpga()
|
GpsL1CaDllPllTrackingFpga::~GpsL1CaDllPllTrackingFpga()
|
||||||
{
|
{
|
||||||
delete[] d_ca_codes;
|
delete[] d_ca_codes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaDllPllTrackingFpga::start_tracking()
|
void GpsL1CaDllPllTrackingFpga::start_tracking()
|
||||||
{
|
{
|
||||||
tracking_fpga_sc->start_tracking();
|
tracking_fpga_sc->start_tracking();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GpsL1CaDllPllTrackingFpga::stop_tracking()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set tracking channel unique ID
|
* Set tracking channel unique ID
|
||||||
*/
|
*/
|
||||||
@ -167,11 +173,13 @@ void GpsL1CaDllPllTrackingFpga::set_channel(unsigned int channel)
|
|||||||
tracking_fpga_sc->set_channel(channel);
|
tracking_fpga_sc->set_channel(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaDllPllTrackingFpga::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
void GpsL1CaDllPllTrackingFpga::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||||
{
|
{
|
||||||
tracking_fpga_sc->set_gnss_synchro(p_gnss_synchro);
|
tracking_fpga_sc->set_gnss_synchro(p_gnss_synchro);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaDllPllTrackingFpga::connect(gr::top_block_sptr top_block)
|
void GpsL1CaDllPllTrackingFpga::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
if (top_block)
|
if (top_block)
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include "gps_l2c_signal.h"
|
#include "gps_l2c_signal.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
|
||||||
#define NUM_PRNs 32
|
#define NUM_PRNs 32
|
||||||
|
|
||||||
|
@ -43,14 +43,12 @@
|
|||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include "gps_l5_signal.h"
|
#include "gps_l5_signal.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
|
||||||
#define NUM_PRNs 32
|
#define NUM_PRNs 32
|
||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
void GpsL5DllPllTrackingFpga::stop_tracking()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||||
ConfigurationInterface *configuration, const std::string &role,
|
ConfigurationInterface *configuration, const std::string &role,
|
||||||
@ -123,7 +121,6 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
|||||||
trk_param_fpga.carrier_lock_th = carrier_lock_th;
|
trk_param_fpga.carrier_lock_th = carrier_lock_th;
|
||||||
|
|
||||||
// FPGA configuration parameters
|
// FPGA configuration parameters
|
||||||
|
|
||||||
std::string default_device_name = "/dev/uio";
|
std::string default_device_name = "/dev/uio";
|
||||||
std::string device_name = configuration->property(role + ".devicename", default_device_name);
|
std::string device_name = configuration->property(role + ".devicename", default_device_name);
|
||||||
trk_param_fpga.device_name = device_name;
|
trk_param_fpga.device_name = device_name;
|
||||||
@ -210,6 +207,11 @@ void GpsL5DllPllTrackingFpga::start_tracking()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GpsL5DllPllTrackingFpga::stop_tracking()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set tracking channel unique ID
|
* Set tracking channel unique ID
|
||||||
*/
|
*/
|
||||||
|
@ -36,19 +36,12 @@
|
|||||||
|
|
||||||
#include "fpga_multicorrelator.h"
|
#include "fpga_multicorrelator.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <cassert>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <cerrno>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <csignal>
|
|
||||||
#include <cstdint>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <fcntl.h> // for O_RDWR, O_RSYNC
|
||||||
#include <fcntl.h>
|
|
||||||
#include <new>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h> // for PROT_READ, PROT_WRITE, MAP_SHARED
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
// FPGA register access constants
|
// FPGA register access constants
|
||||||
@ -248,8 +241,14 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel)
|
|||||||
int32_t numdevice = d_device_base + d_channel;
|
int32_t numdevice = d_device_base + d_channel;
|
||||||
devicebasetemp << numdevice;
|
devicebasetemp << numdevice;
|
||||||
mergedname = d_device_name + devicebasetemp.str();
|
mergedname = d_device_name + devicebasetemp.str();
|
||||||
strcpy(device_io_name, mergedname.substr(0, MAX_LENGTH_DEVICEIO_NAME).c_str());
|
|
||||||
|
|
||||||
|
if (mergedname.size() > MAX_LENGTH_DEVICEIO_NAME)
|
||||||
|
{
|
||||||
|
mergedname = mergedname.substr(0, MAX_LENGTH_DEVICEIO_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
mergedname.copy(device_io_name, mergedname.size() + 1);
|
||||||
|
device_io_name[mergedname.size()] = '\0';
|
||||||
std::cout << "trk device_io_name = " << device_io_name << std::endl;
|
std::cout << "trk device_io_name = " << device_io_name << std::endl;
|
||||||
|
|
||||||
if ((d_device_descriptor = open(device_io_name, O_RDWR | O_SYNC)) == -1)
|
if ((d_device_descriptor = open(device_io_name, O_RDWR | O_SYNC)) == -1)
|
||||||
@ -267,14 +266,14 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel)
|
|||||||
std::cout << "Cannot map deviceio" << device_io_name << std::endl;
|
std::cout << "Cannot map deviceio" << device_io_name << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanity check : check test register
|
// sanity check: check test register
|
||||||
uint32_t writeval = TEST_REGISTER_TRACK_WRITEVAL;
|
uint32_t writeval = TEST_REGISTER_TRACK_WRITEVAL;
|
||||||
uint32_t readval;
|
uint32_t readval;
|
||||||
readval = Fpga_Multicorrelator_8sc::fpga_acquisition_test_register(writeval);
|
readval = Fpga_Multicorrelator_8sc::fpga_acquisition_test_register(writeval);
|
||||||
if (writeval != readval)
|
if (writeval != readval)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Test register sanity check failed";
|
LOG(WARNING) << "Test register sanity check failed";
|
||||||
std::cout << "tracking test register sanity check failed" << std::endl;
|
std::cout << "Tracking test register sanity check failed" << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -343,8 +342,7 @@ void Fpga_Multicorrelator_8sc::fpga_compute_code_shift_parameters(void)
|
|||||||
|
|
||||||
for (i = 0; i < d_n_correlators; i++)
|
for (i = 0; i < d_n_correlators; i++)
|
||||||
{
|
{
|
||||||
temp_calculation = floor(
|
temp_calculation = floor(d_shifts_chips[i] - d_rem_code_phase_chips);
|
||||||
d_shifts_chips[i] - d_rem_code_phase_chips);
|
|
||||||
|
|
||||||
if (temp_calculation < 0)
|
if (temp_calculation < 0)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#define GNSS_SDR_FPGA_MULTICORRELATOR_8SC_H_
|
#define GNSS_SDR_FPGA_MULTICORRELATOR_8SC_H_
|
||||||
|
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
// FPGA register addresses
|
// FPGA register addresses
|
||||||
|
@ -487,13 +487,13 @@ bool Galileo_Fnav_Message::have_new_ephemeris() // Check if we have a new ephem
|
|||||||
// if all ephemeris pages have the same IOD, then they belong to the same block
|
// if all ephemeris pages have the same IOD, then they belong to the same block
|
||||||
if ((FNAV_IODnav_1 == FNAV_IODnav_2) and (FNAV_IODnav_3 == FNAV_IODnav_4) and (FNAV_IODnav_1 == FNAV_IODnav_3))
|
if ((FNAV_IODnav_1 == FNAV_IODnav_2) and (FNAV_IODnav_3 == FNAV_IODnav_4) and (FNAV_IODnav_1 == FNAV_IODnav_3))
|
||||||
{
|
{
|
||||||
std::cout << "Ephemeris (1, 2, 3) have been received and belong to the same batch" << std::endl;
|
DLOG(INFO) << "Ephemeris (1, 2, 3) have been received and belong to the same batch";
|
||||||
flag_ephemeris_1 = false; // clear the flag
|
flag_ephemeris_1 = false; // clear the flag
|
||||||
flag_ephemeris_2 = false; // clear the flag
|
flag_ephemeris_2 = false; // clear the flag
|
||||||
flag_ephemeris_3 = false; // clear the flag
|
flag_ephemeris_3 = false; // clear the flag
|
||||||
flag_all_ephemeris = true;
|
flag_all_ephemeris = true;
|
||||||
IOD_ephemeris = FNAV_IODnav_1;
|
IOD_ephemeris = FNAV_IODnav_1;
|
||||||
std::cout << "Batch number: " << IOD_ephemeris << std::endl;
|
DLOG(INFO) << "Batch number: " << IOD_ephemeris;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2082,10 +2082,13 @@ bool Gnuplot::get_program_path()
|
|||||||
// Retrieves a C string containing the value of environment variable PATH
|
// Retrieves a C string containing the value of environment variable PATH
|
||||||
path = std::getenv("PATH");
|
path = std::getenv("PATH");
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
s << path;
|
if (!path)
|
||||||
if (s.fail())
|
|
||||||
{
|
{
|
||||||
throw GnuplotException("Path is not set");
|
s << path;
|
||||||
|
}
|
||||||
|
if (s.fail() or s.gcount() == 0)
|
||||||
|
{
|
||||||
|
throw GnuplotException("PATH is not set");
|
||||||
}
|
}
|
||||||
std::string path_str = s.str();
|
std::string path_str = s.str();
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block,
|
|||||||
if (!rx_signal_file)
|
if (!rx_signal_file)
|
||||||
{
|
{
|
||||||
std::cerr << "Unable to open file!" << std::endl;
|
std::cerr << "Unable to open file!" << std::endl;
|
||||||
|
free(buffer_float);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,6 +124,9 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block,
|
|||||||
if (!buffer_DMA)
|
if (!buffer_DMA)
|
||||||
{
|
{
|
||||||
std::cerr << "Memory error!" << std::endl;
|
std::cerr << "Memory error!" << std::endl;
|
||||||
|
free(buffer_float);
|
||||||
|
fclose(rx_signal_file);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// open the DMA descriptor
|
// open the DMA descriptor
|
||||||
@ -130,6 +134,9 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block,
|
|||||||
if (dma_descr < 0)
|
if (dma_descr < 0)
|
||||||
{
|
{
|
||||||
std::cerr << "Can't open loop device\n";
|
std::cerr << "Can't open loop device\n";
|
||||||
|
free(buffer_float);
|
||||||
|
free(buffer_DMA);
|
||||||
|
fclose(rx_signal_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
|||||||
if (!buffer_DMA)
|
if (!buffer_DMA)
|
||||||
{
|
{
|
||||||
std::cerr << "Memory error!" << std::endl;
|
std::cerr << "Memory error!" << std::endl;
|
||||||
|
close(dma_descr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user