mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-10-04 06:41:49 +00:00
bds_b3i: merging new changes, fixing small bugs
This commit is contained in:
@@ -26,34 +26,47 @@ source_group(Headers FILES ${FRONT_END_CAL_HEADERS})
|
||||
target_link_libraries(front_end_cal_lib
|
||||
PUBLIC
|
||||
Armadillo::armadillo
|
||||
${THREAD_LIBRARIES}
|
||||
acq_adapters
|
||||
Threads::Threads
|
||||
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
|
||||
rx_core_lib
|
||||
signal_source_adapters
|
||||
signal_source_gr_blocks
|
||||
signal_source_libs
|
||||
acquisition_adapters
|
||||
gnss_sdr_flags
|
||||
gnss_rx
|
||||
channel_fsm
|
||||
gnss_sp_libs
|
||||
channel_libs
|
||||
algorithms_libs
|
||||
core_receiver
|
||||
core_libs
|
||||
PRIVATE
|
||||
Boost::boost
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Gnuradio::blocks
|
||||
Gnuradio::runtime
|
||||
Boost::serialization
|
||||
Boost::thread
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(front_end_cal_lib
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||
|
||||
target_link_libraries(front-end-cal
|
||||
PUBLIC
|
||||
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
|
||||
rx_core_lib
|
||||
gnss_rx
|
||||
core_libs
|
||||
core_receiver
|
||||
front_end_cal_lib
|
||||
gnss_sdr_flags
|
||||
PRIVATE
|
||||
Boost::filesystem
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Armadillo::armadillo
|
||||
)
|
||||
|
||||
target_compile_definitions(front-end-cal
|
||||
@@ -61,6 +74,15 @@ target_compile_definitions(front-end-cal
|
||||
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(front-end-cal
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET front-end-cal POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
|
||||
|
||||
@@ -38,21 +38,18 @@
|
||||
#include "gps_iono.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_utc_model.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
extern concurrent_map<Gps_Ephemeris> global_gps_ephemeris_map;
|
||||
extern concurrent_map<Gps_Iono> global_gps_iono_map;
|
||||
extern concurrent_map<Gps_Utc_Model> global_gps_utc_model_map;
|
||||
extern concurrent_map<Gps_Almanac> global_gps_almanac_map;
|
||||
extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
extern Concurrent_Map<Gps_Ephemeris> global_gps_ephemeris_map;
|
||||
extern Concurrent_Map<Gps_Iono> global_gps_iono_map;
|
||||
extern Concurrent_Map<Gps_Utc_Model> global_gps_utc_model_map;
|
||||
extern Concurrent_Map<Gps_Almanac> global_gps_almanac_map;
|
||||
extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
|
||||
FrontEndCal::FrontEndCal() = default;
|
||||
|
||||
@@ -60,7 +57,7 @@ FrontEndCal::~FrontEndCal() = default;
|
||||
|
||||
bool FrontEndCal::read_assistance_from_XML()
|
||||
{
|
||||
gnss_sdr_supl_client supl_client_ephemeris_;
|
||||
Gnss_Sdr_Supl_Client supl_client_ephemeris_;
|
||||
std::string eph_xml_filename = "gps_ephemeris.xml";
|
||||
std::cout << "SUPL: Trying to read GPS ephemeris from XML file " << eph_xml_filename << std::endl;
|
||||
LOG(INFO) << "SUPL: Trying to read GPS ephemeris from XML file " << eph_xml_filename;
|
||||
@@ -87,8 +84,8 @@ bool FrontEndCal::read_assistance_from_XML()
|
||||
int FrontEndCal::Get_SUPL_Assist()
|
||||
{
|
||||
//######### GNSS Assistance #################################
|
||||
gnss_sdr_supl_client supl_client_acquisition_;
|
||||
gnss_sdr_supl_client supl_client_ephemeris_;
|
||||
Gnss_Sdr_Supl_Client supl_client_acquisition_;
|
||||
Gnss_Sdr_Supl_Client supl_client_ephemeris_;
|
||||
int supl_mcc; // Current network MCC (Mobile country code), 3 digits.
|
||||
int supl_mns; //Current network MNC (Mobile Network code), 2 or 3 digits.
|
||||
int supl_lac; // Current network LAC (Location area code),16 bits, 1-65520 are valid values.
|
||||
@@ -358,7 +355,7 @@ double FrontEndCal::estimate_doppler_from_eph(unsigned int PRN, double TOW, doub
|
||||
|
||||
//Doppler estimation
|
||||
arma::vec Doppler_Hz;
|
||||
Doppler_Hz = (obs_to_sat_velocity / GPS_C_m_s) * GPS_L1_FREQ_HZ;
|
||||
Doppler_Hz = (obs_to_sat_velocity / GPS_C_M_S) * GPS_L1_FREQ_HZ;
|
||||
double mean_Doppler_Hz;
|
||||
mean_Doppler_Hz = arma::mean(Doppler_Hz);
|
||||
return mean_Doppler_Hz;
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#include <boost/exception/detail/exception_ptr.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
@@ -73,6 +72,7 @@
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -81,14 +81,14 @@ using google::LogMessage;
|
||||
|
||||
DECLARE_string(log_dir);
|
||||
|
||||
concurrent_map<Gps_Ephemeris> global_gps_ephemeris_map;
|
||||
concurrent_map<Gps_Iono> global_gps_iono_map;
|
||||
concurrent_map<Gps_Utc_Model> global_gps_utc_model_map;
|
||||
concurrent_map<Gps_Almanac> global_gps_almanac_map;
|
||||
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
Concurrent_Map<Gps_Ephemeris> global_gps_ephemeris_map;
|
||||
Concurrent_Map<Gps_Iono> global_gps_iono_map;
|
||||
Concurrent_Map<Gps_Utc_Model> global_gps_utc_model_map;
|
||||
Concurrent_Map<Gps_Almanac> global_gps_almanac_map;
|
||||
Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
|
||||
bool stop;
|
||||
concurrent_queue<int> channel_internal_queue;
|
||||
Concurrent_Queue<int> channel_internal_queue;
|
||||
GpsL1CaPcpsAcquisitionFineDoppler* acquisition;
|
||||
Gnss_Synchro* gnss_synchro;
|
||||
std::vector<Gnss_Synchro> gnss_sync_vector;
|
||||
@@ -398,7 +398,7 @@ int main(int argc, char** argv)
|
||||
std::map<int, double> doppler_measurements_map;
|
||||
std::map<int, double> cn0_measurements_map;
|
||||
|
||||
boost::thread ch_thread;
|
||||
std::thread ch_thread;
|
||||
|
||||
// record startup time
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
@@ -417,9 +417,9 @@ int main(int argc, char** argv)
|
||||
stop = false;
|
||||
try
|
||||
{
|
||||
ch_thread = boost::thread(wait_message);
|
||||
ch_thread = std::thread(wait_message);
|
||||
}
|
||||
catch (const boost::thread_resource_error& e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Exception caught (thread resource error)";
|
||||
}
|
||||
@@ -457,7 +457,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
ch_thread.join();
|
||||
}
|
||||
catch (const boost::thread_resource_error& e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Exception caught while joining threads.";
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
clearvars;
|
||||
close all;
|
||||
addpath('./libs');
|
||||
samplingFreq = 6625000; %[Hz]
|
||||
channels=5;
|
||||
path='/archive/';
|
||||
observables_log_path=[path 'glo_observables.dat'];
|
||||
samplingFreq = 10000000; %[Hz]
|
||||
channels=18;
|
||||
path='/home/dmiralles/Documents/gnss-sdr/';
|
||||
observables_log_path=[path 'observables.dat'];
|
||||
GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path);
|
||||
|
||||
%%
|
||||
|
||||
@@ -65,9 +65,9 @@ if(Boost_FOUND)
|
||||
Boost::serialization
|
||||
${GPSTK_LIBRARY}
|
||||
Gflags::gflags
|
||||
gnss_system_parameters
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
algorithms_libs
|
||||
core_receiver
|
||||
core_system_parameters
|
||||
)
|
||||
|
||||
target_include_directories(rinex2assist
|
||||
@@ -97,5 +97,5 @@ if(Boost_FOUND)
|
||||
)
|
||||
else()
|
||||
message(STATUS "Boost Iostreams library not found.")
|
||||
message(STATUS "rinex2assist will not be built.")
|
||||
message(STATUS " rinex2assist will not be built.")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user