From d487e4ce2cb59115d372f8c98c7546f14c8ce88f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 1 Oct 2023 09:03:14 +0200 Subject: [PATCH] Update changelog, fix formatting defects and typos --- docs/CHANGELOG.md | 10 ++++++++-- docs/protobuf/monitor_pvt.proto | 6 +++--- src/core/receiver/control_thread.cc | 15 +++++++-------- src/core/receiver/control_thread.h | 5 +---- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0d97548fc..c56d240b6 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,8 +16,11 @@ All notable changes to GNSS-SDR will be documented in this file. ### Improvements in Interoperability: -- A new field `utc_time` (a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) - datetime string) with the Time solution has been added to `monitor_pvt.proto`. +- New fields have been added to the custom output stream defined by + `monitor_pvt.proto`: `utc_time` (a + [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) datetime string), velocity + in the local ENU frame (`vel_e`, `vel_n`, and `vel_u`), in m/s, and the course + over ground, `cog`, in degrees. ### Improvements in Repeatability: @@ -42,6 +45,9 @@ All notable changes to GNSS-SDR will be documented in this file. - Fix bug in the custom binary output (`PVT.enable_monitor=true`) output rate. Before this fix, it was outputting data every 20 ms, instead of observing the `PVT.output_rate_ms` setting. +- Now the program exits properly if a SIGINT signal is received (_e.g._, the + user pressing Ctrl+C, or another user application sending an interruption + signal). ## [GNSS-SDR v0.0.18](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.18) - 2023-04-06 diff --git a/docs/protobuf/monitor_pvt.proto b/docs/protobuf/monitor_pvt.proto index cfd855607..f5037ce99 100644 --- a/docs/protobuf/monitor_pvt.proto +++ b/docs/protobuf/monitor_pvt.proto @@ -44,9 +44,9 @@ double vdop = 28; // Vertical Dilution of Precision double user_clk_drift_ppm = 29; // User clock drift [ppm] string utc_time = 30; // PVT UTC time (rfc 3339 datetime string) -double vel_e = 31; // Velocity East component in Local frame, in m/s -double vel_n = 32; // Velocity Nord component in Local frame, in m/s -double vel_u = 33; // Velocity Up component in Local frame, in m/s +double vel_e = 31; // Velocity East component in the local frame, in m/s +double vel_n = 32; // Velocity North component in the local frame, in m/s +double vel_u = 33; // Velocity Up component in the local frame, in m/s double cog = 34; // Course Over Ground (cog) [deg] } diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 1816e4d38..371fb1776 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -55,6 +55,7 @@ #include // for find, min #include // for milliseconds #include // for floor, fmod, log +#include // for signal, SIGINT #include // for time_t, gmtime, strftime #include // for exception #include // for operator<< @@ -78,7 +79,7 @@ namespace wht = std; extern Concurrent_Map global_gps_acq_assist_map; extern Concurrent_Queue global_gps_acq_assist_queue; -ControlThread* ControlThread::me=nullptr; +ControlThread *ControlThread::me = nullptr; /** @@ -99,23 +100,21 @@ void ControlThread::handle_signal(int sig) } else if (sig == SIGHUP) { - - std::cout << "Debug: received SIGHUP signal\n"; - //std::cout << "Debug: reloading daemon config file ...\n"; - //todo + std::cout << "Debug: received SIGHUP signal\n"; + // std::cout << "Debug: reloading daemon config file ...\n"; + // todo } else if (sig == SIGCHLD) { std::cout << "Debug: received SIGCHLD signal\n"; - //todo + // todo } } ControlThread::ControlThread() { - - ControlThread::me=this; + ControlThread::me = this; /* the class will handle two signals */ signal(SIGINT, ControlThread::handle_signal); diff --git a/src/core/receiver/control_thread.h b/src/core/receiver/control_thread.h index 37fca1421..217ad28bb 100644 --- a/src/core/receiver/control_thread.h +++ b/src/core/receiver/control_thread.h @@ -37,7 +37,6 @@ #include // for std::type_info, typeid #include // for pair #include // for vector -#include #ifdef ENABLE_FPGA #include // for boost::thread @@ -65,8 +64,7 @@ class Gnss_Satellite; class ControlThread { public: - - static ControlThread* me; + static ControlThread *me; /*! * \brief Default constructor */ @@ -126,7 +124,6 @@ public: } private: - static void handle_signal(int sig); void init();