1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-15 19:55:47 +00:00

Miscellaneous changes: fix typos, warnings

This commit is contained in:
Carles Fernandez 2019-07-20 02:53:31 +02:00
parent 0e583f5c39
commit ef9c02bac2
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
7 changed files with 61 additions and 58 deletions

View File

@ -148,7 +148,7 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface*
for (uint32_t i = 0; i < (n_channels_); i++) for (uint32_t i = 0; i < (n_channels_); i++)
{ {
valve_vec_.push_back(gnss_sdr_make_valve(sizeof(gr_complex), samples_, queue_)); valve_vec_.emplace_back(gnss_sdr_make_valve(sizeof(gr_complex), samples_, queue_));
if (dump_) if (dump_)
{ {
std::string tmp_str = dump_filename_ + "_ch" + std::to_string(i); std::string tmp_str = dump_filename_ + "_ch" + std::to_string(i);

View File

@ -216,7 +216,7 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
if (samples_.at(i) != 0ULL) if (samples_.at(i) != 0ULL)
{ {
LOG(INFO) << "RF_channel " << i << " Send STOP signal after " << samples_.at(i) << " samples"; LOG(INFO) << "RF_channel " << i << " Send STOP signal after " << samples_.at(i) << " samples";
valve_.push_back(gnss_sdr_make_valve(item_size_, samples_.at(i), queue_)); valve_.emplace_back(gnss_sdr_make_valve(item_size_, samples_.at(i), queue_));
DLOG(INFO) << "valve(" << valve_.at(i)->unique_id() << ")"; DLOG(INFO) << "valve(" << valve_.at(i)->unique_id() << ")";
} }

View File

@ -64,6 +64,7 @@
#include <glog/logging.h> // for LOG #include <glog/logging.h> // for LOG
#include <pmt/pmt.h> // for make_any #include <pmt/pmt.h> // for make_any
#include <algorithm> // for find, min #include <algorithm> // for find, min
#include <array> // for array
#include <chrono> // for milliseconds #include <chrono> // for milliseconds
#include <cmath> // for floor, fmod, log #include <cmath> // for floor, fmod, log
#include <ctime> // for gmtime, strftime #include <ctime> // for gmtime, strftime
@ -831,6 +832,7 @@ void ControlThread::assist_GNSS()
} }
} }
void ControlThread::apply_action(unsigned int what) void ControlThread::apply_action(unsigned int what)
{ {
std::shared_ptr<PvtInterface> pvt_ptr; std::shared_ptr<PvtInterface> pvt_ptr;
@ -916,10 +918,10 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
for (auto &it : gps_eph_map) for (auto &it : gps_eph_map)
{ {
eph_t rtklib_eph = eph_to_rtklib(it.second); eph_t rtklib_eph = eph_to_rtklib(it.second);
double r_sat[3]; std::array<double, 3> r_sat{};
double clock_bias_s; double clock_bias_s;
double sat_pos_variance_m2; double sat_pos_variance_m2;
eph2pos(gps_gtime, &rtklib_eph, &r_sat[0], &clock_bias_s, eph2pos(gps_gtime, &rtklib_eph, r_sat.data(), &clock_bias_s,
&sat_pos_variance_m2); &sat_pos_variance_m2);
double Az, El, dist_m; double Az, El, dist_m;
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]}; arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
@ -939,10 +941,10 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
for (auto &it : gal_eph_map) for (auto &it : gal_eph_map)
{ {
eph_t rtklib_eph = eph_to_rtklib(it.second); eph_t rtklib_eph = eph_to_rtklib(it.second);
double r_sat[3]; std::array<double, 3> r_sat{};
double clock_bias_s; double clock_bias_s;
double sat_pos_variance_m2; double sat_pos_variance_m2;
eph2pos(gps_gtime, &rtklib_eph, &r_sat[0], &clock_bias_s, eph2pos(gps_gtime, &rtklib_eph, r_sat.data(), &clock_bias_s,
&sat_pos_variance_m2); &sat_pos_variance_m2);
double Az, El, dist_m; double Az, El, dist_m;
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]}; arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
@ -962,12 +964,12 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
for (auto &it : gps_alm_map) for (auto &it : gps_alm_map)
{ {
alm_t rtklib_alm = alm_to_rtklib(it.second); alm_t rtklib_alm = alm_to_rtklib(it.second);
double r_sat[3]; std::array<double, 3> r_sat{};
double clock_bias_s; double clock_bias_s;
gtime_t aux_gtime; gtime_t aux_gtime;
aux_gtime.time = fmod(utc2gpst(gps_gtime).time + 345600, 604800); aux_gtime.time = fmod(utc2gpst(gps_gtime).time + 345600, 604800);
aux_gtime.sec = 0.0; aux_gtime.sec = 0.0;
alm2pos(aux_gtime, &rtklib_alm, &r_sat[0], &clock_bias_s); alm2pos(aux_gtime, &rtklib_alm, r_sat.data(), &clock_bias_s);
double Az, El, dist_m; double Az, El, dist_m;
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]}; arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
arma::vec dx = r_sat_eb_e - r_eb_e; arma::vec dx = r_sat_eb_e - r_eb_e;
@ -990,12 +992,12 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
for (auto &it : gal_alm_map) for (auto &it : gal_alm_map)
{ {
alm_t rtklib_alm = alm_to_rtklib(it.second); alm_t rtklib_alm = alm_to_rtklib(it.second);
double r_sat[3]; std::array<double, 3> r_sat{};
double clock_bias_s; double clock_bias_s;
gtime_t gal_gtime; gtime_t gal_gtime;
gal_gtime.time = fmod(utc2gpst(gps_gtime).time + 345600, 604800); gal_gtime.time = fmod(utc2gpst(gps_gtime).time + 345600, 604800);
gal_gtime.sec = 0.0; gal_gtime.sec = 0.0;
alm2pos(gal_gtime, &rtklib_alm, &r_sat[0], &clock_bias_s); alm2pos(gal_gtime, &rtklib_alm, r_sat.data(), &clock_bias_s);
double Az, El, dist_m; double Az, El, dist_m;
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]}; arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
arma::vec dx = r_sat_eb_e - r_eb_e; arma::vec dx = r_sat_eb_e - r_eb_e;

View File

@ -428,6 +428,8 @@ void GNSSFlowgraph::connect()
case evBDS_B3: case evBDS_B3:
acq_fs = fs; acq_fs = fs;
break; break;
default:
break;
} }
if (acq_fs < fs) if (acq_fs < fs)
@ -528,7 +530,6 @@ void GNSSFlowgraph::connect()
DLOG(INFO) << "signal conditioner " << selected_signal_conditioner_ID << " connected to channel " << i; DLOG(INFO) << "signal conditioner " << selected_signal_conditioner_ID << " connected to channel " << i;
} }
#endif #endif
// Signal Source > Signal conditioner >> Channels >> Observables // Signal Source > Signal conditioner >> Channels >> Observables
try try
{ {
@ -544,7 +545,7 @@ void GNSSFlowgraph::connect()
} }
} }
//check for unconnected signal conditioners and connect null_sinks in order to provide configuration flexibility to multiband files or signal sources // check for unconnected signal conditioners and connect null_sinks in order to provide configuration flexibility to multiband files or signal sources
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false) if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
{ {
for (size_t n = 0; n < sig_conditioner_.size(); n++) for (size_t n = 0; n < sig_conditioner_.size(); n++)
@ -1061,6 +1062,7 @@ bool GNSSFlowgraph::send_telemetry_msg(const pmt::pmt_t& msg)
return true; return true;
} }
void GNSSFlowgraph::push_back_signal(Gnss_Signal gs) void GNSSFlowgraph::push_back_signal(Gnss_Signal gs)
{ {
switch (mapStringValues_[gs.get_signal_str()]) switch (mapStringValues_[gs.get_signal_str()])
@ -1116,6 +1118,7 @@ void GNSSFlowgraph::push_back_signal(Gnss_Signal gs)
} }
} }
void GNSSFlowgraph::remove_signal(Gnss_Signal gs) void GNSSFlowgraph::remove_signal(Gnss_Signal gs)
{ {
switch (mapStringValues_[gs.get_signal_str()]) switch (mapStringValues_[gs.get_signal_str()])
@ -1162,6 +1165,7 @@ void GNSSFlowgraph::remove_signal(Gnss_Signal gs)
} }
} }
void GNSSFlowgraph::acquisition_manager(unsigned int who) void GNSSFlowgraph::acquisition_manager(unsigned int who)
{ {
unsigned int current_channel; unsigned int current_channel;
@ -1195,12 +1199,12 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
RX_time); RX_time);
channels_[current_channel]->set_signal(gnss_signal); channels_[current_channel]->set_signal(gnss_signal);
start_acquisition = is_primary_freq or assistance_available or !configuration_->property("GNSS-SDR.assist_dual_frequency_acq", false); start_acquisition = is_primary_freq or assistance_available or !configuration_->property("GNSS-SDR.assist_dual_frequency_acq", false);
// if (assistance_available) // if (assistance_available)
// { // {
// std::cout << "Channel " << current_channel // std::cout << "Channel " << current_channel
// << " assistance available for " << channels_[current_channel]->get_signal().get_satellite() // << " assistance available for " << channels_[current_channel]->get_signal().get_satellite()
// << ", Signal " << channels_[current_channel]->get_signal().get_signal_str() << "\n"; // << ", Signal " << channels_[current_channel]->get_signal().get_signal_str() << std::endl;
// } // }
} }
else else
{ {
@ -1230,15 +1234,17 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
<< channels_[current_channel]->get_signal().get_satellite() << channels_[current_channel]->get_signal().get_satellite()
<< ", Signal " << channels_[current_channel]->get_signal().get_signal_str(); << ", Signal " << channels_[current_channel]->get_signal().get_signal_str();
// std::cout << "Channel " << current_channel // std::cout << "Channel " << current_channel
// << " secondary frequency acquisition assistance not available in " // << " secondary frequency acquisition assistance not available in "
// << channels_[current_channel]->get_signal().get_satellite() // << channels_[current_channel]->get_signal().get_satellite()
// << ", Signal " << channels_[current_channel]->get_signal().get_signal_str() << "\n"; // << ", Signal " << channels_[current_channel]->get_signal().get_signal_str() << std::endl;
} }
} }
DLOG(INFO) << "Channel " << current_channel << " in state " << channels_state_[current_channel]; DLOG(INFO) << "Channel " << current_channel << " in state " << channels_state_[current_channel];
} }
} }
/* /*
* Applies an action to the flow graph * Applies an action to the flow graph
* *
@ -1250,7 +1256,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
* \param[in] what What is the action: * \param[in] what What is the action:
* --- actions from channels --- * --- actions from channels ---
* -> 0 acquisition failed * -> 0 acquisition failed
* -> 1 acquisition succesfull * -> 1 acquisition successful
* -> 2 tracking lost * -> 2 tracking lost
* --- actions from TC receiver control --- * --- actions from TC receiver control ---
* -> 10 TC request standby mode * -> 10 TC request standby mode
@ -1290,7 +1296,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
} }
channels_state_[who] = 0; channels_state_[who] = 0;
if (acq_channels_count_ > 0) acq_channels_count_--; if (acq_channels_count_ > 0) acq_channels_count_--;
//call the acquisition manager to assign new satellite and start next acquisition (if required) // call the acquisition manager to assign new satellite and start next acquisition (if required)
acquisition_manager(who); acquisition_manager(who);
break; break;
case 1: case 1:
@ -1300,7 +1306,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
channels_state_[who] = 2; channels_state_[who] = 2;
if (acq_channels_count_ > 0) acq_channels_count_--; if (acq_channels_count_ > 0) acq_channels_count_--;
//call the acquisition manager to assign new satellite and start next acquisition (if required) // call the acquisition manager to assign new satellite and start next acquisition (if required)
acquisition_manager(who); acquisition_manager(who);
break; break;
@ -1308,7 +1314,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
DLOG(INFO) << "Channel " << who << " TRK FAILED satellite " << channels_[who]->get_signal().get_satellite(); DLOG(INFO) << "Channel " << who << " TRK FAILED satellite " << channels_[who]->get_signal().get_satellite();
if (acq_channels_count_ < max_acq_channels_) if (acq_channels_count_ < max_acq_channels_)
{ {
//try to acquire the same satellite // try to acquire the same satellite
channels_state_[who] = 1; channels_state_[who] = 1;
acq_channels_count_++; acq_channels_count_++;
DLOG(INFO) << "Channel " << who << " Starting acquisition " << channels_[who]->get_signal().get_satellite() << ", Signal " << channels_[who]->get_signal().get_signal_str(); DLOG(INFO) << "Channel " << who << " Starting acquisition " << channels_[who]->get_signal().get_satellite() << ", Signal " << channels_[who]->get_signal().get_signal_str();
@ -1334,9 +1340,9 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
LOG(INFO) << "TC request standby mode"; LOG(INFO) << "TC request standby mode";
for (size_t n = 0; n < channels_.size(); n++) for (size_t n = 0; n < channels_.size(); n++)
{ {
if (channels_state_[n] == 1 or channels_state_[n] == 2) //channel in acquisition or in tracking if (channels_state_[n] == 1 or channels_state_[n] == 2) // channel in acquisition or in tracking
{ {
//recover the satellite assigned // recover the satellite assigned
Gnss_Signal gs = channels_[n]->get_signal(); Gnss_Signal gs = channels_[n]->get_signal();
push_back_signal(gs); push_back_signal(gs);
@ -1348,17 +1354,17 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
break; break;
case 11: // request coldstart mode case 11: // request coldstart mode
LOG(INFO) << "TC request flowgraph coldstart"; LOG(INFO) << "TC request flowgraph coldstart";
//call the acquisition manager to assign new satellite and start next acquisition (if required) // call the acquisition manager to assign new satellite and start next acquisition (if required)
acquisition_manager(who); acquisition_manager(who);
break; break;
case 12: // request hotstart mode case 12: // request hotstart mode
LOG(INFO) << "TC request flowgraph hotstart"; LOG(INFO) << "TC request flowgraph hotstart";
//call the acquisition manager to assign new satellite and start next acquisition (if required) // call the acquisition manager to assign new satellite and start next acquisition (if required)
acquisition_manager(who); acquisition_manager(who);
break; break;
case 13: // request warmstart mode case 13: // request warmstart mode
LOG(INFO) << "TC request flowgraph warmstart"; LOG(INFO) << "TC request flowgraph warmstart";
//call the acquisition manager to assign new satellite and start next acquisition (if required) // call the acquisition manager to assign new satellite and start next acquisition (if required)
acquisition_manager(who); acquisition_manager(who);
break; break;
default: default:
@ -1810,9 +1816,7 @@ void GNSSFlowgraph::set_signals_list()
if (configuration_->property("Channels_B1.count", 0) > 0) if (configuration_->property("Channels_B1.count", 0) > 0)
{ {
/* // Loop to create the list of BeiDou B1C signals
* Loop to create the list of BeiDou B1C signals
*/
for (available_gnss_prn_iter = available_beidou_prn.cbegin(); for (available_gnss_prn_iter = available_beidou_prn.cbegin();
available_gnss_prn_iter != available_beidou_prn.cend(); available_gnss_prn_iter != available_beidou_prn.cend();
available_gnss_prn_iter++) available_gnss_prn_iter++)
@ -1825,9 +1829,7 @@ void GNSSFlowgraph::set_signals_list()
if (configuration_->property("Channels_B3.count", 0) > 0) if (configuration_->property("Channels_B3.count", 0) > 0)
{ {
/* // Loop to create the list of BeiDou B1C signals
* Loop to create the list of BeiDou B1C signals
*/
for (available_gnss_prn_iter = available_beidou_prn.cbegin(); for (available_gnss_prn_iter = available_beidou_prn.cbegin();
available_gnss_prn_iter != available_beidou_prn.cend(); available_gnss_prn_iter != available_beidou_prn.cend();
available_gnss_prn_iter++) available_gnss_prn_iter++)
@ -1888,15 +1890,15 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
available_GPS_1C_signals_.push_back(result); available_GPS_1C_signals_.push_back(result);
} }
is_primary_frequency = true; //indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..) is_primary_frequency = true; // indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..)
break; break;
case evGPS_2S: case evGPS_2S:
if (configuration_->property("Channels_1C.count", 0) > 0) if (configuration_->property("Channels_1C.count", 0) > 0)
{ {
//1. Get the current channel status map // 1. Get the current channel status map
std::map<int, std::shared_ptr<Gnss_Synchro>> current_channels_status = channels_status_->get_current_status_map(); std::map<int, std::shared_ptr<Gnss_Synchro>> current_channels_status = channels_status_->get_current_status_map();
//2. search the currently tracked GPS L1 satellites and assist the GPS L2 acquisition if the satellite is not tracked on L2 // 2. search the currently tracked GPS L1 satellites and assist the GPS L2 acquisition if the satellite is not tracked on L2
bool found_signal = false; bool found_signal = false;
for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = current_channels_status.begin(); it != current_channels_status.end(); ++it) for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = current_channels_status.begin(); it != current_channels_status.end(); ++it)
{ {
@ -1910,8 +1912,8 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
estimated_doppler = it->second->Carrier_Doppler_hz; estimated_doppler = it->second->Carrier_Doppler_hz;
RX_time = it->second->RX_time; RX_time = it->second->RX_time;
//std::cout << " Channel: " << it->first << " => Doppler: " << estimated_doppler << "[Hz] \n"; // std::cout << " Channel: " << it->first << " => Doppler: " << estimated_doppler << "[Hz] \n";
//3. return the GPS L2 satellite and remove it from list // 3. return the GPS L2 satellite and remove it from list
result = *it2; result = *it2;
if (pop) if (pop)
{ {
@ -1923,7 +1925,7 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
} }
} }
} }
//fallback: pick the front satellite because there is no tracked satellites in L1 to assist L2 // fallback: pick the front satellite because there is no tracked satellites in L1 to assist L2
if (found_signal == false) if (found_signal == false)
{ {
result = available_GPS_2S_signals_.front(); result = available_GPS_2S_signals_.front();
@ -1948,9 +1950,9 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
case evGPS_L5: case evGPS_L5:
if (configuration_->property("Channels_1C.count", 0) > 0) if (configuration_->property("Channels_1C.count", 0) > 0)
{ {
//1. Get the current channel status map // 1. Get the current channel status map
std::map<int, std::shared_ptr<Gnss_Synchro>> current_channels_status = channels_status_->get_current_status_map(); std::map<int, std::shared_ptr<Gnss_Synchro>> current_channels_status = channels_status_->get_current_status_map();
//2. search the currently tracked GPS L1 satellites and assist the GPS L5 acquisition if the satellite is not tracked on L5 // 2. search the currently tracked GPS L1 satellites and assist the GPS L5 acquisition if the satellite is not tracked on L5
for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = current_channels_status.begin(); it != current_channels_status.end(); ++it) for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = current_channels_status.begin(); it != current_channels_status.end(); ++it)
{ {
if (std::string(it->second->Signal) == "1C") if (std::string(it->second->Signal) == "1C")
@ -1963,8 +1965,8 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
estimated_doppler = it->second->Carrier_Doppler_hz; estimated_doppler = it->second->Carrier_Doppler_hz;
RX_time = it->second->RX_time; RX_time = it->second->RX_time;
//std::cout << " Channel: " << it->first << " => Doppler: " << estimated_doppler << "[Hz] \n"; // std::cout << " Channel: " << it->first << " => Doppler: " << estimated_doppler << "[Hz] \n";
//3. return the GPS L5 satellite and remove it from list // 3. return the GPS L5 satellite and remove it from list
result = *it2; result = *it2;
if (pop) if (pop)
{ {
@ -1977,7 +1979,7 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
} }
} }
} }
//fallback: pick the front satellite because there is no tracked satellites in L1 to assist L5 // fallback: pick the front satellite because there is no tracked satellites in L1 to assist L5
if (found_signal == false) if (found_signal == false)
{ {
result = available_GPS_L5_signals_.front(); result = available_GPS_L5_signals_.front();
@ -1996,16 +1998,15 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
available_GAL_1B_signals_.push_back(result); available_GAL_1B_signals_.push_back(result);
} }
is_primary_frequency = true; //indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..) is_primary_frequency = true; // indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..)
break; break;
case evGAL_5X: case evGAL_5X:
if (configuration_->property("Channels_1B.count", 0) > 0) if (configuration_->property("Channels_1B.count", 0) > 0)
{ {
//1. Get the current channel status map // 1. Get the current channel status map
std::map<int, std::shared_ptr<Gnss_Synchro>> current_channels_status = channels_status_->get_current_status_map(); std::map<int, std::shared_ptr<Gnss_Synchro>> current_channels_status = channels_status_->get_current_status_map();
//2. search the currently tracked Galileo E1 satellites and assist the Galileo E5 acquisition if the satellite is not tracked on E5 // 2. search the currently tracked Galileo E1 satellites and assist the Galileo E5 acquisition if the satellite is not tracked on E5
for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = current_channels_status.begin(); it != current_channels_status.end(); ++it) for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = current_channels_status.begin(); it != current_channels_status.end(); ++it)
{ {
if (std::string(it->second->Signal) == "1B") if (std::string(it->second->Signal) == "1B")
@ -2018,8 +2019,8 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
estimated_doppler = it->second->Carrier_Doppler_hz; estimated_doppler = it->second->Carrier_Doppler_hz;
RX_time = it->second->RX_time; RX_time = it->second->RX_time;
//std::cout << " Channel: " << it->first << " => Doppler: " << estimated_doppler << "[Hz] \n"; // std::cout << " Channel: " << it->first << " => Doppler: " << estimated_doppler << "[Hz] \n";
//3. return the Gal 5X satellite and remove it from list // 3. return the Gal 5X satellite and remove it from list
result = *it2; result = *it2;
if (pop) if (pop)
{ {
@ -2032,7 +2033,7 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
} }
} }
} }
//fallback: pick the front satellite because there is no tracked satellites in E1 to assist E5 // fallback: pick the front satellite because there is no tracked satellites in E1 to assist E5
if (found_signal == false) if (found_signal == false)
{ {
result = available_GAL_5X_signals_.front(); result = available_GAL_5X_signals_.front();
@ -2051,7 +2052,7 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
available_GLO_1G_signals_.push_back(result); available_GLO_1G_signals_.push_back(result);
} }
is_primary_frequency = true; //indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..) is_primary_frequency = true; // indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..)
break; break;
case evGLO_2G: case evGLO_2G:
@ -2070,7 +2071,7 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{ {
available_BDS_B1_signals_.push_back(result); available_BDS_B1_signals_.push_back(result);
} }
is_primary_frequency = true; //indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..) is_primary_frequency = true; // indicate that the searched satellite signal belongs to "primary" link (L1, E1, B1, etc..)
break; break;
case evBDS_B3: case evBDS_B3:

View File

@ -124,7 +124,7 @@ bool Glonass_Gnav_Navigation_Message::CRC_test(std::bitset<GLONASS_GNAV_STRING_B
std::vector<uint32_t> string_bits(GLONASS_GNAV_STRING_BITS); std::vector<uint32_t> string_bits(GLONASS_GNAV_STRING_BITS);
// Populate data and hamming code vectors // Populate data and hamming code vectors
for (int32_t i = 0; i < string_bits.size(); i++) for (uint32_t i = 0; i < string_bits.size(); i++)
{ {
string_bits[i] = static_cast<uint32_t>(bits[i]); string_bits[i] = static_cast<uint32_t>(bits[i]);
} }