mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-09-02 10:57:59 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
@@ -52,6 +52,7 @@ option(ENABLE_OPENCL "Enable building of processing blocks implemented with Open
|
||||
option(ENABLE_GENERIC_ARCH "Builds a portable binary" OFF)
|
||||
option(ENABLE_PACKAGING "Enable software packaging" OFF)
|
||||
option(ENABLE_OWN_GLOG "Download glog and link it to gflags" OFF)
|
||||
option(ENABLE_LOG "Enable logging" ON)
|
||||
if(ENABLE_PACKAGING)
|
||||
set(ENABLE_GENERIC_ARCH ON)
|
||||
endif(ENABLE_PACKAGING)
|
||||
@@ -596,6 +597,11 @@ else(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
set_property(TARGET glog-${glog_RELEASE} PROPERTY IMPORTED_LOCATION "${GLOG_LIBRARIES}")
|
||||
endif(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
|
||||
if(NOT ENABLE_LOG)
|
||||
message(STATUS "Logging is not enabled")
|
||||
add_definitions(-DGOOGLE_STRIP_LOG=1)
|
||||
endif(NOT ENABLE_LOG)
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
|
@@ -101,7 +101,7 @@ int Nmea_Printer::init_serial (std::string serial_device)
|
||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
if (fd == -1) return fd; //failed to open TTY port
|
||||
|
||||
fcntl(fd, F_SETFL, 0); // clear all flags on descriptor, enable direct I/O
|
||||
if(fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
|
||||
BAUD = B9600;
|
||||
|
@@ -526,7 +526,7 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
||||
// account for the possibility of non-scientific
|
||||
// notation (more than one digit to the left of the
|
||||
// decimal)
|
||||
if (idx > startPos)
|
||||
if ((idx > startPos) && (idx >= 1))
|
||||
{
|
||||
redoexp = true;
|
||||
// Swap digit and decimal.
|
||||
|
@@ -84,14 +84,16 @@ Rtcm_Printer::~Rtcm_Printer()
|
||||
long pos;
|
||||
rtcm_file_descriptor.close();
|
||||
pos = rtcm_file_descriptor.tellp();
|
||||
if (pos == 0) remove(rtcm_filename.c_str());
|
||||
if (pos == 0)
|
||||
{
|
||||
if(remove(rtcm_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary file";
|
||||
}
|
||||
}
|
||||
close_serial();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int Rtcm_Printer::init_serial(std::string serial_device)
|
||||
{
|
||||
/*!
|
||||
@@ -108,7 +110,7 @@ int Rtcm_Printer::init_serial(std::string serial_device)
|
||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
if (fd == -1) return fd; // failed to open TTY port
|
||||
|
||||
fcntl(fd, F_SETFL, 0); // clear all flags on descriptor, enable direct I/O
|
||||
if(fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
|
||||
BAUD = B9600;
|
||||
|
@@ -137,6 +137,20 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
d_doppler_step = 250;
|
||||
d_grid_doppler_wipeoffs = 0;
|
||||
d_gnss_synchro = 0;
|
||||
d_code_phase = 0;
|
||||
d_doppler_freq = 0;
|
||||
d_test_statistics = 0;
|
||||
d_channel_internal_queue = 0;
|
||||
d_CAF_vector_I = 0;
|
||||
d_CAF_vector_Q = 0;
|
||||
d_channel = 0;
|
||||
d_gr_stream_buffer = 0;
|
||||
}
|
||||
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc::~galileo_e5a_noncoherentIQ_acquisition_caf_cc()
|
||||
|
@@ -92,6 +92,17 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
d_doppler_step = 0;
|
||||
d_grid_doppler_wipeoffs = 0;
|
||||
d_gnss_synchro = 0;
|
||||
d_code_phase = 0;
|
||||
d_doppler_freq = 0;
|
||||
d_test_statistics = 0;
|
||||
d_channel_internal_queue = 0;
|
||||
d_channel = 0;
|
||||
}
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
|
@@ -126,5 +126,5 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||
}
|
||||
|
||||
free(_code);
|
||||
delete[] _code;
|
||||
}
|
||||
|
@@ -260,6 +260,15 @@ galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
|
||||
|
||||
d_CRC_error_counter = 0;
|
||||
d_sign_init = 0;
|
||||
|
||||
d_flag_preamble = false;
|
||||
d_ephemeris_queue = 0;
|
||||
d_iono_queue = 0;
|
||||
d_utc_model_queue = 0;
|
||||
d_almanac_queue = 0;
|
||||
d_channel = 0;
|
||||
Prn_timestamp_at_preamble_ms = 0;
|
||||
flag_TOW_set = false;
|
||||
}
|
||||
|
||||
galileo_e5a_telemetry_decoder_cc::~galileo_e5a_telemetry_decoder_cc()
|
||||
|
@@ -104,7 +104,7 @@ private:
|
||||
signed int d_preamble_bits[GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
// signed int d_page_symbols[GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
double d_page_symbols[GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
signed int *d_preamble_symbols;
|
||||
// signed int *d_preamble_symbols;
|
||||
double d_current_symbol;
|
||||
long unsigned int d_symbol_counter;
|
||||
int d_prompt_counter;
|
||||
|
@@ -338,7 +338,11 @@ int Viterbi_Decoder::do_tb_and_decode(int traceback_length, int requested_decodi
|
||||
state = it->get_anchestor_state_of_current_state(state);
|
||||
t_out--;
|
||||
}
|
||||
if(n_im > 0)
|
||||
{
|
||||
indicator_metric /= n_im;
|
||||
}
|
||||
|
||||
VLOG(BLOCK) << "indicator metric: " << indicator_metric;
|
||||
// remove old states
|
||||
if (d_trellis_paths.begin() + traceback_length + overstep_length <= d_trellis_paths.end())
|
||||
|
@@ -273,7 +273,7 @@ void Gnss_Satellite::set_block(const std::string& system_, unsigned int PRN_ )
|
||||
block = std::string("IIR-M"); //Plane A
|
||||
break;
|
||||
case 8 :
|
||||
block = std::string("UNKNOWN"); // Decommissioned
|
||||
block = std::string("IIA*"); // Decommissed
|
||||
break;
|
||||
case 9 :
|
||||
block = std::string("IIF"); //Plane F
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#define GNSS_SDR_VERSION "0.0.5"
|
||||
#endif
|
||||
|
||||
#ifndef GOOGLE_STRIP_LOG
|
||||
#define GOOGLE_STRIP_LOG 0
|
||||
#endif
|
||||
|
||||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
@@ -131,6 +135,8 @@ int main(int argc, char** argv)
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
std::cout << "Initializing GNSS-SDR v" << gnss_sdr_version << " ... Please wait." << std::endl;
|
||||
|
||||
if(GOOGLE_STRIP_LOG == 0)
|
||||
{
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
if (FLAGS_log_dir.empty())
|
||||
{
|
||||
@@ -160,6 +166,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
std::cout << "Logging with be done at " << FLAGS_log_dir << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<ControlThread> control_thread(new ControlThread());
|
||||
|
||||
@@ -176,14 +183,14 @@ int main(int argc, char** argv)
|
||||
{
|
||||
LOG(FATAL) << "Boost exception: " << boost::diagnostic_information(e);
|
||||
}
|
||||
catch( boost::lock_error & le )
|
||||
{
|
||||
LOG(FATAL) << "Lock error exception: " << boost::diagnostic_information(le);
|
||||
}
|
||||
catch(std::exception const& ex)
|
||||
{
|
||||
LOG(FATAL) << "STD exception: " << ex.what();
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
LOG(INFO) << "Unexpected catch";
|
||||
}
|
||||
// report the elapsed time
|
||||
gettimeofday(&tv, NULL);
|
||||
long long int end = tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
|
Reference in New Issue
Block a user