From 7a1b8ca643ef2e68b5b01cd924f784bce114df8e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 18 Oct 2018 16:01:19 +0200 Subject: [PATCH 1/3] More consistent naming for generated files --- src/utils/rinex2assist/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/rinex2assist/main.cc b/src/utils/rinex2assist/main.cc index 0ad37ab5e..86243ed7d 100644 --- a/src/utils/rinex2assist/main.cc +++ b/src/utils/rinex2assist/main.cc @@ -281,7 +281,7 @@ int main(int argc, char** argv) if (gps_utc_model.valid) { std::ofstream ofs3; - xml_filename = "gps_UTC.xml"; + xml_filename = "gps_utc.xml"; try { ofs3.open(xml_filename.c_str(), std::ofstream::trunc | std::ofstream::out); From 28d669e5b946c45d0e282a68181a1121340cceba Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 18 Oct 2018 16:14:38 +0200 Subject: [PATCH 2/3] Fix bug in reporting the assistance --- src/core/receiver/control_thread.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 13e81fc35..de3dc893b 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -221,7 +221,7 @@ bool ControlThread::read_assistance_from_XML() gps_eph_iter != supl_client_ephemeris_.gps_ephemeris_map.cend(); gps_eph_iter++) { - std::cout << "From XML file: Read NAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_eph_iter->first) << std::endl; + std::cout << "From XML file: Read NAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << std::endl; std::shared_ptr tmp_obj = std::make_shared(gps_eph_iter->second); flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj)); } @@ -235,7 +235,7 @@ bool ControlThread::read_assistance_from_XML() gal_eph_iter != supl_client_ephemeris_.gal_ephemeris_map.cend(); gal_eph_iter++) { - std::cout << "From XML file: Read ephemeris for satellite " << Gnss_Satellite("Galileo", gal_eph_iter->first) << std::endl; + std::cout << "From XML file: Read ephemeris for satellite " << Gnss_Satellite("Galileo", gal_eph_iter->second.i_satellite_PRN) << std::endl; std::shared_ptr tmp_obj = std::make_shared(gal_eph_iter->second); flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj)); } @@ -249,7 +249,7 @@ bool ControlThread::read_assistance_from_XML() gps_cnav_eph_iter != supl_client_ephemeris_.gps_cnav_ephemeris_map.cend(); gps_cnav_eph_iter++) { - std::cout << "From XML file: Read CNAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_cnav_eph_iter->first) << std::endl; + std::cout << "From XML file: Read CNAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_cnav_eph_iter->second.i_satellite_PRN) << std::endl; std::shared_ptr tmp_obj = std::make_shared(gps_cnav_eph_iter->second); flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj)); } @@ -284,7 +284,7 @@ bool ControlThread::read_assistance_from_XML() { std::shared_ptr tmp_obj = std::make_shared(supl_client_acquisition_.gal_utc); flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj)); - std::cout << "From XML file: Read Galileo iono parameters." << std::endl; + std::cout << "From XML file: Read Galileo UTC parameters." << std::endl; ret = true; } From 4d2f7ef9661fd5dab26e1728fa481448c81064b3 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 19 Oct 2018 10:51:00 +0200 Subject: [PATCH 3/3] Fix computation of velocity in other bands than L1 --- src/algorithms/libs/rtklib/rtklib_pntpos.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib_pntpos.cc b/src/algorithms/libs/rtklib/rtklib_pntpos.cc index 13a94502a..6473b98a0 100644 --- a/src/algorithms/libs/rtklib/rtklib_pntpos.cc +++ b/src/algorithms/libs/rtklib/rtklib_pntpos.cc @@ -739,6 +739,7 @@ int resdop(const obsd_t *obs, int n, const double *rs, const double *dts, { double lam, rate, pos[3], E[9], a[3], e[3], vs[3], cosel; int i, j, nv = 0; + int band = 0; trace(3, "resdop : n=%d\n", n); @@ -747,9 +748,12 @@ int resdop(const obsd_t *obs, int n, const double *rs, const double *dts, for (i = 0; i < n && i < MAXOBS; i++) { - lam = nav->lam[obs[i].sat - 1][0]; + if (obs[i].code[0] != CODE_NONE) band = 0; + if (obs[i].code[1] != CODE_NONE) band = 1; + if (obs[i].code[2] != CODE_NONE) band = 2; + lam = nav->lam[obs[i].sat - 1][band]; - if (obs[i].D[0] == 0.0 || lam == 0.0 || !vsat[i] || norm_rtk(rs + 3 + i * 6, 3) <= 0.0) + if (obs[i].D[band] == 0.0 || lam == 0.0 || !vsat[i] || norm_rtk(rs + 3 + i * 6, 3) <= 0.0) { continue; } @@ -767,7 +771,7 @@ int resdop(const obsd_t *obs, int n, const double *rs, const double *dts, rate = dot(vs, e, 3) + DEFAULT_OMEGA_EARTH_DOT / SPEED_OF_LIGHT * (rs[4 + i * 6] * rr[0] + rs[1 + i * 6] * x[0] - rs[3 + i * 6] * rr[1] - rs[i * 6] * x[1]); /* doppler residual */ - v[nv] = -lam * obs[i].D[0] - (rate + x[3] - SPEED_OF_LIGHT * dts[1 + i * 2]); + v[nv] = -lam * obs[i].D[band] - (rate + x[3] - SPEED_OF_LIGHT * dts[1 + i * 2]); /* design matrix */ for (j = 0; j < 4; j++) H[j + nv * 4] = j < 3 ? -e[j] : 1.0;