From 30362f5d98760cff5c5a3178f566f923915f394c Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Mon, 12 Feb 2018 12:46:08 +0100 Subject: [PATCH] Minor changes --- src/algorithms/PVT/libs/rtklib_solver.cc | 1 + src/algorithms/libs/rtklib/rtklib_pntpos.cc | 12 ++++++------ .../gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index 897150a87..24bd8f163 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -427,6 +427,7 @@ bool rtklib_solver::get_PVT(const std::map & gnss_observables_ if(result == 0) { + LOG(INFO) << "RTKLIB rtkpos error"; 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/libs/rtklib/rtklib_pntpos.cc b/src/algorithms/libs/rtklib/rtklib_pntpos.cc index 4199dcb96..69f093703 100644 --- a/src/algorithms/libs/rtklib/rtklib_pntpos.cc +++ b/src/algorithms/libs/rtklib/rtklib_pntpos.cc @@ -113,7 +113,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, } /* test snr mask */ - if (iter>0) + if (iter > 0) { if (testsnr(0, i, azel[1], obs->SNR[i] * 0.25, &opt->snrmask)) { @@ -145,16 +145,16 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, if (opt->ionoopt == IONOOPT_IFLC) { /* dual-frequency */ - if (P1 == 0.0 || P2 == 0.0) return 0.0; - if (obs->code[i] == CODE_L1C) P1 += P1_C1; /* C1->P1 */ - if (obs->code[j] == CODE_L2C) P2 += P2_C2; /* C2->P2 */ + if (P1 == 0.0 || P2 == 0.0) { return 0.0; } + if (obs->code[i] == CODE_L1C) { P1 += P1_C1; } /* C1->P1 */ + if (obs->code[j] == CODE_L2C) { P2 += P2_C2; } /* C2->P2 */ /* iono-free combination */ PC = (gamma_ * P1 - P2) / (gamma_ - 1.0); } else { /* single-frequency */ - if((obs->code[i] == CODE_NONE) && (obs->code[j] == CODE_NONE)){return 0.0;} + if((obs->code[i] == CODE_NONE) && (obs->code[j] == CODE_NONE)) { return 0.0; } else if((obs->code[i] != CODE_NONE) && (obs->code[j] == CODE_NONE)) { @@ -174,7 +174,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, PC = (gamma_ * P1 - P2) / (gamma_ - 1.0); } } - if (opt->sateph == EPHOPT_SBAS) PC -= P1_C1; /* sbas clock based C1 */ + if (opt->sateph == EPHOPT_SBAS) { PC -= P1_C1; } /* sbas clock based C1 */ *var = std::pow(ERR_CBIAS, 2.0); diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc index 01b4bed0b..7b1334836 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc @@ -199,7 +199,7 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__( void gps_l2c_telemetry_decoder_cc::set_satellite(const Gnss_Satellite & satellite) { d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); - LOG(INFO) << "GPS L2C CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite; + DLOG(INFO) << "GPS L2C CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite; }