From 8bb0c880c032c2a4045058203cf17947d18624b2 Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Wed, 20 Dec 2017 16:12:08 +0100 Subject: [PATCH] Minor changes in DLOG lines --- src/algorithms/PVT/libs/rtklib_solver.cc | 2 +- src/algorithms/channel/libs/channel_fsm.cc | 3 +-- .../channel/libs/channel_msg_receiver_cc.cc | 4 ---- src/core/receiver/gnss_flowgraph.cc | 15 ++++++++------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index 726225998..93685eb24 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -349,7 +349,7 @@ bool rtklib_solver::get_PVT(const std::map & gnss_observables_ result = rtkpos(&rtk_, obs_data, valid_obs, &nav_data); if(result == 0) { - LOG(INFO) << "RTKLIB rtkpos error message: " << rtk_.errbuf; + DLOG(INFO) << "RTKLIB rtkpos error message: " << rtk_.errbuf; this->set_time_offset_s(0.0); //reset rx time estimation this->set_num_valid_observations(0); } diff --git a/src/algorithms/channel/libs/channel_fsm.cc b/src/algorithms/channel/libs/channel_fsm.cc index 44ee7bce5..85905bfd8 100644 --- a/src/algorithms/channel/libs/channel_fsm.cc +++ b/src/algorithms/channel/libs/channel_fsm.cc @@ -115,8 +115,7 @@ public: typedef sc::transition reactions; - channel_waiting_fsm_S3(my_context ctx) : - my_base(ctx) + channel_waiting_fsm_S3(my_context ctx) : my_base(ctx) { //std::cout << "Enter Channel_waiting_S3 " << std::endl; context ().request_satellite(); diff --git a/src/algorithms/channel/libs/channel_msg_receiver_cc.cc b/src/algorithms/channel/libs/channel_msg_receiver_cc.cc index 573c1aa84..d22f2dd73 100644 --- a/src/algorithms/channel/libs/channel_msg_receiver_cc.cc +++ b/src/algorithms/channel/libs/channel_msg_receiver_cc.cc @@ -50,13 +50,9 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg) switch (message) { case 1: //positive acquisition - //DLOG(INFO) << "Channel " << channel_ << " ACQ SUCCESS satellite " << - // gnss_synchro_.System << " " << gnss_synchro_.PRN; d_channel_fsm->Event_valid_acquisition(); break; case 2: //negative acquisition - //DLOG(INFO) << "Channel " << channel_ - // << " ACQ FAILED satellite " << gnss_synchro_.System << " " << gnss_synchro_.PRN; if (d_repeat == true) { d_channel_fsm->Event_failed_acquisition_repeat(); diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index a535c90fd..609908097 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -91,12 +91,6 @@ void GNSSFlowgraph::start() void GNSSFlowgraph::stop() { - // for (unsigned int i = 0; i < channels_count_; i++) - // { - // channels_.at(i)->stop_channel(); - // LOG(INFO) << "Channel " << i << " in state " << channels_state_[i]; - // } - // LOG(INFO) << "Threads finished. Return to main program."; top_block_->stop(); running_ = false; } @@ -373,11 +367,13 @@ bool GNSSFlowgraph::send_telemetry_msg(pmt::pmt_t msg) */ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) { - DLOG(INFO) << "received " << what << " from " << who; + DLOG(INFO) << "Received " << what << " from " << who << ". Number of applied actions = " << applied_actions_; + VLOG(-100) << "Received " << what << " from " << who << ". Number of applied actions = " << applied_actions_; switch (what) { case 0: DLOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal_str(); + VLOG(-100) << "Channel " << who << " ACQ FAILED satellite " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal_str(); available_GNSS_signals_.push_back(channels_.at(who)->get_signal()); //TODO: Optimize the channel and signal matching! while ( channels_.at(who)->get_signal().get_signal_str().compare(available_GNSS_signals_.front().get_signal_str()) != 0 ) @@ -388,11 +384,13 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) channels_.at(who)->set_signal(available_GNSS_signals_.front()); available_GNSS_signals_.pop_front(); DLOG(INFO) << "Channel "<< who << " Starting acquisition " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal_str(); + VLOG(-100) << "Channel "<< who << " Starting acquisition " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal_str(); channels_.at(who)->start_acquisition(); break; case 1: DLOG(INFO) << "Channel " << who << " ACQ SUCCESS satellite " << channels_.at(who)->get_signal().get_satellite(); + VLOG(-100) << "Channel " << who << " ACQ SUCCESS satellite " << channels_.at(who)->get_signal().get_satellite(); channels_state_[who] = 2; acq_channels_count_--; for (unsigned int i = 0; i < channels_count_; i++) @@ -440,6 +438,9 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) case 2: DLOG(INFO) << "Channel " << who << " TRK FAILED satellite " << channels_.at(who)->get_signal().get_satellite(); DLOG(INFO) << "Number of channels in acquisition = " << acq_channels_count_; + VLOG(-100) << "Channel " << who << " TRK FAILED satellite " << channels_.at(who)->get_signal().get_satellite(); + VLOG(-100) << "Number of channels in acquisition = " << acq_channels_count_; + if (acq_channels_count_ < max_acq_channels_) { channels_state_[who] = 1;