mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Replace C-style casts by C++ casts
This commit is contained in:
		| @@ -4103,7 +4103,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph, | |||||||
|                     std::string sys = "G"; |                     std::string sys = "G"; | ||||||
|                     gs.System = *sys.c_str(); |                     gs.System = *sys.c_str(); | ||||||
|                     std::string sig = "2S"; |                     std::string sig = "2S"; | ||||||
|                     std::memcpy((void*)gs.Signal, sig.c_str(), 3); |                     std::memcpy(static_cast<void*>(gs.Signal), sig.c_str(), 3); | ||||||
|                     gs.PRN = mmap_iter->second.PRN; |                     gs.PRN = mmap_iter->second.PRN; | ||||||
|                     total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(mmap_iter->second.PRN, gs)); |                     total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(mmap_iter->second.PRN, gs)); | ||||||
|                 } |                 } | ||||||
| @@ -4315,7 +4315,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | |||||||
|                             std::string sys = "E"; |                             std::string sys = "E"; | ||||||
|                             gs.System = *sys.c_str(); |                             gs.System = *sys.c_str(); | ||||||
|                             std::string sig = "1B"; |                             std::string sig = "1B"; | ||||||
|                             std::memcpy((void*)gs.Signal, sig.c_str(), 3); |                             std::memcpy(static_cast<void*>(gs.Signal), sig.c_str(), 3); | ||||||
|                             gs.PRN = prn_; |                             gs.PRN = prn_; | ||||||
|                             total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); |                             total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); | ||||||
|                         } |                         } | ||||||
| @@ -4340,7 +4340,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | |||||||
|                                 std::string sys = "E"; |                                 std::string sys = "E"; | ||||||
|                                 gs.System = *sys.c_str(); |                                 gs.System = *sys.c_str(); | ||||||
|                                 std::string sig = "1B"; |                                 std::string sig = "1B"; | ||||||
|                                 std::memcpy((void*)gs.Signal, sig.c_str(), 3); |                                 std::memcpy(static_cast<void*>(gs.Signal), sig.c_str(), 3); | ||||||
|                                 gs.PRN = prn_; |                                 gs.PRN = prn_; | ||||||
|                                 total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); |                                 total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); | ||||||
|                             } |                             } | ||||||
| @@ -4350,7 +4350,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | |||||||
|                                 std::string sys = "E"; |                                 std::string sys = "E"; | ||||||
|                                 gs.System = *sys.c_str(); |                                 gs.System = *sys.c_str(); | ||||||
|                                 std::string sig = "5X"; |                                 std::string sig = "5X"; | ||||||
|                                 std::memcpy((void*)gs.Signal, sig.c_str(), 3); |                                 std::memcpy(static_cast<void*>(gs.Signal), sig.c_str(), 3); | ||||||
|                                 gs.PRN = prn_; |                                 gs.PRN = prn_; | ||||||
|                                 total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); |                                 total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); | ||||||
|                             } |                             } | ||||||
| @@ -4366,7 +4366,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | |||||||
|                                         std::string sys = "E"; |                                         std::string sys = "E"; | ||||||
|                                         gs.System = *sys.c_str(); |                                         gs.System = *sys.c_str(); | ||||||
|                                         std::string sig = "5X"; |                                         std::string sig = "5X"; | ||||||
|                                         std::memcpy((void*)gs.Signal, sig.c_str(), 3); |                                         std::memcpy(static_cast<void*>(gs.Signal), sig.c_str(), 3); | ||||||
|                                         gs.PRN = prn_; |                                         gs.PRN = prn_; | ||||||
|                                         total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); |                                         total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs)); | ||||||
|                                     } |                                     } | ||||||
|   | |||||||
| @@ -211,7 +211,7 @@ void gps_fpga_acquisition_8sc::run_acquisition(void) | |||||||
| { | { | ||||||
|     // enable interrupts |     // enable interrupts | ||||||
|     int reenable = 1; |     int reenable = 1; | ||||||
|     write(d_fd, (void *) &reenable, sizeof(int)); |     write(d_fd, reinterpret_cast<void*>(&reenable), sizeof(int)); | ||||||
|  |  | ||||||
|     d_map_base[5] = 0; // writing anything to reg 4 launches the acquisition process |     d_map_base[5] = 0; // writing anything to reg 4 launches the acquisition process | ||||||
|  |  | ||||||
| @@ -241,7 +241,7 @@ void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index) | |||||||
|     float phase_step_rad_int_temp; |     float phase_step_rad_int_temp; | ||||||
|     int32_t phase_step_rad_int; |     int32_t phase_step_rad_int; | ||||||
|  |  | ||||||
|     int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index; |     int doppler = static_cast<int>(-d_doppler_max) + d_doppler_step * doppler_index; | ||||||
|     float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in); |     float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in); | ||||||
|     // The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing |     // The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing | ||||||
|     // The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi) |     // The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi) | ||||||
| @@ -297,10 +297,10 @@ void gps_fpga_acquisition_8sc::open_device() | |||||||
|             LOG(WARNING) << "Cannot open deviceio" << d_device_name; |             LOG(WARNING) << "Cannot open deviceio" << d_device_name; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     d_map_base = (volatile unsigned *) mmap(NULL, PAGE_SIZE, |     d_map_base = reinterpret_cast<volatile unsigned *>(mmap(NULL, PAGE_SIZE, | ||||||
|             PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0); |             PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0)); | ||||||
|  |  | ||||||
|     if (d_map_base == (void *) -1) |     if (d_map_base == reinterpret_cast<void*>(-1)) | ||||||
|         { |         { | ||||||
|             LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory"; |             LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory"; | ||||||
|         } |         } | ||||||
| @@ -328,7 +328,8 @@ void gps_fpga_acquisition_8sc::open_device() | |||||||
|  |  | ||||||
| void gps_fpga_acquisition_8sc::close_device() | void gps_fpga_acquisition_8sc::close_device() | ||||||
| { | { | ||||||
|     if (munmap((void*) d_map_base, PAGE_SIZE) == -1) |     unsigned * aux = const_cast<unsigned*>(d_map_base); | ||||||
|  |     if (munmap(static_cast<void*>(aux), PAGE_SIZE) == -1) | ||||||
|         { |         { | ||||||
|             printf("Failed to unmap memory uio\n"); |             printf("Failed to unmap memory uio\n"); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -93,15 +93,16 @@ Channel::Channel(ConfigurationInterface *configuration, unsigned int channel, | |||||||
|     gnss_signal_ = Gnss_Signal(implementation_); |     gnss_signal_ = Gnss_Signal(implementation_); | ||||||
|  |  | ||||||
|     channel_msg_rx = channel_msg_receiver_make_cc(&channel_fsm_, repeat_); |     channel_msg_rx = channel_msg_receiver_make_cc(&channel_fsm_, repeat_); | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| // Destructor | // Destructor | ||||||
| Channel::~Channel() | Channel::~Channel() | ||||||
| { | { | ||||||
|     channel_fsm_.terminate(); |     channel_fsm_.terminate(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void Channel::connect(gr::top_block_sptr top_block) | void Channel::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (connected_) |     if (connected_) | ||||||
| @@ -183,7 +184,7 @@ void Channel::set_signal(const Gnss_Signal& gnss_signal) | |||||||
|     gnss_signal_ = gnss_signal; |     gnss_signal_ = gnss_signal; | ||||||
|     std::string str_aux = gnss_signal_.get_signal_str(); |     std::string str_aux = gnss_signal_.get_signal_str(); | ||||||
|     const char * str = str_aux.c_str(); // get a C style null terminated string |     const char * str = str_aux.c_str(); // get a C style null terminated string | ||||||
|     std::memcpy((void*)gnss_synchro_.Signal, str, 3); // copy string into synchro char array: 2 char + null |     std::memcpy(static_cast<void*>(gnss_synchro_.Signal), str, 3); // copy string into synchro char array: 2 char + null | ||||||
|     gnss_synchro_.Signal[2] = 0; // make sure that string length is only two characters |     gnss_synchro_.Signal[2] = 0; // make sure that string length is only two characters | ||||||
|     gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN(); |     gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN(); | ||||||
|     gnss_synchro_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0]; |     gnss_synchro_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0]; | ||||||
|   | |||||||
| @@ -431,7 +431,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri | |||||||
|     current_synchro_data.System = {'E'}; |     current_synchro_data.System = {'E'}; | ||||||
|     std::string str_aux = "1B"; |     std::string str_aux = "1B"; | ||||||
|     const char * str = str_aux.c_str(); // get a C style null terminated string |     const char * str = str_aux.c_str(); // get a C style null terminated string | ||||||
|     std::memcpy((void*)current_synchro_data.Signal, str, 3); |     std::memcpy(static_cast<void*>(current_synchro_data.Signal), str, 3); | ||||||
|  |  | ||||||
|     current_synchro_data.fs = d_fs_in; |     current_synchro_data.fs = d_fs_in; | ||||||
|     *out[0] = current_synchro_data; |     *out[0] = current_synchro_data; | ||||||
|   | |||||||
| @@ -441,7 +441,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr | |||||||
|     current_synchro_data.System = {'E'}; |     current_synchro_data.System = {'E'}; | ||||||
|     std::string str_aux = "1B"; |     std::string str_aux = "1B"; | ||||||
|     const char * str = str_aux.c_str(); // get a C style null terminated string |     const char * str = str_aux.c_str(); // get a C style null terminated string | ||||||
|     std::memcpy((void*)current_synchro_data.Signal, str, 3); |     std::memcpy(static_cast<void*>(current_synchro_data.Signal), str, 3); | ||||||
|  |  | ||||||
|     current_synchro_data.fs = d_fs_in; |     current_synchro_data.fs = d_fs_in; | ||||||
|     *out[0] = current_synchro_data; |     *out[0] = current_synchro_data; | ||||||
|   | |||||||
| @@ -482,7 +482,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri | |||||||
|     current_synchro_data.System = {'G'}; |     current_synchro_data.System = {'G'}; | ||||||
|     std::string str_aux = "1C"; |     std::string str_aux = "1C"; | ||||||
|     const char * str = str_aux.c_str(); // get a C style null terminated string |     const char * str = str_aux.c_str(); // get a C style null terminated string | ||||||
|     std::memcpy((void*)current_synchro_data.Signal, str, 3); |     std::memcpy(static_cast<void*>(current_synchro_data.Signal), str, 3); | ||||||
|  |  | ||||||
|     current_synchro_data.fs = d_fs_in; |     current_synchro_data.fs = d_fs_in; | ||||||
|     *out[0] = current_synchro_data; |     *out[0] = current_synchro_data; | ||||||
|   | |||||||
| @@ -149,7 +149,6 @@ bool fpga_multicorrelator_8sc::Carrier_wipeoff_multicorrelator_resampler( | |||||||
| fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int n_correlators, | fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int n_correlators, | ||||||
|         std::string device_name, unsigned int device_base) |         std::string device_name, unsigned int device_base) | ||||||
| { | { | ||||||
|  |  | ||||||
|     d_n_correlators = n_correlators; |     d_n_correlators = n_correlators; | ||||||
|     d_device_name = device_name; |     d_device_name = device_name; | ||||||
|     d_device_base = device_base; |     d_device_base = device_base; | ||||||
| @@ -188,7 +187,6 @@ fpga_multicorrelator_8sc::~fpga_multicorrelator_8sc() | |||||||
| bool fpga_multicorrelator_8sc::free() | bool fpga_multicorrelator_8sc::free() | ||||||
| { | { | ||||||
|     // unlock the hardware |     // unlock the hardware | ||||||
|  |  | ||||||
|     fpga_multicorrelator_8sc::unlock_channel(); // unlock the channel |     fpga_multicorrelator_8sc::unlock_channel(); // unlock the channel | ||||||
|  |  | ||||||
|     // free the FPGA dynamically created variables |     // free the FPGA dynamically created variables | ||||||
| @@ -228,10 +226,10 @@ void fpga_multicorrelator_8sc::set_channel(unsigned int channel) | |||||||
|             LOG(WARNING) << "Cannot open deviceio" << device_io_name; |             LOG(WARNING) << "Cannot open deviceio" << device_io_name; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     d_map_base = (volatile unsigned *) mmap(NULL, PAGE_SIZE, |     d_map_base = reinterpret_cast<volatile unsigned *>(mmap(NULL, PAGE_SIZE, | ||||||
|             PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0); |             PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0)); | ||||||
|  |  | ||||||
|     if (d_map_base == (void *) -1) |     if (d_map_base == reinterpret_cast<void*>(-1)) | ||||||
|         { |         { | ||||||
|             LOG(WARNING) << "Cannot map the FPGA tracking module " |             LOG(WARNING) << "Cannot map the FPGA tracking module " | ||||||
|                     << d_channel << "into user memory"; |                     << d_channel << "into user memory"; | ||||||
| @@ -240,8 +238,7 @@ void fpga_multicorrelator_8sc::set_channel(unsigned int channel) | |||||||
|     // sanity check : check test register |     // sanity check : check test register | ||||||
|     unsigned writeval = TEST_REGISTER_TRACK_WRITEVAL; |     unsigned writeval = TEST_REGISTER_TRACK_WRITEVAL; | ||||||
|     unsigned readval; |     unsigned readval; | ||||||
|     readval = fpga_multicorrelator_8sc::fpga_acquisition_test_register( |     readval = fpga_multicorrelator_8sc::fpga_acquisition_test_register(writeval); | ||||||
|             writeval); |  | ||||||
|     if (writeval != readval) |     if (writeval != readval) | ||||||
|         { |         { | ||||||
|             LOG(WARNING) << "Test register sanity check failed"; |             LOG(WARNING) << "Test register sanity check failed"; | ||||||
| @@ -250,7 +247,6 @@ void fpga_multicorrelator_8sc::set_channel(unsigned int channel) | |||||||
|         { |         { | ||||||
|             LOG(INFO) << "Test register sanity check success !"; |             LOG(INFO) << "Test register sanity check success !"; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -269,7 +265,6 @@ unsigned fpga_multicorrelator_8sc::fpga_acquisition_test_register( | |||||||
|  |  | ||||||
| void fpga_multicorrelator_8sc::fpga_configure_tracking_gps_local_code(void) | void fpga_multicorrelator_8sc::fpga_configure_tracking_gps_local_code(void) | ||||||
| { | { | ||||||
|  |  | ||||||
|     int k, s; |     int k, s; | ||||||
|     unsigned code_chip; |     unsigned code_chip; | ||||||
|     unsigned select_fpga_correlator; |     unsigned select_fpga_correlator; | ||||||
| @@ -278,7 +273,6 @@ void fpga_multicorrelator_8sc::fpga_configure_tracking_gps_local_code(void) | |||||||
|  |  | ||||||
|     for (s = 0; s < d_n_correlators; s++) |     for (s = 0; s < d_n_correlators; s++) | ||||||
|         { |         { | ||||||
|  |  | ||||||
|             d_map_base[11] = LOCAL_CODE_FPGA_CLEAR_ADDRESS_COUNTER; |             d_map_base[11] = LOCAL_CODE_FPGA_CLEAR_ADDRESS_COUNTER; | ||||||
|             for (k = 0; k < d_code_length_chips; k++) |             for (k = 0; k < d_code_length_chips; k++) | ||||||
|                 { |                 { | ||||||
| @@ -393,7 +387,7 @@ void fpga_multicorrelator_8sc::fpga_launch_multicorrelator_fpga(void) | |||||||
| { | { | ||||||
|     // enable interrupts |     // enable interrupts | ||||||
|     int reenable = 1; |     int reenable = 1; | ||||||
|     write(d_device_descriptor, (void *) &reenable, sizeof(int)); |     write(d_device_descriptor, reinterpret_cast<void*>(&reenable), sizeof(int)); | ||||||
|  |  | ||||||
|     d_map_base[14] = 0; // writing anything to reg 14 launches the tracking |     d_map_base[14] = 0; // writing anything to reg 14 launches the tracking | ||||||
| } | } | ||||||
| @@ -423,7 +417,6 @@ void fpga_multicorrelator_8sc::read_tracking_gps_results(void) | |||||||
|  |  | ||||||
|             d_corr_out[k] = lv_cmake(readval_real, readval_imag); |             d_corr_out[k] = lv_cmake(readval_real, readval_imag); | ||||||
|         } |         } | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -141,7 +141,7 @@ void GpsL2MPcpsAcquisitionTest::init() | |||||||
|     gnss_synchro.System = 'G'; |     gnss_synchro.System = 'G'; | ||||||
|     std::string signal = "2S"; |     std::string signal = "2S"; | ||||||
|     //strncpy(gnss_synchro.Signal, signal.c_str(), 3); |     //strncpy(gnss_synchro.Signal, signal.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro.Signal, signal.c_str(), 3); // copy string into synchro char array: 2 char + null |     std::memcpy(static_cast<void*>(gnss_synchro.Signal), signal.c_str(), 3); // copy string into synchro char array: 2 char + null | ||||||
|     gnss_synchro.Signal[2] = 0; // make sure that string length is only two characters |     gnss_synchro.Signal[2] = 0; // make sure that string length is only two characters | ||||||
|     gnss_synchro.PRN = 7; |     gnss_synchro.PRN = 7; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -158,10 +158,10 @@ TEST(RinexPrinterTest, GalileoObsLog) | |||||||
|     gs4.System = *sys.c_str(); |     gs4.System = *sys.c_str(); | ||||||
|  |  | ||||||
|     std::string sig = "1B"; |     std::string sig = "1B"; | ||||||
|     std::memcpy((void*)gs1.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs1.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs2.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs2.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs3.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs3.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs4.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs4.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     gs1.PRN = 3; |     gs1.PRN = 3; | ||||||
|     gs2.PRN = 8; |     gs2.PRN = 8; | ||||||
| @@ -227,12 +227,12 @@ TEST(RinexPrinterTest, GpsObsLogDualBand) | |||||||
|     gs4.System = *sys.c_str(); |     gs4.System = *sys.c_str(); | ||||||
|  |  | ||||||
|     std::string sig = "1C"; |     std::string sig = "1C"; | ||||||
|     std::memcpy((void*)gs1.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs1.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs2.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs2.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     sig = "2S"; |     sig = "2S"; | ||||||
|     std::memcpy((void*)gs3.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs3.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs4.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs4.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     gs1.PRN = 3; |     gs1.PRN = 3; | ||||||
|     gs2.PRN = 8; |     gs2.PRN = 8; | ||||||
| @@ -309,12 +309,12 @@ TEST(RinexPrinterTest, GalileoObsLogDualBand) | |||||||
|     gs4.System = *sys.c_str(); |     gs4.System = *sys.c_str(); | ||||||
|  |  | ||||||
|     std::string sig = "1B"; |     std::string sig = "1B"; | ||||||
|     std::memcpy((void*)gs1.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs1.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs2.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs2.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     sig = "5X"; |     sig = "5X"; | ||||||
|     std::memcpy((void*)gs3.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs3.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs4.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs4.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     gs1.PRN = 3; |     gs1.PRN = 3; | ||||||
|     gs2.PRN = 8; |     gs2.PRN = 8; | ||||||
| @@ -401,18 +401,18 @@ TEST(RinexPrinterTest, MixedObsLog) | |||||||
|     gs8.System = *sys.c_str(); |     gs8.System = *sys.c_str(); | ||||||
|  |  | ||||||
|     std::string sig = "1C"; |     std::string sig = "1C"; | ||||||
|     std::memcpy((void*)gs1.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs1.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs2.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs2.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs3.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs3.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs4.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs4.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     sig = "5X"; |     sig = "5X"; | ||||||
|     std::memcpy((void*)gs5.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs5.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs6.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs6.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     sig = "1B"; |     sig = "1B"; | ||||||
|     std::memcpy((void*)gs7.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs7.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gs8.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gs8.Signal), sig.c_str(), 3); | ||||||
|  |  | ||||||
|     gs1.PRN = 3; |     gs1.PRN = 3; | ||||||
|     gs2.PRN = 8; |     gs2.PRN = 8; | ||||||
|   | |||||||
| @@ -198,7 +198,7 @@ TEST(RtcmTest, MT1001) | |||||||
|  |  | ||||||
|     std::string sig = "1C"; |     std::string sig = "1C"; | ||||||
|     gnss_synchro.System = *sys.c_str(); |     gnss_synchro.System = *sys.c_str(); | ||||||
|     std::memcpy((void*)gnss_synchro.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro.Signal), sig.c_str(), 3); | ||||||
|     gnss_synchro.Pseudorange_m = 20000000.0; |     gnss_synchro.Pseudorange_m = 20000000.0; | ||||||
|     double obs_time = 25.0; |     double obs_time = 25.0; | ||||||
|     std::map<int, Gnss_Synchro> pseudoranges; |     std::map<int, Gnss_Synchro> pseudoranges; | ||||||
| @@ -348,11 +348,11 @@ TEST(RtcmTest, MSMCell) | |||||||
|     gnss_synchro4.System = *gal.c_str(); |     gnss_synchro4.System = *gal.c_str(); | ||||||
|     gnss_synchro5.System = *gps.c_str(); |     gnss_synchro5.System = *gps.c_str(); | ||||||
|  |  | ||||||
|     std::memcpy((void*)gnss_synchro.Signal, x5.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro.Signal), x5.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro2.Signal, s2.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro2.Signal), s2.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro3.Signal, c1.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro3.Signal), c1.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro4.Signal, x5.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro4.Signal), x5.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro5.Signal, c1.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro5.Signal), c1.c_str(), 3); | ||||||
|  |  | ||||||
|     gnss_synchro.Pseudorange_m = 20000000.0; |     gnss_synchro.Pseudorange_m = 20000000.0; | ||||||
|     gnss_synchro2.Pseudorange_m = 20001010.0; |     gnss_synchro2.Pseudorange_m = 20001010.0; | ||||||
| @@ -419,7 +419,7 @@ TEST(RtcmTest, MSMCell) | |||||||
|     Gnss_Synchro gnss_synchro6; |     Gnss_Synchro gnss_synchro6; | ||||||
|     gnss_synchro6.PRN = 10; |     gnss_synchro6.PRN = 10; | ||||||
|     gnss_synchro6.System = *gps.c_str(); |     gnss_synchro6.System = *gps.c_str(); | ||||||
|     std::memcpy((void*)gnss_synchro6.Signal, s2.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro6.Signal), s2.c_str(), 3); | ||||||
|     gnss_synchro6.Pseudorange_m = 24000000.0; |     gnss_synchro6.Pseudorange_m = 24000000.0; | ||||||
|  |  | ||||||
|     std::map<int, Gnss_Synchro> pseudoranges3; |     std::map<int, Gnss_Synchro> pseudoranges3; | ||||||
| @@ -472,10 +472,10 @@ TEST(RtcmTest, MSM1) | |||||||
|     gnss_synchro3.System = *sys.c_str(); |     gnss_synchro3.System = *sys.c_str(); | ||||||
|     gnss_synchro4.System = *sys.c_str(); |     gnss_synchro4.System = *sys.c_str(); | ||||||
|  |  | ||||||
|     std::memcpy((void*)gnss_synchro.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro2.Signal, sig.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro2.Signal), sig.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro3.Signal, sig2.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro3.Signal), sig2.c_str(), 3); | ||||||
|     std::memcpy((void*)gnss_synchro4.Signal, sig2.c_str(), 3); |     std::memcpy(static_cast<void*>(gnss_synchro4.Signal), sig2.c_str(), 3); | ||||||
|  |  | ||||||
|     gnss_synchro.Pseudorange_m = 20000000.0; |     gnss_synchro.Pseudorange_m = 20000000.0; | ||||||
|     gnss_synchro2.Pseudorange_m = 20001010.0; |     gnss_synchro2.Pseudorange_m = 20001010.0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez