]> zdv.bktei.com Git - EVA-2020-02.git/commitdiff
Merge remote-tracking branch 'gl/develop' into develop develop
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 14 Mar 2023 20:03:38 +0000 (20:03 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 14 Mar 2023 20:03:38 +0000 (20:03 +0000)
TODO.org
doc/time/README.org

index 66e8e63ed2d403675251907088edda6618092f16..f9e8f369604e992dcd3222214550b49b7f58f61a 100644 (file)
--- a/TODO.org
+++ b/TODO.org
@@ -55,6 +55,16 @@ Setting up time tracking via ~chrony~.
 ** TODO Use ~age --version~ in creating ~VERSION~ output files
 ~age~ as of ~beta7~ outputs its version using the ~--version~ option.
 
+** TODO Create scripts to store current sensor values in ~/dev/shm/~ dir
+Date Created: 2021-01-25T00:36Z
+
+Create or adjust executables so they write latest sensor values to
+~/dev/shm~ so other scripts can read values from them for other
+purposes (i.e. periodically reading and piping into ~bklog~).
+
+Ideally, the scripts should output sensor data in ~jsonline~ formatted
+to use an appropriate ontology (i.e. [[https://www.w3.org/TR/vocab-ssn/#iphone_barometer-sosa][SOSA]]). 
+
 ** TODO Prevent ~systemd~ from removing ~/dev/shm~ user files
 *** 2021-10-31T21:53Z
 ~systemd~ may be automatically removing ~/dev/shm/ninfacyzga~ and
index 5351973dd06e28f25bd5a5cc8d724cbab4d313ec..b3a05e9d22d9e2c00ee3eefd99a9d02f4890e908 100644 (file)
@@ -1,19 +1,21 @@
+* Ninfacyzga-1 Time Tracking
 #+TITLE: Ninfacyzga-1 Time Tracking
 #+AUTHOR: Steven Baltakatei Sandoval
 #+EMAIL: baltakatei@gmail.com
-* Time Tracking
+#+DATE: 2023-03-14
+
 ** About
 This document was created by Steven Baltakatei Sandoval on
-~2020-07-23T22:27Z~ under a [[https://creativecommons.org/licenses/by-sa/4.0/][Creative Commons BY-SA 4.0 license]]. It was
-updated by Steven Baltakatei Sandoval on ~2020-10-18T00:11Z~
+~2020-07-23T22:27+00~ under a [[https://creativecommons.org/licenses/by-sa/4.0/][Creative Commons BY-SA 4.0 license]]. It
+was updated by Steven Baltakatei Sandoval on ~2023-03-14T19:47+00~.
 
 ** Narrative
 The ~ninfacyzga-01~ device is equipped with an Ozzmaker BerryGPS-IMU
-module which provides time and location data to ~gpsd~ and ~chrony~. The
-time is provided by GPS satellites which themselves are
+module which provides time and location data to ~gpsd~ and
+~chrony~. The time is provided by GPS satellites which themselves are
 equipped [fn:nasa_20020408_atomicclock] with atomic clocks. This
-extremely accurate set of clocks are needed since a GPS receiver
-calculates its position in space using a General Relativity
+extremely accurate set of clocks is needed since a GPS receiver
+determines its position in space using a [[https://en.wikipedia.org/wiki/Error_analysis_for_the_Global_Positioning_System#Special_and_general_relativity][General Relativity]]
 calculation that uses the small variations in the time stamps received
 from each satellite. This means that ~gpsd~ may be used to set the
 system clock without a need for an internet connection to a default
@@ -46,6 +48,7 @@ Ozzmaker BerryGPS-IMU, Version 3 (see [[https://ozzmaker.com/berrygps-berrygps-i
 *** Initial Startup
 **** Perform initial setup.
 See [[file:../setup/README.org][Main Setup]] procedure.
+
 **** Install Hardware for time tracking
 See [[https://ozzmaker.com/forums/topic/connecting-gps-pps-pin/][this]] Ozzmaker forum topic about connecting the BerryGPS-IMU
 ~T_PULSE~ pin to GPIO 18.
@@ -283,6 +286,61 @@ nohz=off
 
 [fn:se_20180320_raspicpugov] Title:[[https://raspberrypi.stackexchange.com/questions/9034/how-to-change-the-default-governor]["How to change the default governor?"]]; Author:[[https://raspberrypi.stackexchange.com/users/5538/goldilocks][goldilocks]]; Date: 2018-03-20; Website:stackexchange.com;
 
+***** Configure another machine to use the time server
+A separate Debian machine may be configured to use the ~ninfacyzga-1~
+device as a GPS time server. This may be performed by:
+
+1. Installing ~chrony~ onto the separate machine (e.g. hostname
+   ~somedeb~):
+
+#+begin_example
+somedeb:$ sudo apt update && sudo apt upgrade
+somedeb:$ sudo apt install chrony
+#+end_example
+
+2. Modifying the ~chrony.conf~ file:
+
+  : somedeb:$ emacs /etc/chrony/chrony.conf
+
+  - Add the following lines to the end of this configuration file,
+    substituting ~ninfacyzga-1-x~ with the hostname or IP address
+    chosen for the ~ninfacyzga-1~ device:
+
+#+begin_example
+# Use ninfacyzga-1-x if available
+server ninfacyzga-1-x iburst prefer minpoll 2 maxpoll 4
+#+end_example
+
+3. Restart the ~chrony~ service.
+
+  : somedeb:$ sudo systemctl restart chrony
+
+4. Verify that ~ninfacyzga-1-x~ is being used by ~chrony~ 
+
+#+begin_example
+somedeb:$ chronyc sources
+MS Name/IP address         Stratum Poll Reach LastRx Last sample               
+===============================================================================
+^? pugot.canonical.com           2   6   377    11  -2172us[-2209us] +/-  115ms
+^? prod-ntp-5.ntp4.ps5.cano>     2   6   377     9  -4169us[-4206us] +/-   88ms
+^? prod-ntp-4.ntp1.ps5.cano>     2   6   377    10  -2758us[-2795us] +/-   88ms
+^? prod-ntp-3.ntp1.ps5.cano>     2   6   377     5  -6473us[-6510us] +/-   87ms
+^? mail.novg.net                 2   6   377    11  -6099us[-6136us] +/-  125ms
+^? ntp1a.versadns.com            1   6   377     6  -2006us[-2043us] +/-   40ms
+^? 2602:fde5:2a::12              1   6   377    11  -2200us[-2237us] +/-   49ms
+^? 2001:da8:9000::130            1   6   377    15  -2372us[-2409us] +/-  102ms
+^* ninfacyzga-1-x.lan            2   4   377    14  -1686us[-1724us] +/- 2971us
+^- brazil.time.system76.com      2   6   377    17  -4738us[-4775us] +/-  103ms
+^- ohio.time.system76.com        2   6   377    15   +320us[ +283us] +/-   58ms
+^- oregon.time.system76.com      2   6   377    19  -5845us[-5882us] +/-   30ms
+^- paris.time.system76.com       2   6   377    19  -4531us[-4568us] +/-   92ms
+^- virginia.time.system76.c>     2   6   377    15  -6607us[-6644us] +/-   51ms
+#+end_example
+
+  The ~*~ in the ~^*~ symbol at the start of the line containing
+  ~ninfacyzga-1-x~ indicates that ~ninfacyzga-1-x~ is being used to
+  set the system clock of ~somedeb~.
+
 *** Normal Startup
 *** Normal Operation
 *** Normal Shutdown