mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Improve const correctness
This commit is contained in:
parent
6d510a62bf
commit
8a06981c16
@ -40,6 +40,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
|||||||
- Simpler API for the `Pvt_Solution` class.
|
- Simpler API for the `Pvt_Solution` class.
|
||||||
- Improved system constant definition headers, numerical values are only written
|
- Improved system constant definition headers, numerical values are only written
|
||||||
once.
|
once.
|
||||||
|
- Improved const correctness.
|
||||||
- The software can now be built against the GNU Radio 3.9 API that uses standard
|
- The software can now be built against the GNU Radio 3.9 API that uses standard
|
||||||
library's smart pointers instead of Boost's. Minimum GNU Radio required
|
library's smart pointers instead of Boost's. Minimum GNU Radio required
|
||||||
version still remains at 3.7.3.
|
version still remains at 3.7.3.
|
||||||
|
@ -1360,9 +1360,9 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
|||||||
{
|
{
|
||||||
// ### Galileo Almanac ###
|
// ### Galileo Almanac ###
|
||||||
const std::shared_ptr<Galileo_Almanac_Helper> galileo_almanac_helper = boost::any_cast<std::shared_ptr<Galileo_Almanac_Helper>>(pmt::any_ref(msg));
|
const std::shared_ptr<Galileo_Almanac_Helper> galileo_almanac_helper = boost::any_cast<std::shared_ptr<Galileo_Almanac_Helper>>(pmt::any_ref(msg));
|
||||||
Galileo_Almanac sv1 = galileo_almanac_helper->get_almanac(1);
|
const Galileo_Almanac sv1 = galileo_almanac_helper->get_almanac(1);
|
||||||
Galileo_Almanac sv2 = galileo_almanac_helper->get_almanac(2);
|
const Galileo_Almanac sv2 = galileo_almanac_helper->get_almanac(2);
|
||||||
Galileo_Almanac sv3 = galileo_almanac_helper->get_almanac(3);
|
const Galileo_Almanac sv3 = galileo_almanac_helper->get_almanac(3);
|
||||||
|
|
||||||
if (sv1.i_satellite_PRN != 0)
|
if (sv1.i_satellite_PRN != 0)
|
||||||
{
|
{
|
||||||
@ -2066,7 +2066,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
// #### solve PVT and store the corrected observable set
|
// #### solve PVT and store the corrected observable set
|
||||||
if (d_internal_pvt_solver->get_PVT(d_gnss_observables_map, false))
|
if (d_internal_pvt_solver->get_PVT(d_gnss_observables_map, false))
|
||||||
{
|
{
|
||||||
double Rx_clock_offset_s = d_internal_pvt_solver->get_time_offset_s();
|
const double Rx_clock_offset_s = d_internal_pvt_solver->get_time_offset_s();
|
||||||
if (fabs(Rx_clock_offset_s) * 1000.0 > d_max_obs_block_rx_clock_offset_ms)
|
if (fabs(Rx_clock_offset_s) * 1000.0 > d_max_obs_block_rx_clock_offset_ms)
|
||||||
{
|
{
|
||||||
if (!d_waiting_obs_block_rx_clock_offset_correction_msg)
|
if (!d_waiting_obs_block_rx_clock_offset_correction_msg)
|
||||||
@ -2088,8 +2088,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
// ### select the rx_time and interpolate observables at that time
|
// ### select the rx_time and interpolate observables at that time
|
||||||
if (!d_gnss_observables_map_t0.empty())
|
if (!d_gnss_observables_map_t0.empty())
|
||||||
{
|
{
|
||||||
uint32_t t0_int_ms = static_cast<uint32_t>(d_gnss_observables_map_t0.cbegin()->second.RX_time * 1000.0);
|
const auto t0_int_ms = static_cast<uint32_t>(d_gnss_observables_map_t0.cbegin()->second.RX_time * 1000.0);
|
||||||
uint32_t adjust_next_20ms = 20 - t0_int_ms % 20;
|
const uint32_t adjust_next_20ms = 20 - t0_int_ms % 20;
|
||||||
current_RX_time_ms = t0_int_ms + adjust_next_20ms;
|
current_RX_time_ms = t0_int_ms + adjust_next_20ms;
|
||||||
|
|
||||||
if (current_RX_time_ms % d_output_rate_ms == 0)
|
if (current_RX_time_ms % d_output_rate_ms == 0)
|
||||||
@ -2215,7 +2215,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
{
|
{
|
||||||
if (d_show_local_time_zone)
|
if (d_show_local_time_zone)
|
||||||
{
|
{
|
||||||
boost::posix_time::ptime time_first_solution = d_user_pvt_solver->get_position_UTC_time() + d_utc_diff_time;
|
const boost::posix_time::ptime time_first_solution = d_user_pvt_solver->get_position_UTC_time() + d_utc_diff_time;
|
||||||
std::cout << "First position fix at " << time_first_solution << d_local_time_str;
|
std::cout << "First position fix at " << time_first_solution << d_local_time_str;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2345,7 +2345,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 2: // GPS L2C only
|
case 2: // GPS L2C only
|
||||||
if (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend())
|
if (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("2S");
|
const std::string signal("2S");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model);
|
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_cnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_cnav_ephemeris_map);
|
||||||
@ -2355,7 +2355,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 3: // GPS L5 only
|
case 3: // GPS L5 only
|
||||||
if (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend())
|
if (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("L5");
|
const std::string signal("L5");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model);
|
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_cnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_cnav_ephemeris_map);
|
||||||
@ -2374,7 +2374,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 5: // Galileo E5a only
|
case 5: // Galileo E5a only
|
||||||
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("5X");
|
const std::string signal("5X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2384,7 +2384,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 6: // Galileo E5b only
|
case 6: // Galileo E5b only
|
||||||
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("7X");
|
const std::string signal("7X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2394,7 +2394,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 7: // GPS L1 C/A + GPS L2C
|
case 7: // GPS L1 C/A + GPS L2C
|
||||||
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string signal("1C 2S");
|
const std::string signal("1C 2S");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second);
|
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second);
|
||||||
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_cnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_cnav_ephemeris_map);
|
||||||
@ -2404,7 +2404,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 8: // GPS L1 + GPS L5
|
case 8: // GPS L1 + GPS L5
|
||||||
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string signal("1C L5");
|
const std::string signal("1C L5");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second);
|
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second);
|
||||||
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_ephemeris_map);
|
||||||
@ -2414,7 +2414,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 9: // GPS L1 C/A + Galileo E1B
|
case 9: // GPS L1 C/A + Galileo E1B
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("1B");
|
const std::string gal_signal("1B");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2424,7 +2424,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 10: // GPS L1 C/A + Galileo E5a
|
case 10: // GPS L1 C/A + Galileo E5a
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("5X");
|
const std::string gal_signal("5X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2434,7 +2434,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 11: // GPS L1 C/A + Galileo E5b
|
case 11: // GPS L1 C/A + Galileo E5b
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("7X");
|
const std::string gal_signal("7X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2444,8 +2444,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 13: // L5+E5a
|
case 13: // L5+E5a
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("5X");
|
const std::string gal_signal("5X");
|
||||||
std::string gps_signal("L5");
|
const std::string gps_signal("L5");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gps_signal, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gps_signal, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2455,7 +2455,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 14: // Galileo E1B + Galileo E5a
|
case 14: // Galileo E1B + Galileo E5a
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("1B 5X");
|
const std::string gal_signal("1B 5X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2465,7 +2465,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 15: // Galileo E1B + Galileo E5b
|
case 15: // Galileo E1B + Galileo E5b
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("1B 7X");
|
const std::string gal_signal("1B 7X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2475,7 +2475,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 23: // GLONASS L1 C/A only
|
case 23: // GLONASS L1 C/A only
|
||||||
if (glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
if (glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("1G");
|
const std::string signal("1G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
|
d_rp->rinex_nav_header(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
|
||||||
d_rp->log_rinex_nav(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2485,7 +2485,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 24: // GLONASS L2 C/A only
|
case 24: // GLONASS L2 C/A only
|
||||||
if (glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
if (glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("2G");
|
const std::string signal("2G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
|
d_rp->rinex_nav_header(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
|
||||||
d_rp->log_rinex_nav(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2495,7 +2495,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 25: // GLONASS L1 C/A + GLONASS L2 C/A
|
case 25: // GLONASS L1 C/A + GLONASS L2 C/A
|
||||||
if (glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
if (glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
std::string signal("1G 2G");
|
const std::string signal("1G 2G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
|
d_rp->rinex_nav_header(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
|
||||||
d_rp->log_rinex_nav(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navGloFile, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2505,7 +2505,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 26: // GPS L1 C/A + GLONASS L1 C/A
|
case 26: // GPS L1 C/A + GLONASS L1 C/A
|
||||||
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string glo_signal("1G");
|
const std::string glo_signal("1G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||||
if (d_rinex_version == 3)
|
if (d_rinex_version == 3)
|
||||||
{
|
{
|
||||||
@ -2525,8 +2525,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 27: // Galileo E1B + GLONASS L1 C/A
|
case 27: // Galileo E1B + GLONASS L1 C/A
|
||||||
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string glo_signal("1G");
|
const std::string glo_signal("1G");
|
||||||
std::string gal_signal("1B");
|
const std::string gal_signal("1B");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->galileo_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->galileo_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2536,7 +2536,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 28: // GPS L2C + GLONASS L1 C/A
|
case 28: // GPS L2C + GLONASS L1 C/A
|
||||||
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string glo_signal("1G");
|
const std::string glo_signal("1G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2546,7 +2546,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 29: // GPS L1 C/A + GLONASS L2 C/A
|
case 29: // GPS L1 C/A + GLONASS L2 C/A
|
||||||
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string glo_signal("2G");
|
const std::string glo_signal("2G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||||
if (d_rinex_version == 3)
|
if (d_rinex_version == 3)
|
||||||
{
|
{
|
||||||
@ -2566,8 +2566,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 30: // Galileo E1B + GLONASS L2 C/A
|
case 30: // Galileo E1B + GLONASS L2 C/A
|
||||||
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string glo_signal("2G");
|
const std::string glo_signal("2G");
|
||||||
std::string gal_signal("1B");
|
const std::string gal_signal("1B");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->galileo_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->galileo_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2577,7 +2577,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 31: // GPS L2C + GLONASS L2 C/A
|
case 31: // GPS L2C + GLONASS L2 C/A
|
||||||
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string glo_signal("2G");
|
const std::string glo_signal("2G");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_cnav_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_iono, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->glonass_gnav_utc_model, d_user_pvt_solver->glonass_gnav_almanac);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_cnav_ephemeris_map, d_user_pvt_solver->glonass_gnav_ephemeris_map);
|
||||||
@ -2589,8 +2589,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()) and
|
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()) and
|
||||||
(galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
(galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("1B 5X");
|
const std::string gal_signal("1B 5X");
|
||||||
std::string gps_signal("1C L5");
|
const std::string gps_signal("1C L5");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gps_signal, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gps_signal, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2601,7 +2601,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
|
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
|
||||||
(galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
(galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("1B 5X");
|
const std::string gal_signal("1B 5X");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -2621,7 +2621,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 501: // BeiDou B1I + GPS L1 C/A
|
case 501: // BeiDou B1I + GPS L1 C/A
|
||||||
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend()))
|
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string bds_signal("B1");
|
const std::string bds_signal("B1");
|
||||||
// d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, bds_signal);
|
// d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, bds_signal);
|
||||||
// d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
// d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||||
d_rinex_header_written = true; // do not write header anymore
|
d_rinex_header_written = true; // do not write header anymore
|
||||||
@ -2631,8 +2631,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
case 502: // BeiDou B1I + Galileo E1B
|
case 502: // BeiDou B1I + Galileo E1B
|
||||||
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend()))
|
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string bds_signal("B1");
|
const std::string bds_signal("B1");
|
||||||
std::string gal_signal("1B");
|
const std::string gal_signal("1B");
|
||||||
// d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, gal_signal, bds_signal);
|
// d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, gal_signal, bds_signal);
|
||||||
// d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
// d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||||
d_rinex_header_written = true; // do not write header anymore
|
d_rinex_header_written = true; // do not write header anymore
|
||||||
@ -2677,7 +2677,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
|
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
|
||||||
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gps_signal("1C 2S L5");
|
const std::string gps_signal("1C 2S L5");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, gps_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, gps_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second);
|
d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second);
|
||||||
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->gps_ephemeris_map);
|
||||||
@ -2689,8 +2689,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
(gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
|
(gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
|
||||||
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
std::string gal_signal("1B 5X");
|
const std::string gal_signal("1B 5X");
|
||||||
std::string gps_signal("1C 2S L5");
|
const std::string gps_signal("1C 2S L5");
|
||||||
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gps_signal, gal_signal);
|
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gps_signal, gal_signal);
|
||||||
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
|
||||||
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
|
||||||
@ -3070,7 +3070,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (flag_write_RTCM_MSM_output == true)
|
if (flag_write_RTCM_MSM_output == true)
|
||||||
{
|
{
|
||||||
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
const auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
||||||
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
|
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3089,7 +3089,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (flag_write_RTCM_MSM_output == true)
|
if (flag_write_RTCM_MSM_output == true)
|
||||||
{
|
{
|
||||||
auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
|
const auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
|
||||||
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3106,8 +3106,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (flag_write_RTCM_MSM_output == true)
|
if (flag_write_RTCM_MSM_output == true)
|
||||||
{
|
{
|
||||||
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
const auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
||||||
auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
const auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
||||||
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3124,8 +3124,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (flag_write_RTCM_MSM_output == true)
|
if (flag_write_RTCM_MSM_output == true)
|
||||||
{
|
{
|
||||||
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
const auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
||||||
auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
const auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
||||||
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3156,7 +3156,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
int gal_channel = 0;
|
int gal_channel = 0;
|
||||||
for (gnss_observables_iter = d_gnss_observables_map.cbegin(); gnss_observables_iter != d_gnss_observables_map.cend(); gnss_observables_iter++)
|
for (gnss_observables_iter = d_gnss_observables_map.cbegin(); gnss_observables_iter != d_gnss_observables_map.cend(); gnss_observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system(&gnss_observables_iter->second.System, 1);
|
const std::string system(&gnss_observables_iter->second.System, 1);
|
||||||
if (gps_channel == 0)
|
if (gps_channel == 0)
|
||||||
{
|
{
|
||||||
if (system == "G")
|
if (system == "G")
|
||||||
@ -3256,7 +3256,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (flag_write_RTCM_MSM_output == true)
|
if (flag_write_RTCM_MSM_output == true)
|
||||||
{
|
{
|
||||||
auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
|
const auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
|
||||||
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3275,7 +3275,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (flag_write_RTCM_MSM_output == true)
|
if (flag_write_RTCM_MSM_output == true)
|
||||||
{
|
{
|
||||||
auto glo_gnav_ephemeris_iter = d_user_pvt_solver->glonass_gnav_ephemeris_map.cbegin();
|
const auto glo_gnav_ephemeris_iter = d_user_pvt_solver->glonass_gnav_ephemeris_map.cbegin();
|
||||||
if (glo_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
if (glo_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, {}, glo_gnav_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, {}, glo_gnav_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3598,7 +3598,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (d_rtcm_MSM_rate_ms != 0) // allows deactivating messages by setting rate = 0
|
if (d_rtcm_MSM_rate_ms != 0) // allows deactivating messages by setting rate = 0
|
||||||
{
|
{
|
||||||
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
const auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
||||||
|
|
||||||
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
|
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
@ -3619,7 +3619,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (d_rtcm_MSM_rate_ms != 0)
|
if (d_rtcm_MSM_rate_ms != 0)
|
||||||
{
|
{
|
||||||
auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
|
const auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
|
||||||
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3637,8 +3637,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (d_rtcm_MSM_rate_ms != 0)
|
if (d_rtcm_MSM_rate_ms != 0)
|
||||||
{
|
{
|
||||||
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
const auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
||||||
auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
const auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
||||||
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
@ -3656,8 +3656,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
if (d_rtcm_MSM_rate_ms != 0)
|
if (d_rtcm_MSM_rate_ms != 0)
|
||||||
{
|
{
|
||||||
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
const auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
|
||||||
auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
const auto gps_cnav_eph_iter = d_user_pvt_solver->gps_cnav_ephemeris_map.cbegin();
|
||||||
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
if ((gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_eph_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
|
||||||
{
|
{
|
||||||
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, gps_cnav_eph_iter->second, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
|
||||||
|
@ -161,7 +161,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
|||||||
// Get path
|
// Get path
|
||||||
if (d_dump_filename.find_last_of('/') != std::string::npos)
|
if (d_dump_filename.find_last_of('/') != std::string::npos)
|
||||||
{
|
{
|
||||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
|
const std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
|
||||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
|
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
|
||||||
d_dump_filename = dump_filename_;
|
d_dump_filename = dump_filename_;
|
||||||
}
|
}
|
||||||
@ -515,7 +515,7 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int32_t&
|
|||||||
uint32_t index_doppler = 0U;
|
uint32_t index_doppler = 0U;
|
||||||
uint32_t tmp_intex_t = 0U;
|
uint32_t tmp_intex_t = 0U;
|
||||||
uint32_t index_time = 0U;
|
uint32_t index_time = 0U;
|
||||||
int32_t effective_fft_size = (d_acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
const int32_t effective_fft_size = (d_acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
||||||
|
|
||||||
// Find the correlation peak and the carrier frequency
|
// Find the correlation peak and the carrier frequency
|
||||||
for (uint32_t i = 0; i < num_doppler_bins; i++)
|
for (uint32_t i = 0; i < num_doppler_bins; i++)
|
||||||
@ -531,7 +531,7 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int32_t&
|
|||||||
indext = index_time;
|
indext = index_time;
|
||||||
if (!d_step_two)
|
if (!d_step_two)
|
||||||
{
|
{
|
||||||
auto index_opp = (index_doppler + d_num_doppler_bins / 2) % d_num_doppler_bins;
|
const auto index_opp = (index_doppler + d_num_doppler_bins / 2) % d_num_doppler_bins;
|
||||||
d_input_power = static_cast<float>(std::accumulate(d_magnitude_grid[index_opp].data(), d_magnitude_grid[index_opp].data() + effective_fft_size, static_cast<float>(0.0)) / effective_fft_size / 2.0 / d_num_noncoherent_integrations_counter);
|
d_input_power = static_cast<float>(std::accumulate(d_magnitude_grid[index_opp].data(), d_magnitude_grid[index_opp].data() + effective_fft_size, static_cast<float>(0.0)) / effective_fft_size / 2.0 / d_num_noncoherent_integrations_counter);
|
||||||
doppler = -static_cast<int32_t>(doppler_max) + d_doppler_center + doppler_step * static_cast<int32_t>(index_doppler);
|
doppler = -static_cast<int32_t>(doppler_max) + d_doppler_center + doppler_step * static_cast<int32_t>(index_doppler);
|
||||||
}
|
}
|
||||||
@ -606,7 +606,7 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int32_t
|
|||||||
|
|
||||||
// Find the second highest correlation peak in the same freq. bin ---
|
// Find the second highest correlation peak in the same freq. bin ---
|
||||||
volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_tmp_buffer.data(), d_fft_size);
|
volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_tmp_buffer.data(), d_fft_size);
|
||||||
float secondPeak = d_tmp_buffer[tmp_intex_t];
|
const float secondPeak = d_tmp_buffer[tmp_intex_t];
|
||||||
|
|
||||||
// Compute the test statistics and compare to the threshold
|
// Compute the test statistics and compare to the threshold
|
||||||
return firstPeak / secondPeak;
|
return firstPeak / secondPeak;
|
||||||
|
@ -55,7 +55,7 @@ Channel::Channel(const ConfigurationInterface* configuration, uint32_t channel,
|
|||||||
// Provide a warning to the user about the change of parameter name
|
// Provide a warning to the user about the change of parameter name
|
||||||
if (channel_ == 0)
|
if (channel_ == 0)
|
||||||
{
|
{
|
||||||
int64_t deprecation_warning = configuration->property("GNSS-SDR.internal_fs_hz", 0);
|
const int64_t deprecation_warning = configuration->property("GNSS-SDR.internal_fs_hz", 0);
|
||||||
if (deprecation_warning != 0)
|
if (deprecation_warning != 0)
|
||||||
{
|
{
|
||||||
std::cout << "WARNING: The global parameter name GNSS-SDR.internal_fs_hz has been DEPRECATED.\n";
|
std::cout << "WARNING: The global parameter name GNSS-SDR.internal_fs_hz has been DEPRECATED.\n";
|
||||||
@ -191,7 +191,7 @@ void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
|||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx_);
|
std::lock_guard<std::mutex> lk(mx_);
|
||||||
gnss_signal_ = gnss_signal;
|
gnss_signal_ = gnss_signal;
|
||||||
std::string str_aux = gnss_signal_.get_signal_str();
|
const std::string str_aux = gnss_signal_.get_signal_str();
|
||||||
gnss_synchro_.Signal[0] = str_aux[0];
|
gnss_synchro_.Signal[0] = str_aux[0];
|
||||||
gnss_synchro_.Signal[1] = str_aux[1];
|
gnss_synchro_.Signal[1] = str_aux[1];
|
||||||
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
|
||||||
@ -209,7 +209,7 @@ void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
|||||||
void Channel::stop_channel()
|
void Channel::stop_channel()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx_);
|
std::lock_guard<std::mutex> lk(mx_);
|
||||||
bool result = channel_fsm_->Event_stop_channel();
|
const bool result = channel_fsm_->Event_stop_channel();
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Invalid channel event";
|
LOG(WARNING) << "Invalid channel event";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file channel_msg_receiver_cc.cc
|
* \file channel_msg_receiver_cc.cc
|
||||||
* \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
|
* \brief GNU Radio block that receives asynchronous channel messages from
|
||||||
|
* acquisition and tracking blocks
|
||||||
* \author Javier Arribas, 2016. jarribas(at)cttc.es
|
* \author Javier Arribas, 2016. jarribas(at)cttc.es
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -61,7 +62,7 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int64_t message = pmt::to_long(std::move(msg));
|
const int64_t message = pmt::to_long(std::move(msg));
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case 1: // positive acquisition
|
case 1: // positive acquisition
|
||||||
|
@ -37,7 +37,7 @@ ByteToShort::ByteToShort(const ConfigurationInterface* configuration, std::strin
|
|||||||
dump_ = configuration->property(role_ + ".dump", false);
|
dump_ = configuration->property(role_ + ".dump", false);
|
||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
|
|
||||||
size_t item_size = sizeof(int16_t);
|
const size_t item_size = sizeof(int16_t);
|
||||||
|
|
||||||
gr_char_to_short_ = gr::blocks::char_to_short::make();
|
gr_char_to_short_ = gr::blocks::char_to_short::make();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ IbyteToCbyte::IbyteToCbyte(const ConfigurationInterface* configuration, const st
|
|||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||||
|
|
||||||
size_t item_size = sizeof(lv_8sc_t);
|
const size_t item_size = sizeof(lv_8sc_t);
|
||||||
|
|
||||||
ibyte_to_cbyte_ = make_interleaved_byte_to_complex_byte();
|
ibyte_to_cbyte_ = make_interleaved_byte_to_complex_byte();
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ IbyteToComplex::IbyteToComplex(const ConfigurationInterface* configuration, cons
|
|||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||||
|
|
||||||
size_t item_size = sizeof(gr_complex);
|
const size_t item_size = sizeof(gr_complex);
|
||||||
|
|
||||||
gr_interleaved_char_to_complex_ = gr::blocks::interleaved_char_to_complex::make();
|
gr_interleaved_char_to_complex_ = gr::blocks::interleaved_char_to_complex::make();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ IbyteToCshort::IbyteToCshort(const ConfigurationInterface* configuration, const
|
|||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||||
|
|
||||||
size_t item_size = sizeof(lv_16sc_t);
|
const size_t item_size = sizeof(lv_16sc_t);
|
||||||
|
|
||||||
interleaved_byte_to_complex_short_ = make_interleaved_byte_to_complex_short();
|
interleaved_byte_to_complex_short_ = make_interleaved_byte_to_complex_short();
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ IshortToComplex::IshortToComplex(const ConfigurationInterface* configuration, co
|
|||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||||
|
|
||||||
size_t item_size = sizeof(gr_complex);
|
const size_t item_size = sizeof(gr_complex);
|
||||||
|
|
||||||
gr_interleaved_short_to_complex_ = gr::blocks::interleaved_short_to_complex::make();
|
gr_interleaved_short_to_complex_ = gr::blocks::interleaved_short_to_complex::make();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ IshortToCshort::IshortToCshort(const ConfigurationInterface* configuration, cons
|
|||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||||
|
|
||||||
size_t item_size = sizeof(lv_16sc_t);
|
const size_t item_size = sizeof(lv_16sc_t);
|
||||||
|
|
||||||
interleaved_short_to_complex_short_ = make_interleaved_short_to_complex_short();
|
interleaved_short_to_complex_short_ = make_interleaved_short_to_complex_short();
|
||||||
|
|
||||||
|
@ -151,8 +151,8 @@ void FirFilter::init()
|
|||||||
taps_item_type_ = config_->property(role_ + ".taps_item_type", default_taps_item_type);
|
taps_item_type_ = config_->property(role_ + ".taps_item_type", default_taps_item_type);
|
||||||
dump_ = config_->property(role_ + ".dump", false);
|
dump_ = config_->property(role_ + ".dump", false);
|
||||||
dump_filename_ = config_->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = config_->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
int number_of_taps = config_->property(role_ + ".number_of_taps", default_number_of_taps);
|
const int number_of_taps = config_->property(role_ + ".number_of_taps", default_number_of_taps);
|
||||||
unsigned int number_of_bands = config_->property(role_ + ".number_of_bands", default_number_of_bands);
|
const unsigned int number_of_bands = config_->property(role_ + ".number_of_bands", default_number_of_bands);
|
||||||
|
|
||||||
std::vector<double> bands;
|
std::vector<double> bands;
|
||||||
std::vector<double> ampl;
|
std::vector<double> ampl;
|
||||||
@ -182,16 +182,16 @@ void FirFilter::init()
|
|||||||
error_w.push_back(option_value);
|
error_w.push_back(option_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string filter_type = config_->property(role_ + ".filter_type", default_filter_type);
|
const std::string filter_type = config_->property(role_ + ".filter_type", default_filter_type);
|
||||||
int grid_density = config_->property(role_ + ".grid_density", default_grid_density);
|
const int grid_density = config_->property(role_ + ".grid_density", default_grid_density);
|
||||||
|
|
||||||
// pm_remez implements the Parks-McClellan FIR filter design.
|
// pm_remez implements the Parks-McClellan FIR filter design.
|
||||||
// It calculates the optimal (in the Chebyshev/minimax sense) FIR filter
|
// It calculates the optimal (in the Chebyshev/minimax sense) FIR filter
|
||||||
// impulse response given a set of band edges, the desired response on
|
// impulse response given a set of band edges, the desired response on
|
||||||
// those bands, and the weight given to the error in those bands.
|
// those bands, and the weight given to the error in those bands.
|
||||||
std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||||
taps_.reserve(taps_d.size());
|
taps_.reserve(taps_d.size());
|
||||||
for (double& it : taps_d)
|
for (auto& it : taps_d)
|
||||||
{
|
{
|
||||||
taps_.push_back(static_cast<float>(it));
|
taps_.push_back(static_cast<float>(it));
|
||||||
}
|
}
|
||||||
|
@ -55,14 +55,13 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
|||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
intermediate_freq_ = configuration->property(role_ + ".IF", default_intermediate_freq);
|
intermediate_freq_ = configuration->property(role_ + ".IF", default_intermediate_freq);
|
||||||
sampling_freq_ = configuration->property(role_ + ".sampling_frequency", default_sampling_freq);
|
sampling_freq_ = configuration->property(role_ + ".sampling_frequency", default_sampling_freq);
|
||||||
int number_of_taps = configuration->property(role_ + ".number_of_taps", default_number_of_taps);
|
const int number_of_taps = configuration->property(role_ + ".number_of_taps", default_number_of_taps);
|
||||||
unsigned int number_of_bands = configuration->property(role_ + ".number_of_bands", default_number_of_bands);
|
const unsigned int number_of_bands = configuration->property(role_ + ".number_of_bands", default_number_of_bands);
|
||||||
std::string filter_type = configuration->property(role_ + ".filter_type", default_filter_type);
|
const std::string filter_type = configuration->property(role_ + ".filter_type", default_filter_type);
|
||||||
decimation_factor_ = configuration->property(role_ + ".decimation_factor", default_decimation_factor);
|
decimation_factor_ = configuration->property(role_ + ".decimation_factor", default_decimation_factor);
|
||||||
|
|
||||||
if (filter_type != "lowpass")
|
if (filter_type != "lowpass")
|
||||||
{
|
{
|
||||||
std::vector<double> taps_d;
|
|
||||||
std::vector<double> bands;
|
std::vector<double> bands;
|
||||||
std::vector<double> ampl;
|
std::vector<double> ampl;
|
||||||
std::vector<double> error_w;
|
std::vector<double> error_w;
|
||||||
@ -92,20 +91,20 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
|||||||
error_w.push_back(option_value);
|
error_w.push_back(option_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int grid_density = configuration->property(role_ + ".grid_density", default_grid_density);
|
const int grid_density = configuration->property(role_ + ".grid_density", default_grid_density);
|
||||||
taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||||
taps_.reserve(taps_d.size());
|
taps_.reserve(taps_d.size());
|
||||||
for (double& it : taps_d)
|
for (auto& it : taps_d)
|
||||||
{
|
{
|
||||||
taps_.push_back(static_cast<float>(it));
|
taps_.push_back(static_cast<float>(it));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double default_bw = (sampling_freq_ / decimation_factor_) / 2;
|
const double default_bw = (sampling_freq_ / decimation_factor_) / 2;
|
||||||
double bw_ = configuration->property(role_ + ".bw", default_bw);
|
const double bw_ = configuration->property(role_ + ".bw", default_bw);
|
||||||
double default_tw = bw_ / 10.0;
|
const double default_tw = bw_ / 10.0;
|
||||||
double tw_ = configuration->property(role_ + ".tw", default_tw);
|
const double tw_ = configuration->property(role_ + ".tw", default_tw);
|
||||||
taps_ = gr::filter::firdes::low_pass(1.0, sampling_freq_, bw_, tw_);
|
taps_ = gr::filter::firdes::low_pass(1.0, sampling_freq_, bw_, tw_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@ NotchFilter::NotchFilter(const ConfigurationInterface* configuration, const std:
|
|||||||
dump_ = configuration->property(role + ".dump", false);
|
dump_ = configuration->property(role + ".dump", false);
|
||||||
DLOG(INFO) << "dump_ is " << dump_;
|
DLOG(INFO) << "dump_ is " << dump_;
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||||
float pfa = configuration->property(role + ".pfa", default_pfa);
|
const float pfa = configuration->property(role + ".pfa", default_pfa);
|
||||||
float p_c_factor = configuration->property(role + ".p_c_factor", default_p_c_factor);
|
const float p_c_factor = configuration->property(role + ".p_c_factor", default_p_c_factor);
|
||||||
int length_ = configuration->property(role + ".length", default_length_);
|
const int length_ = configuration->property(role + ".length", default_length_);
|
||||||
int n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
|
const int n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
|
||||||
int n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
|
const int n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
|
||||||
if (item_type_ == "gr_complex")
|
if (item_type_ == "gr_complex")
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(gr_complex);
|
item_size_ = sizeof(gr_complex);
|
||||||
|
@ -37,18 +37,18 @@ NotchFilterLite::NotchFilterLite(const ConfigurationInterface* configuration, co
|
|||||||
const float default_samp_freq = 4000000;
|
const float default_samp_freq = 4000000;
|
||||||
const std::string default_item_type("gr_complex");
|
const std::string default_item_type("gr_complex");
|
||||||
const std::string default_dump_file("./data/input_filter.dat");
|
const std::string default_dump_file("./data/input_filter.dat");
|
||||||
float samp_freq = configuration->property("SignalSource.sampling_frequency", default_samp_freq);
|
const float samp_freq = configuration->property("SignalSource.sampling_frequency", default_samp_freq);
|
||||||
float default_coeff_rate = samp_freq * 0.1F;
|
const float default_coeff_rate = samp_freq * 0.1F;
|
||||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
dump_ = configuration->property(role + ".dump", false);
|
||||||
DLOG(INFO) << "dump_ is " << dump_;
|
DLOG(INFO) << "dump_ is " << dump_;
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||||
float p_c_factor = configuration->property(role + ".p_c_factor", default_p_c_factor);
|
const float p_c_factor = configuration->property(role + ".p_c_factor", default_p_c_factor);
|
||||||
float pfa = configuration->property(role + ".pfa", default_pfa);
|
const float pfa = configuration->property(role + ".pfa", default_pfa);
|
||||||
float coeff_rate = configuration->property(role + ".coeff_rate", default_coeff_rate);
|
const float coeff_rate = configuration->property(role + ".coeff_rate", default_coeff_rate);
|
||||||
int length_ = configuration->property(role + ".length", default_length_);
|
const int length_ = configuration->property(role + ".length", default_length_);
|
||||||
int n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
|
const int n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
|
||||||
int n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
|
const int n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
|
||||||
int n_segments_coeff = static_cast<int>((samp_freq / coeff_rate) / static_cast<float>(length_));
|
int n_segments_coeff = static_cast<int>((samp_freq / coeff_rate) / static_cast<float>(length_));
|
||||||
n_segments_coeff = std::max(1, n_segments_coeff);
|
n_segments_coeff = std::max(1, n_segments_coeff);
|
||||||
if (item_type_ == "gr_complex")
|
if (item_type_ == "gr_complex")
|
||||||
|
@ -43,13 +43,13 @@ PulseBlankingFilter::PulseBlankingFilter(const ConfigurationInterface* configura
|
|||||||
dump_ = configuration->property(role_ + ".dump", false);
|
dump_ = configuration->property(role_ + ".dump", false);
|
||||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||||
const float default_pfa_ = 0.04;
|
const float default_pfa_ = 0.04;
|
||||||
float pfa = configuration->property(role_ + ".pfa", default_pfa_);
|
const float pfa = configuration->property(role_ + ".pfa", default_pfa_);
|
||||||
const int default_length_ = 32;
|
const int default_length_ = 32;
|
||||||
int length_ = configuration->property(role_ + ".length", default_length_);
|
const int length_ = configuration->property(role_ + ".length", default_length_);
|
||||||
const int default_n_segments_est = 12500;
|
const int default_n_segments_est = 12500;
|
||||||
int n_segments_est = configuration->property(role_ + ".segments_est", default_n_segments_est);
|
const int n_segments_est = configuration->property(role_ + ".segments_est", default_n_segments_est);
|
||||||
const int default_n_segments_reset = 5000000;
|
const int default_n_segments_reset = 5000000;
|
||||||
int n_segments_reset = configuration->property(role_ + ".segments_reset", default_n_segments_reset);
|
const int n_segments_reset = configuration->property(role_ + ".segments_reset", default_n_segments_reset);
|
||||||
if (input_item_type_ == "gr_complex")
|
if (input_item_type_ == "gr_complex")
|
||||||
{
|
{
|
||||||
item_size = sizeof(gr_complex); // output
|
item_size = sizeof(gr_complex); // output
|
||||||
@ -63,17 +63,17 @@ PulseBlankingFilter::PulseBlankingFilter(const ConfigurationInterface* configura
|
|||||||
input_size_ = sizeof(gr_complex); // avoids uninitialization
|
input_size_ = sizeof(gr_complex); // avoids uninitialization
|
||||||
}
|
}
|
||||||
const double default_if = 0.0;
|
const double default_if = 0.0;
|
||||||
double if_aux = configuration->property(role_ + ".if", default_if);
|
const double if_aux = configuration->property(role_ + ".if", default_if);
|
||||||
double if_ = configuration->property(role_ + ".IF", if_aux);
|
const double if_ = configuration->property(role_ + ".IF", if_aux);
|
||||||
if (std::abs(if_) > 1.0)
|
if (std::abs(if_) > 1.0)
|
||||||
{
|
{
|
||||||
xlat_ = true;
|
xlat_ = true;
|
||||||
const double default_sampling_freq = 4000000.0;
|
const double default_sampling_freq = 4000000.0;
|
||||||
double sampling_freq_ = configuration->property(role_ + ".sampling_frequency", default_sampling_freq);
|
const double sampling_freq_ = configuration->property(role_ + ".sampling_frequency", default_sampling_freq);
|
||||||
const double default_bw = 2000000.0;
|
const double default_bw = 2000000.0;
|
||||||
double bw_ = configuration->property(role_ + ".bw", default_bw);
|
const double bw_ = configuration->property(role_ + ".bw", default_bw);
|
||||||
const double default_tw = bw_ / 10.0;
|
const double default_tw = bw_ / 10.0;
|
||||||
double tw_ = configuration->property(role_ + ".tw", default_tw);
|
const double tw_ = configuration->property(role_ + ".tw", default_tw);
|
||||||
const std::vector<float> taps = gr::filter::firdes::low_pass(1.0, sampling_freq_, bw_, tw_);
|
const std::vector<float> taps = gr::filter::firdes::low_pass(1.0, sampling_freq_, bw_, tw_);
|
||||||
freq_xlating_ = gr::filter::freq_xlating_fir_filter_ccf::make(1, taps, if_, sampling_freq_);
|
freq_xlating_ = gr::filter::freq_xlating_fir_filter_ccf::make(1, taps, if_, sampling_freq_);
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ Pass_Through::Pass_Through(const ConfigurationInterface* configuration, const st
|
|||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_item_type("gr_complex");
|
const std::string default_item_type("gr_complex");
|
||||||
std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
|
const std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
|
||||||
std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
|
const std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
|
||||||
if (input_type != output_type)
|
if (input_type != output_type)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
|
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
|
||||||
@ -90,7 +90,7 @@ Pass_Through::Pass_Through(const ConfigurationInterface* configuration, const st
|
|||||||
}
|
}
|
||||||
|
|
||||||
kludge_copy_ = gr::blocks::copy::make(item_size_);
|
kludge_copy_ = gr::blocks::copy::make(item_size_);
|
||||||
uint64_t max_source_buffer_samples = configuration->property("GNSS-SDR.max_source_buffer_samples", 0);
|
const uint64_t max_source_buffer_samples = configuration->property("GNSS-SDR.max_source_buffer_samples", 0);
|
||||||
if (max_source_buffer_samples > 0)
|
if (max_source_buffer_samples > 0)
|
||||||
{
|
{
|
||||||
kludge_copy_->set_max_output_buffer(max_source_buffer_samples);
|
kludge_copy_->set_max_output_buffer(max_source_buffer_samples);
|
||||||
|
@ -224,7 +224,7 @@ void hybrid_observables_gs::msg_handler_pvt_to_observables(const pmt::pmt_t &msg
|
|||||||
int32_t hybrid_observables_gs::save_matfile() const
|
int32_t hybrid_observables_gs::save_matfile() const
|
||||||
{
|
{
|
||||||
// READ DUMP FILE
|
// READ DUMP FILE
|
||||||
std::string dump_filename = d_dump_filename;
|
const std::string dump_filename = d_dump_filename;
|
||||||
std::ifstream::pos_type size;
|
std::ifstream::pos_type size;
|
||||||
const int32_t number_of_double_vars = 7;
|
const int32_t number_of_double_vars = 7;
|
||||||
const int32_t epoch_size_bytes = sizeof(double) * number_of_double_vars * d_nchannels_out;
|
const int32_t epoch_size_bytes = sizeof(double) * number_of_double_vars * d_nchannels_out;
|
||||||
@ -367,11 +367,10 @@ double hybrid_observables_gs::compute_T_rx_s(const Gnss_Synchro &a) const
|
|||||||
bool hybrid_observables_gs::interp_trk_obs(Gnss_Synchro &interpolated_obs, uint32_t ch, uint64_t rx_clock) const
|
bool hybrid_observables_gs::interp_trk_obs(Gnss_Synchro &interpolated_obs, uint32_t ch, uint64_t rx_clock) const
|
||||||
{
|
{
|
||||||
int32_t nearest_element = -1;
|
int32_t nearest_element = -1;
|
||||||
int64_t abs_diff;
|
|
||||||
int64_t old_abs_diff = std::numeric_limits<int64_t>::max();
|
int64_t old_abs_diff = std::numeric_limits<int64_t>::max();
|
||||||
for (uint32_t i = 0; i < d_gnss_synchro_history->size(ch); i++)
|
for (uint32_t i = 0; i < d_gnss_synchro_history->size(ch); i++)
|
||||||
{
|
{
|
||||||
abs_diff = llabs(static_cast<int64_t>(rx_clock) - static_cast<int64_t>(d_gnss_synchro_history->get(ch, i).Tracking_sample_counter));
|
const int64_t abs_diff = llabs(static_cast<int64_t>(rx_clock) - static_cast<int64_t>(d_gnss_synchro_history->get(ch, i).Tracking_sample_counter));
|
||||||
if (old_abs_diff > abs_diff)
|
if (old_abs_diff > abs_diff)
|
||||||
{
|
{
|
||||||
old_abs_diff = abs_diff;
|
old_abs_diff = abs_diff;
|
||||||
|
@ -357,10 +357,14 @@ int ControlThread::run()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Terminate keyboard thread
|
// Terminate keyboard thread
|
||||||
pthread_t id = keyboard_thread_.native_handle();
|
if (keyboard_thread_.joinable())
|
||||||
keyboard_thread_.detach();
|
{
|
||||||
pthread_cancel(id);
|
pthread_t id = keyboard_thread_.native_handle();
|
||||||
|
keyboard_thread_.detach();
|
||||||
|
pthread_cancel(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Terminate telecommand thread
|
||||||
if (telecommand_enabled_)
|
if (telecommand_enabled_)
|
||||||
{
|
{
|
||||||
pthread_t id2 = cmd_interface_thread_.native_handle();
|
pthread_t id2 = cmd_interface_thread_.native_handle();
|
||||||
@ -692,11 +696,11 @@ void ControlThread::assist_GNSS()
|
|||||||
gps_eph_iter++)
|
gps_eph_iter++)
|
||||||
{
|
{
|
||||||
std::cout << "SUPL: Received ephemeris data for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << '\n';
|
std::cout << "SUPL: Received ephemeris data for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << '\n';
|
||||||
std::shared_ptr<Gps_Ephemeris> tmp_obj = std::make_shared<Gps_Ephemeris>(gps_eph_iter->second);
|
const std::shared_ptr<Gps_Ephemeris> tmp_obj = std::make_shared<Gps_Ephemeris>(gps_eph_iter->second);
|
||||||
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
// Save ephemeris to XML file
|
// Save ephemeris to XML file
|
||||||
std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename_);
|
const std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename_);
|
||||||
if (supl_client_ephemeris_.save_ephemeris_map_xml(eph_xml_filename, supl_client_ephemeris_.gps_ephemeris_map) == true)
|
if (supl_client_ephemeris_.save_ephemeris_map_xml(eph_xml_filename, supl_client_ephemeris_.gps_ephemeris_map) == true)
|
||||||
{
|
{
|
||||||
std::cout << "SUPL: XML ephemeris data file created\n";
|
std::cout << "SUPL: XML ephemeris data file created\n";
|
||||||
@ -729,20 +733,20 @@ void ControlThread::assist_GNSS()
|
|||||||
gps_alm_iter++)
|
gps_alm_iter++)
|
||||||
{
|
{
|
||||||
std::cout << "SUPL: Received almanac data for satellite " << Gnss_Satellite("GPS", gps_alm_iter->second.i_satellite_PRN) << '\n';
|
std::cout << "SUPL: Received almanac data for satellite " << Gnss_Satellite("GPS", gps_alm_iter->second.i_satellite_PRN) << '\n';
|
||||||
std::shared_ptr<Gps_Almanac> tmp_obj = std::make_shared<Gps_Almanac>(gps_alm_iter->second);
|
const std::shared_ptr<Gps_Almanac> tmp_obj = std::make_shared<Gps_Almanac>(gps_alm_iter->second);
|
||||||
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
supl_client_ephemeris_.save_gps_almanac_xml("gps_almanac_map.xml", supl_client_ephemeris_.gps_almanac_map);
|
supl_client_ephemeris_.save_gps_almanac_xml("gps_almanac_map.xml", supl_client_ephemeris_.gps_almanac_map);
|
||||||
if (supl_client_ephemeris_.gps_iono.valid == true)
|
if (supl_client_ephemeris_.gps_iono.valid == true)
|
||||||
{
|
{
|
||||||
std::cout << "SUPL: Received GPS Ionosphere model parameters\n";
|
std::cout << "SUPL: Received GPS Ionosphere model parameters\n";
|
||||||
std::shared_ptr<Gps_Iono> tmp_obj = std::make_shared<Gps_Iono>(supl_client_ephemeris_.gps_iono);
|
const std::shared_ptr<Gps_Iono> tmp_obj = std::make_shared<Gps_Iono>(supl_client_ephemeris_.gps_iono);
|
||||||
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (supl_client_ephemeris_.gps_utc.valid == true)
|
if (supl_client_ephemeris_.gps_utc.valid == true)
|
||||||
{
|
{
|
||||||
std::cout << "SUPL: Received GPS UTC model parameters\n";
|
std::cout << "SUPL: Received GPS UTC model parameters\n";
|
||||||
std::shared_ptr<Gps_Utc_Model> tmp_obj = std::make_shared<Gps_Utc_Model>(supl_client_ephemeris_.gps_utc);
|
const std::shared_ptr<Gps_Utc_Model> tmp_obj = std::make_shared<Gps_Utc_Model>(supl_client_ephemeris_.gps_utc);
|
||||||
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
// Save iono and UTC model data to xml file
|
// Save iono and UTC model data to xml file
|
||||||
@ -789,7 +793,7 @@ void ControlThread::assist_GNSS()
|
|||||||
{
|
{
|
||||||
std::cout << "SUPL: Received Ref Location data (Acquisition Assistance)\n";
|
std::cout << "SUPL: Received Ref Location data (Acquisition Assistance)\n";
|
||||||
agnss_ref_location_ = supl_client_acquisition_.gps_ref_loc;
|
agnss_ref_location_ = supl_client_acquisition_.gps_ref_loc;
|
||||||
std::shared_ptr<Agnss_Ref_Location> tmp_obj = std::make_shared<Agnss_Ref_Location>(agnss_ref_location_);
|
const std::shared_ptr<Agnss_Ref_Location> tmp_obj = std::make_shared<Agnss_Ref_Location>(agnss_ref_location_);
|
||||||
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
||||||
supl_client_acquisition_.save_ref_location_xml("agnss_ref_location.xml", agnss_ref_location_);
|
supl_client_acquisition_.save_ref_location_xml("agnss_ref_location.xml", agnss_ref_location_);
|
||||||
}
|
}
|
||||||
@ -797,7 +801,7 @@ void ControlThread::assist_GNSS()
|
|||||||
{
|
{
|
||||||
std::cout << "SUPL: Received Ref Time data (Acquisition Assistance)\n";
|
std::cout << "SUPL: Received Ref Time data (Acquisition Assistance)\n";
|
||||||
agnss_ref_time_ = supl_client_acquisition_.gps_time;
|
agnss_ref_time_ = supl_client_acquisition_.gps_time;
|
||||||
std::shared_ptr<Agnss_Ref_Time> tmp_obj = std::make_shared<Agnss_Ref_Time>(agnss_ref_time_);
|
const std::shared_ptr<Agnss_Ref_Time> tmp_obj = std::make_shared<Agnss_Ref_Time>(agnss_ref_time_);
|
||||||
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
|
||||||
supl_client_acquisition_.save_ref_time_xml("agnss_ref_time.xml", agnss_ref_time_);
|
supl_client_acquisition_.save_ref_time_xml("agnss_ref_time.xml", agnss_ref_time_);
|
||||||
}
|
}
|
||||||
@ -833,7 +837,7 @@ void ControlThread::assist_GNSS()
|
|||||||
ref_rx_utc_time = static_cast<time_t>(agnss_ref_time_.d_tv_sec);
|
ref_rx_utc_time = static_cast<time_t>(agnss_ref_time_.d_tv_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Satellite>> visible_sats = get_visible_sats(ref_rx_utc_time, ref_LLH);
|
const std::vector<std::pair<int, Gnss_Satellite>> visible_sats = get_visible_sats(ref_rx_utc_time, ref_LLH);
|
||||||
// Set the receiver in Standby mode
|
// Set the receiver in Standby mode
|
||||||
flowgraph_->apply_action(0, 10);
|
flowgraph_->apply_action(0, 10);
|
||||||
// Give priority to visible satellites in the search list
|
// Give priority to visible satellites in the search list
|
||||||
@ -917,14 +921,14 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
gtime_t utc_gtime;
|
gtime_t utc_gtime;
|
||||||
utc_gtime.time = rx_utc_time;
|
utc_gtime.time = rx_utc_time;
|
||||||
utc_gtime.sec = 0.0;
|
utc_gtime.sec = 0.0;
|
||||||
gtime_t gps_gtime = utc2gpst(utc_gtime);
|
const gtime_t gps_gtime = utc2gpst(utc_gtime);
|
||||||
|
|
||||||
// 3. loop through all the available ephemeris or almanac and compute satellite positions and elevations
|
// 3. loop through all the available ephemeris or almanac and compute satellite positions and elevations
|
||||||
// store visible satellites in a vector of pairs <int,Gnss_Satellite> to associate an elevation to the each satellite
|
// store visible satellites in a vector of pairs <int,Gnss_Satellite> to associate an elevation to the each satellite
|
||||||
std::vector<std::pair<int, Gnss_Satellite>> available_satellites;
|
std::vector<std::pair<int, Gnss_Satellite>> available_satellites;
|
||||||
std::vector<unsigned int> visible_gps;
|
std::vector<unsigned int> visible_gps;
|
||||||
std::vector<unsigned int> visible_gal;
|
std::vector<unsigned int> visible_gal;
|
||||||
std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt();
|
const std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt();
|
||||||
struct tm tstruct
|
struct tm tstruct
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
@ -938,7 +942,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
const std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
const std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
||||||
for (auto &it : gps_eph_map)
|
for (auto &it : gps_eph_map)
|
||||||
{
|
{
|
||||||
eph_t rtklib_eph = eph_to_rtklib(it.second, pre_2009_file_);
|
const eph_t rtklib_eph = eph_to_rtklib(it.second, pre_2009_file_);
|
||||||
std::array<double, 3> r_sat{};
|
std::array<double, 3> r_sat{};
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
double sat_pos_variance_m2;
|
double sat_pos_variance_m2;
|
||||||
@ -963,7 +967,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
const std::map<int, Galileo_Ephemeris> gal_eph_map = pvt_ptr->get_galileo_ephemeris();
|
const std::map<int, Galileo_Ephemeris> gal_eph_map = pvt_ptr->get_galileo_ephemeris();
|
||||||
for (auto &it : gal_eph_map)
|
for (auto &it : gal_eph_map)
|
||||||
{
|
{
|
||||||
eph_t rtklib_eph = eph_to_rtklib(it.second);
|
const eph_t rtklib_eph = eph_to_rtklib(it.second);
|
||||||
std::array<double, 3> r_sat{};
|
std::array<double, 3> r_sat{};
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
double sat_pos_variance_m2;
|
double sat_pos_variance_m2;
|
||||||
@ -988,7 +992,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
const std::map<int, Gps_Almanac> gps_alm_map = pvt_ptr->get_gps_almanac();
|
const std::map<int, Gps_Almanac> gps_alm_map = pvt_ptr->get_gps_almanac();
|
||||||
for (auto &it : gps_alm_map)
|
for (auto &it : gps_alm_map)
|
||||||
{
|
{
|
||||||
alm_t rtklib_alm = alm_to_rtklib(it.second);
|
const alm_t rtklib_alm = alm_to_rtklib(it.second);
|
||||||
std::array<double, 3> r_sat{};
|
std::array<double, 3> r_sat{};
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
gtime_t aux_gtime;
|
gtime_t aux_gtime;
|
||||||
@ -1018,7 +1022,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
const std::map<int, Galileo_Almanac> gal_alm_map = pvt_ptr->get_galileo_almanac();
|
const std::map<int, Galileo_Almanac> gal_alm_map = pvt_ptr->get_galileo_almanac();
|
||||||
for (auto &it : gal_alm_map)
|
for (auto &it : gal_alm_map)
|
||||||
{
|
{
|
||||||
alm_t rtklib_alm = alm_to_rtklib(it.second);
|
const alm_t rtklib_alm = alm_to_rtklib(it.second);
|
||||||
std::array<double, 3> r_sat{};
|
std::array<double, 3> r_sat{};
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
gtime_t gal_gtime;
|
gtime_t gal_gtime;
|
||||||
@ -1101,9 +1105,9 @@ void ControlThread::sysv_queue_listener()
|
|||||||
bool read_queue = true;
|
bool read_queue = true;
|
||||||
stop_msgbuf msg;
|
stop_msgbuf msg;
|
||||||
double received_message = 0.0;
|
double received_message = 0.0;
|
||||||
int msgrcv_size = sizeof(msg.stop_message);
|
const int msgrcv_size = sizeof(msg.stop_message);
|
||||||
|
|
||||||
key_t key = 1102;
|
const key_t key = 1102;
|
||||||
|
|
||||||
if ((msqid_ = msgget(key, 0644 | IPC_CREAT)) == -1)
|
if ((msqid_ = msgget(key, 0644 | IPC_CREAT)) == -1)
|
||||||
{
|
{
|
||||||
@ -1140,6 +1144,9 @@ void ControlThread::keyboard_listener()
|
|||||||
control_queue_->push(pmt::make_any(command_event_make(200, 0)));
|
control_queue_->push(pmt::make_any(command_event_make(200, 0)));
|
||||||
read_keys = false;
|
read_keys = false;
|
||||||
}
|
}
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
else
|
||||||
|
{
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ bool FileConfiguration::property(std::string property_name, bool default_value)
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ int64_t FileConfiguration::property(std::string property_name, int64_t default_v
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ uint64_t FileConfiguration::property(std::string property_name, uint64_t default
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ int FileConfiguration::property(std::string property_name, int default_value) co
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ unsigned int FileConfiguration::property(std::string property_name, unsigned int
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ uint16_t FileConfiguration::property(std::string property_name, uint16_t default
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ int16_t FileConfiguration::property(std::string property_name, int16_t default_v
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ float FileConfiguration::property(std::string property_name, float default_value
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ double FileConfiguration::property(std::string property_name, double default_val
|
|||||||
{
|
{
|
||||||
return overrided_->property(property_name, default_value);
|
return overrided_->property(property_name, default_value);
|
||||||
}
|
}
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,14 +295,14 @@ void GNSSFlowgraph::connect()
|
|||||||
// connect the sample counter to Observables
|
// connect the sample counter to Observables
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
const double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
||||||
if (fs == 0.0)
|
if (fs == 0.0)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
||||||
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
|
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
|
||||||
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
||||||
}
|
}
|
||||||
int observable_interval_ms = configuration_->property("GNSS-SDR.observable_interval_ms", 20);
|
const int observable_interval_ms = configuration_->property("GNSS-SDR.observable_interval_ms", 20);
|
||||||
ch_out_sample_counter_ = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
|
ch_out_sample_counter_ = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
|
||||||
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter_, 0);
|
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter_, 0);
|
||||||
top_block_->connect(ch_out_sample_counter_, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse
|
top_block_->connect(ch_out_sample_counter_, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse
|
||||||
@ -320,14 +320,14 @@ void GNSSFlowgraph::connect()
|
|||||||
// create a hardware-defined gnss_synchro pulse for the observables block
|
// create a hardware-defined gnss_synchro pulse for the observables block
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
const double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
||||||
if (fs == 0.0)
|
if (fs == 0.0)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
||||||
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
|
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
|
||||||
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
||||||
}
|
}
|
||||||
int observable_interval_ms = configuration_->property("GNSS-SDR.observable_interval_ms", 20);
|
const int observable_interval_ms = configuration_->property("GNSS-SDR.observable_interval_ms", 20);
|
||||||
ch_out_fpga_sample_counter_ = gnss_sdr_make_fpga_sample_counter(fs, observable_interval_ms);
|
ch_out_fpga_sample_counter_ = gnss_sdr_make_fpga_sample_counter(fs, observable_interval_ms);
|
||||||
top_block_->connect(ch_out_fpga_sample_counter_, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse
|
top_block_->connect(ch_out_fpga_sample_counter_, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse
|
||||||
}
|
}
|
||||||
@ -344,7 +344,7 @@ void GNSSFlowgraph::connect()
|
|||||||
// connect the sample counter to Observables
|
// connect the sample counter to Observables
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
const double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
||||||
if (fs == 0.0)
|
if (fs == 0.0)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
||||||
@ -352,7 +352,7 @@ void GNSSFlowgraph::connect()
|
|||||||
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int observable_interval_ms = configuration_->property("GNSS-SDR.observable_interval_ms", 20);
|
const int observable_interval_ms = configuration_->property("GNSS-SDR.observable_interval_ms", 20);
|
||||||
ch_out_sample_counter_ = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
|
ch_out_sample_counter_ = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
|
||||||
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter_, 0);
|
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter_, 0);
|
||||||
top_block_->connect(ch_out_sample_counter_, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse
|
top_block_->connect(ch_out_sample_counter_, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse
|
||||||
@ -368,6 +368,7 @@ void GNSSFlowgraph::connect()
|
|||||||
|
|
||||||
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
||||||
std::vector<bool> signal_conditioner_connected;
|
std::vector<bool> signal_conditioner_connected;
|
||||||
|
signal_conditioner_connected.reserve(sig_conditioner_.size());
|
||||||
for (size_t n = 0; n < sig_conditioner_.size(); n++)
|
for (size_t n = 0; n < sig_conditioner_.size(); n++)
|
||||||
{
|
{
|
||||||
signal_conditioner_connected.push_back(false);
|
signal_conditioner_connected.push_back(false);
|
||||||
@ -376,8 +377,8 @@ void GNSSFlowgraph::connect()
|
|||||||
{
|
{
|
||||||
#ifndef ENABLE_FPGA
|
#ifndef ENABLE_FPGA
|
||||||
int selected_signal_conditioner_ID = 0;
|
int selected_signal_conditioner_ID = 0;
|
||||||
bool use_acq_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
const bool use_acq_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
||||||
uint32_t fs = configuration_->property("GNSS-SDR.internal_fs_sps", 0);
|
const uint32_t fs = configuration_->property("GNSS-SDR.internal_fs_sps", 0);
|
||||||
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -433,36 +434,19 @@ void GNSSFlowgraph::connect()
|
|||||||
if (acq_fs < fs)
|
if (acq_fs < fs)
|
||||||
{
|
{
|
||||||
// check if the resampler is already created for the channel system/signal and for the specific RF Channel
|
// check if the resampler is already created for the channel system/signal and for the specific RF Channel
|
||||||
std::string map_key = channels_.at(i)->implementation() + std::to_string(selected_signal_conditioner_ID);
|
const std::string map_key = channels_.at(i)->implementation() + std::to_string(selected_signal_conditioner_ID);
|
||||||
resampler_ratio = static_cast<double>(fs) / acq_fs;
|
resampler_ratio = static_cast<double>(fs) / acq_fs;
|
||||||
int decimation = floor(resampler_ratio);
|
int decimation = floor(resampler_ratio);
|
||||||
while (fs % decimation > 0)
|
while (fs % decimation > 0)
|
||||||
{
|
{
|
||||||
decimation--;
|
decimation--;
|
||||||
};
|
};
|
||||||
double acq_fs_decimated = static_cast<double>(fs) / static_cast<double>(decimation);
|
const double acq_fs_decimated = static_cast<double>(fs) / static_cast<double>(decimation);
|
||||||
|
|
||||||
if (decimation > 1)
|
if (decimation > 1)
|
||||||
{
|
{
|
||||||
// create a FIR low pass filter
|
// create a FIR low pass filter
|
||||||
std::vector<float> taps;
|
std::vector<float> taps = gr::filter::firdes::low_pass(1.0,
|
||||||
|
|
||||||
// float beta = 7.0;
|
|
||||||
// float halfband = 0.5;
|
|
||||||
// float fractional_bw = 0.4;
|
|
||||||
// float rate = 1.0 / static_cast<float>(decimation);
|
|
||||||
//
|
|
||||||
// float trans_width = rate * (halfband - fractional_bw);
|
|
||||||
// float mid_transition_band = rate * halfband - trans_width / 2.0;
|
|
||||||
//
|
|
||||||
// taps = gr::filter::firdes::low_pass(1.0,
|
|
||||||
// 1.0,
|
|
||||||
// mid_transition_band,
|
|
||||||
// trans_width,
|
|
||||||
// gr::filter::firdes::win_type::WIN_KAISER,
|
|
||||||
// beta);
|
|
||||||
|
|
||||||
taps = gr::filter::firdes::low_pass(1.0,
|
|
||||||
fs,
|
fs,
|
||||||
acq_fs_decimated / 2.1,
|
acq_fs_decimated / 2.1,
|
||||||
acq_fs_decimated / 2,
|
acq_fs_decimated / 2,
|
||||||
@ -490,8 +474,7 @@ void GNSSFlowgraph::connect()
|
|||||||
top_block_->connect(acq_resamplers_.at(map_key), 0,
|
top_block_->connect(acq_resamplers_.at(map_key), 0,
|
||||||
channels_.at(i)->get_left_block_acq(), 0);
|
channels_.at(i)->get_left_block_acq(), 0);
|
||||||
|
|
||||||
std::shared_ptr<Channel> channel_ptr;
|
std::shared_ptr<Channel> channel_ptr = std::dynamic_pointer_cast<Channel>(channels_.at(i));
|
||||||
channel_ptr = std::dynamic_pointer_cast<Channel>(channels_.at(i));
|
|
||||||
channel_ptr->acquisition()->set_resampler_latency((taps.size() - 1) / 2);
|
channel_ptr->acquisition()->set_resampler_latency((taps.size() - 1) / 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -585,7 +568,7 @@ void GNSSFlowgraph::connect()
|
|||||||
// Assign satellites to channels in the initialization
|
// Assign satellites to channels in the initialization
|
||||||
for (unsigned int& i : vector_of_channels)
|
for (unsigned int& i : vector_of_channels)
|
||||||
{
|
{
|
||||||
std::string gnss_signal = channels_.at(i)->get_signal().get_signal_str(); // use channel's implicit signal
|
const std::string gnss_signal = channels_.at(i)->get_signal().get_signal_str(); // use channel's implicit signal
|
||||||
unsigned int sat = 0;
|
unsigned int sat = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ InMemoryConfiguration::~InMemoryConfiguration()
|
|||||||
|
|
||||||
std::string InMemoryConfiguration::property(std::string property_name, std::string default_value) const
|
std::string InMemoryConfiguration::property(std::string property_name, std::string default_value) const
|
||||||
{
|
{
|
||||||
auto iter = properties_.find(property_name);
|
const auto iter = properties_.find(property_name);
|
||||||
if (iter != properties_.end())
|
if (iter != properties_.end())
|
||||||
{
|
{
|
||||||
return iter->second;
|
return iter->second;
|
||||||
@ -49,63 +49,63 @@ std::string InMemoryConfiguration::property(std::string property_name, std::stri
|
|||||||
|
|
||||||
bool InMemoryConfiguration::property(std::string property_name, bool default_value) const
|
bool InMemoryConfiguration::property(std::string property_name, bool default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int64_t InMemoryConfiguration::property(std::string property_name, int64_t default_value) const
|
int64_t InMemoryConfiguration::property(std::string property_name, int64_t default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint64_t InMemoryConfiguration::property(std::string property_name, uint64_t default_value) const
|
uint64_t InMemoryConfiguration::property(std::string property_name, uint64_t default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t InMemoryConfiguration::property(std::string property_name, int32_t default_value) const
|
int32_t InMemoryConfiguration::property(std::string property_name, int32_t default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t InMemoryConfiguration::property(std::string property_name, uint32_t default_value) const
|
uint32_t InMemoryConfiguration::property(std::string property_name, uint32_t default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint16_t InMemoryConfiguration::property(std::string property_name, uint16_t default_value) const
|
uint16_t InMemoryConfiguration::property(std::string property_name, uint16_t default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int16_t InMemoryConfiguration::property(std::string property_name, int16_t default_value) const
|
int16_t InMemoryConfiguration::property(std::string property_name, int16_t default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float InMemoryConfiguration::property(std::string property_name, float default_value) const
|
float InMemoryConfiguration::property(std::string property_name, float default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double InMemoryConfiguration::property(std::string property_name, double default_value) const
|
double InMemoryConfiguration::property(std::string property_name, double default_value) const
|
||||||
{
|
{
|
||||||
std::string empty;
|
const std::string empty;
|
||||||
return converter_->convert(property(property_name, empty), default_value);
|
return converter_->convert(property(property_name, empty), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ std::string TcpCmdInterface::reset(const std::vector<std::string> &commandLine _
|
|||||||
std::string response;
|
std::string response;
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
command_event_sptr new_evnt = command_event_make(200, 1); // send the restart message (who=200,what=1)
|
const command_event_sptr new_evnt = command_event_make(200, 1); // send the restart message (who=200,what=1)
|
||||||
control_queue_->push(pmt::make_any(new_evnt));
|
control_queue_->push(pmt::make_any(new_evnt));
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ std::string TcpCmdInterface::standby(const std::vector<std::string> &commandLine
|
|||||||
std::string response;
|
std::string response;
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
command_event_sptr new_evnt = command_event_make(300, 10); // send the standby message (who=300,what=10)
|
const command_event_sptr new_evnt = command_event_make(300, 10); // send the standby message (who=300,what=10)
|
||||||
control_queue_->push(pmt::make_any(new_evnt));
|
control_queue_->push(pmt::make_any(new_evnt));
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
@ -149,11 +149,13 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine
|
|||||||
&course_over_ground_deg,
|
&course_over_ground_deg,
|
||||||
&UTC_time) == true)
|
&UTC_time) == true)
|
||||||
{
|
{
|
||||||
struct tm tstruct = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nullptr};
|
struct tm tstruct
|
||||||
|
{
|
||||||
|
};
|
||||||
std::array<char, 80> buf1{};
|
std::array<char, 80> buf1{};
|
||||||
tstruct = *gmtime(&UTC_time);
|
tstruct = *gmtime(&UTC_time);
|
||||||
strftime(buf1.data(), buf1.size(), "%d/%m/%Y %H:%M:%S", &tstruct);
|
strftime(buf1.data(), buf1.size(), "%d/%m/%Y %H:%M:%S", &tstruct);
|
||||||
std::string str_time = std::string(buf1.data());
|
const std::string str_time = std::string(buf1.data());
|
||||||
str_stream << "- Receiver UTC Time: " << str_time << '\n';
|
str_stream << "- Receiver UTC Time: " << str_time << '\n';
|
||||||
str_stream << std::setprecision(9);
|
str_stream << std::setprecision(9);
|
||||||
str_stream << "- Receiver Position WGS84 [Lat, Long, H]: "
|
str_stream << "- Receiver Position WGS84 [Lat, Long, H]: "
|
||||||
@ -179,10 +181,11 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin
|
|||||||
std::string response;
|
std::string response;
|
||||||
if (commandLine.size() > 5)
|
if (commandLine.size() > 5)
|
||||||
{
|
{
|
||||||
std::string tmp_str;
|
|
||||||
// Read commandline time parameter
|
// Read commandline time parameter
|
||||||
struct tm tm = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nullptr};
|
struct tm tm
|
||||||
tmp_str = commandLine.at(1) + commandLine.at(2);
|
{
|
||||||
|
};
|
||||||
|
const std::string tmp_str = commandLine.at(1) + commandLine.at(2);
|
||||||
if (strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
if (strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
||||||
{
|
{
|
||||||
response = "ERROR: time parameter malformed\n";
|
response = "ERROR: time parameter malformed\n";
|
||||||
@ -203,7 +206,7 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin
|
|||||||
{
|
{
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
command_event_sptr new_evnt = command_event_make(300, 12); // send the standby message (who=300,what=12)
|
const command_event_sptr new_evnt = command_event_make(300, 12); // send the standby message (who=300,what=12)
|
||||||
control_queue_->push(pmt::make_any(new_evnt));
|
control_queue_->push(pmt::make_any(new_evnt));
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
@ -226,10 +229,11 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi
|
|||||||
std::string response;
|
std::string response;
|
||||||
if (commandLine.size() > 5)
|
if (commandLine.size() > 5)
|
||||||
{
|
{
|
||||||
std::string tmp_str;
|
|
||||||
// Read commandline time parameter
|
// Read commandline time parameter
|
||||||
struct tm tm = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nullptr};
|
struct tm tm
|
||||||
tmp_str = commandLine.at(1) + commandLine.at(2);
|
{
|
||||||
|
};
|
||||||
|
const std::string tmp_str = commandLine.at(1) + commandLine.at(2);
|
||||||
if (strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
if (strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
||||||
{
|
{
|
||||||
response = "ERROR: time parameter malformed\n";
|
response = "ERROR: time parameter malformed\n";
|
||||||
@ -250,7 +254,7 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi
|
|||||||
{
|
{
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
command_event_sptr new_evnt = command_event_make(300, 13); // send the warmstart message (who=300,what=13)
|
const command_event_sptr new_evnt = command_event_make(300, 13); // send the warmstart message (who=300,what=13)
|
||||||
control_queue_->push(pmt::make_any(new_evnt));
|
control_queue_->push(pmt::make_any(new_evnt));
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
@ -273,7 +277,7 @@ std::string TcpCmdInterface::coldstart(const std::vector<std::string> &commandLi
|
|||||||
std::string response;
|
std::string response;
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
command_event_sptr new_evnt = command_event_make(300, 11); // send the coldstart message (who=300,what=11)
|
const command_event_sptr new_evnt = command_event_make(300, 11); // send the coldstart message (who=300,what=11)
|
||||||
control_queue_->push(pmt::make_any(new_evnt));
|
control_queue_->push(pmt::make_any(new_evnt));
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
@ -304,7 +308,7 @@ void TcpCmdInterface::set_msg_queue(std::shared_ptr<Concurrent_Queue<pmt::pmt_t>
|
|||||||
void TcpCmdInterface::run_cmd_server(int tcp_port)
|
void TcpCmdInterface::run_cmd_server(int tcp_port)
|
||||||
{
|
{
|
||||||
// Get the port from the parameters
|
// Get the port from the parameters
|
||||||
uint16_t port = tcp_port;
|
const uint16_t port = tcp_port;
|
||||||
|
|
||||||
// Error to not throw exception
|
// Error to not throw exception
|
||||||
boost::system::error_code not_throw;
|
boost::system::error_code not_throw;
|
||||||
@ -340,7 +344,7 @@ void TcpCmdInterface::run_cmd_server(int tcp_port)
|
|||||||
std::string line;
|
std::string line;
|
||||||
std::getline(is, line);
|
std::getline(is, line);
|
||||||
std::istringstream iss(line);
|
std::istringstream iss(line);
|
||||||
std::vector<std::string> cmd_vector(std::istream_iterator<std::string>{iss},
|
const std::vector<std::string> cmd_vector(std::istream_iterator<std::string>{iss},
|
||||||
std::istream_iterator<std::string>());
|
std::istream_iterator<std::string>());
|
||||||
|
|
||||||
if (!cmd_vector.empty())
|
if (!cmd_vector.empty())
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
double Galileo_Ephemeris::Galileo_System_Time(double WN, double TOW)
|
double Galileo_Ephemeris::Galileo_System_Time(double WN, double TOW)
|
||||||
{
|
{
|
||||||
/* GALIELO SYSTEM TIME, ICD 5.1.2
|
/* GALILEO SYSTEM TIME, ICD 5.1.2
|
||||||
* input parameter:
|
* input parameter:
|
||||||
* WN: The Week Number is an integer counter that gives the sequential week number
|
* WN: The Week Number is an integer counter that gives the sequential week number
|
||||||
from the origin of the Galileo time. It covers 4096 weeks (about 78 years).
|
from the origin of the Galileo time. It covers 4096 weeks (about 78 years).
|
||||||
|
Loading…
Reference in New Issue
Block a user