1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

Code formatting, adapt overflow fix to new variable name

This commit is contained in:
Carles Fernandez 2019-08-01 20:09:35 +02:00
parent a204278490
commit e686c38353
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 63 additions and 66 deletions

View File

@ -131,7 +131,6 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
// Send PVT status to gnss_flowgraph // Send PVT status to gnss_flowgraph
this->message_port_register_out(pmt::mp("status")); this->message_port_register_out(pmt::mp("status"));
mapStringValues_["1C"] = evGPS_1C; mapStringValues_["1C"] = evGPS_1C;
mapStringValues_["2S"] = evGPS_2S; mapStringValues_["2S"] = evGPS_2S;
mapStringValues_["L5"] = evGPS_L5; mapStringValues_["L5"] = evGPS_L5;
@ -1718,6 +1717,7 @@ void rtklib_pvt_gs::apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observabl
} }
} }
std::map<int, Gnss_Synchro> rtklib_pvt_gs::interpolate_observables(std::map<int, Gnss_Synchro>& observables_map_t0, std::map<int, Gnss_Synchro> rtklib_pvt_gs::interpolate_observables(std::map<int, Gnss_Synchro>& observables_map_t0,
std::map<int, Gnss_Synchro>& observables_map_t1, std::map<int, Gnss_Synchro>& observables_map_t1,
double rx_time_s) double rx_time_s)
@ -1742,7 +1742,6 @@ std::map<int, Gnss_Synchro> rtklib_pvt_gs::interpolate_observables(std::map<int,
observables_map_t0.cbegin()->second.RX_time); observables_map_t0.cbegin()->second.RX_time);
} }
std::map<int, Gnss_Synchro>::const_iterator observables_iter; std::map<int, Gnss_Synchro>::const_iterator observables_iter;
for (observables_iter = observables_map_t0.cbegin(); observables_iter != observables_map_t0.cend(); observables_iter++) for (observables_iter = observables_map_t0.cbegin(); observables_iter != observables_map_t0.cend(); observables_iter++)
{ {
@ -1767,6 +1766,7 @@ std::map<int, Gnss_Synchro> rtklib_pvt_gs::interpolate_observables(std::map<int,
return interp_observables_map; return interp_observables_map;
} }
int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items, int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items __attribute__((unused))) gr_vector_void_star& output_items __attribute__((unused)))
{ {
@ -1795,7 +1795,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
bool store_valid_observable = false; bool store_valid_observable = false;
if (tmp_eph_iter_gps != d_pvt_solver->gps_ephemeris_map.cend()) if (tmp_eph_iter_gps != d_internal_pvt_solver->gps_ephemeris_map.cend())
{ {
uint32_t prn_aux = tmp_eph_iter_gps->second.i_satellite_PRN; uint32_t prn_aux = tmp_eph_iter_gps->second.i_satellite_PRN;
if ((prn_aux == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1C")) if ((prn_aux == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1C"))
@ -1803,7 +1803,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
store_valid_observable = true; store_valid_observable = true;
} }
} }
if (tmp_eph_iter_gal != d_pvt_solver->galileo_ephemeris_map.cend()) if (tmp_eph_iter_gal != d_internal_pvt_solver->galileo_ephemeris_map.cend())
{ {
uint32_t prn_aux = tmp_eph_iter_gal->second.i_satellite_PRN; uint32_t prn_aux = tmp_eph_iter_gal->second.i_satellite_PRN;
if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "1B") or (std::string(in[i][epoch].Signal) == "5X"))) if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "1B") or (std::string(in[i][epoch].Signal) == "5X")))
@ -1811,7 +1811,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
store_valid_observable = true; store_valid_observable = true;
} }
} }
if (tmp_eph_iter_cnav != d_pvt_solver->gps_cnav_ephemeris_map.cend()) if (tmp_eph_iter_cnav != d_internal_pvt_solver->gps_cnav_ephemeris_map.cend())
{ {
uint32_t prn_aux = tmp_eph_iter_cnav->second.i_satellite_PRN; uint32_t prn_aux = tmp_eph_iter_cnav->second.i_satellite_PRN;
if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "2S") or (std::string(in[i][epoch].Signal) == "L5"))) if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "2S") or (std::string(in[i][epoch].Signal) == "L5")))
@ -1819,7 +1819,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
store_valid_observable = true; store_valid_observable = true;
} }
} }
if (tmp_eph_iter_glo_gnav != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) if (tmp_eph_iter_glo_gnav != d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend())
{ {
uint32_t prn_aux = tmp_eph_iter_glo_gnav->second.i_satellite_PRN; uint32_t prn_aux = tmp_eph_iter_glo_gnav->second.i_satellite_PRN;
if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "1G") or (std::string(in[i][epoch].Signal) == "2G"))) if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "1G") or (std::string(in[i][epoch].Signal) == "2G")))
@ -1827,7 +1827,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
store_valid_observable = true; store_valid_observable = true;
} }
} }
if (tmp_eph_iter_bds_dnav != d_pvt_solver->beidou_dnav_ephemeris_map.cend()) if (tmp_eph_iter_bds_dnav != d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend())
{ {
uint32_t prn_aux = tmp_eph_iter_bds_dnav->second.i_satellite_PRN; uint32_t prn_aux = tmp_eph_iter_bds_dnav->second.i_satellite_PRN;
if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "B1") or (std::string(in[i][epoch].Signal) == "B3"))) if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "B1") or (std::string(in[i][epoch].Signal) == "B3")))

