From a421d2fc5adb4de1fa28ac1155f9a443f6c3f361 Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Tue, 3 Apr 2018 12:45:03 +0200 Subject: [PATCH] Minor change --- src/algorithms/PVT/libs/rtklib_solver.cc | 7 +++---- src/algorithms/libs/rtklib/rtklib_pntpos.cc | 18 ++++++++++++------ src/core/system_parameters/rtcm.h | 2 -- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index c76ed3260..4dcee81a0 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -241,6 +241,7 @@ bool rtklib_solver::get_PVT(const std::map& gnss_observables_ gps_ephemeris_iter = gps_ephemeris_map.find(gnss_observables_iter->second.PRN); if (gps_ephemeris_iter != gps_ephemeris_map.cend()) { + /* By the moment, GPS L2 observables are not used in pseudorange computations if GPS L1 is available // 2. If found, replace the existing GPS L1 ephemeris with the GPS L2 ephemeris // (more precise!), and attach the L2 observation to the L1 observation in RTKLIB structure for (int i = 0; i < valid_obs; i++) @@ -248,18 +249,17 @@ bool rtklib_solver::get_PVT(const std::map& gnss_observables_ if (eph_data[i].sat == static_cast(gnss_observables_iter->second.PRN)) { eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second); - /* By the moment, GPS L2 observables are not used in pseudorange computations obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs], gnss_observables_iter->second, eph_data[i].week, - 1); //Band 2 (L2) */ + 1); //Band 2 (L2) break; } } + */ } else { - /* By the moment, GPS L2 observables are not used in pseudorange computations // 3. If not found, insert the GPS L2 ephemeris and the observation //convert ephemeris from GNSS-SDR class to RTKLIB structure eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second); @@ -273,7 +273,6 @@ bool rtklib_solver::get_PVT(const std::map& gnss_observables_ gps_cnav_ephemeris_iter->second.i_GPS_week, 1); //Band 2 (L2) valid_obs++; - */ } } else // the ephemeris are not available for this SV diff --git a/src/algorithms/libs/rtklib/rtklib_pntpos.cc b/src/algorithms/libs/rtklib/rtklib_pntpos.cc index 07e7a5c73..31b60c8e6 100644 --- a/src/algorithms/libs/rtklib/rtklib_pntpos.cc +++ b/src/algorithms/libs/rtklib/rtklib_pntpos.cc @@ -191,7 +191,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, } } /* fL1^2 / fL2(orL5)^2 . See IS-GPS-200, p. 103 and Galileo ICD p. 48 */ - if (sys == SYS_GPS or sys == SYS_GAL) + if (sys == SYS_GPS or sys == SYS_GAL or sys == SYS_GLO) { gamma_ = std::pow(lam[j], 2.0) / std::pow(lam[i], 2.0); } @@ -263,9 +263,10 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, PC = P2 + P1_P2 - ISCl5i; } } - else if (sys == SYS_GAL) // Gal. E5a single freq. + else if (sys == SYS_GAL or sys == SYS_GLO) // Gal. E5a single freq. { - //TODO + P2 += P2_C2; /* C2->P2 */ + PC = P2 - gamma_ * P1_P2 / (1.0 - gamma_); } } /* dual-frequency */ @@ -280,12 +281,17 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, } else if (obs->code[j] == CODE_L5X) /* L1 + L5 */ { - //TODO + //By the moment, GPS L5 pseudoranges are not used + //PC = (P2 + ISCl5i - gamma_ * (P1 + ISCl5i)) / (1.0 - gamma_) - P1_P2; + P1 += P1_C1; /* C1->P1 */ + PC = P1 + P1_P2; } } - else if (sys == SYS_GAL) /* E1 + E5a */ + else if (sys == SYS_GAL or sys == SYS_GLO) /* E1 + E5a */ { - //TODO + P1 += P1_C1; + P2 += P2_C2; + PC = (gamma_ * P1 - P2) / (gamma_ - 1.0); } } if (opt->sateph == EPHOPT_SBAS) diff --git a/src/core/system_parameters/rtcm.h b/src/core/system_parameters/rtcm.h index 591659c6f..1a14cc988 100644 --- a/src/core/system_parameters/rtcm.h +++ b/src/core/system_parameters/rtcm.h @@ -671,7 +671,6 @@ private: } else if (!ec and !read_msg_.decode_header()) { - /* TODO: The commented code throws an exception. Solve it! client_says += read_msg_.data(); bool first = true; while (client_says.length() >= 80) @@ -684,7 +683,6 @@ private: std::cout << client_says.substr(0, 80) << std::endl; client_says = client_says.substr(80, client_says.length() - 80); } - */ do_read_message_header(); } else