View File

@ -139,7 +139,6 @@ private:
void msg_handler_telemetry(const pmt::pmt_t& msg); void msg_handler_telemetry(const pmt::pmt_t& msg);
enum StringValue enum StringValue
{ {
evGPS_1C, evGPS_1C,
@ -154,6 +153,7 @@ private:
evBDS_B2, evBDS_B2,
evBDS_B3 evBDS_B3
}; };
std::map<std::string, StringValue> mapStringValues_; std::map<std::string, StringValue> mapStringValues_;
void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map, void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map,

View File

@ -3,8 +3,8 @@
* \brief PVT solver based on rtklib library functions adapted to the GNSS-SDR * \brief PVT solver based on rtklib library functions adapted to the GNSS-SDR
* data flow and structures * data flow and structures
* \authors <ul> * \authors <ul>
* <li> 2017, Javier Arribas * <li> 2017-2019, Javier Arribas
* <li> 2017, Carles Fernandez * <li> 2017-2019, Carles Fernandez
* <li> 2007-2013, T. Takasu * <li> 2007-2013, T. Takasu
* </ul> * </ul>
* *

View File

@ -436,8 +436,6 @@ bool hybrid_observables_gs::interp_trk_obs(Gnss_Synchro &interpolated_obs, const
// << d_gnss_synchro_history->at(ch, t2_idx).RX_time - d_gnss_synchro_history->at(ch, t1_idx).RX_time // << d_gnss_synchro_history->at(ch, t2_idx).RX_time - d_gnss_synchro_history->at(ch, t1_idx).RX_time
// << " trx - t1: " // << " trx - t1: "
// << T_rx_s - d_gnss_synchro_history->at(ch, t1_idx).RX_time; // << T_rx_s - d_gnss_synchro_history->at(ch, t1_idx).RX_time;
//
// std::cout << "Rx samplestamp: " << T_rx_s << " Channel " << ch << " interp buff idx " << nearest_element // std::cout << "Rx samplestamp: " << T_rx_s << " Channel " << ch << " interp buff idx " << nearest_element
// << " ,diff: " << old_abs_diff << " samples (" << static_cast<double>(old_abs_diff) / static_cast<double>(d_gnss_synchro_history->at(ch, nearest_element).fs) << " s)\n"; // << " ,diff: " << old_abs_diff << " samples (" << static_cast<double>(old_abs_diff) / static_cast<double>(d_gnss_synchro_history->at(ch, nearest_element).fs) << " s)\n";
return true; return true;
@ -504,7 +502,7 @@ void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data)
// std::cout.precision(17); // std::cout.precision(17);
// std::cout << " T_rx_TOW_ms: " << static_cast<double>(T_rx_TOW_ms) << std::endl; // std::cout << " T_rx_TOW_ms: " << static_cast<double>(T_rx_TOW_ms) << std::endl;
std::vector<Gnss_Synchro>::iterator it; std::vector<Gnss_Synchro>::iterator it;
double current_T_rx_TOW_ms = static_cast<double>(T_rx_TOW_ms); auto current_T_rx_TOW_ms = static_cast<double>(T_rx_TOW_ms);
double current_T_rx_TOW_s = current_T_rx_TOW_ms / 1000.0; double current_T_rx_TOW_s = current_T_rx_TOW_ms / 1000.0;
for (it = data.begin(); it != data.end(); it++) for (it = data.begin(); it != data.end(); it++)
{ {

View File

@ -91,7 +91,6 @@ private:
uint32_t T_status_report_timer_ms; uint32_t T_status_report_timer_ms;
uint32_t d_nchannels_in; uint32_t d_nchannels_in;
uint32_t d_nchannels_out; uint32_t d_nchannels_out;
//double T_rx_offset_ms;
std::string d_dump_filename; std::string d_dump_filename;
std::ofstream d_dump_file; std::ofstream d_dump_file;
boost::circular_buffer<uint64_t> d_Rx_clock_buffer; // time history boost::circular_buffer<uint64_t> d_Rx_clock_buffer; // time history