doc(time):Create README for time server setup
[EVA-2020-02.git] / doc / time / README.org
CommitLineData
6bdc2473
SBS
1* Time
2This document was created by Steven Baltakatei Sandoval on
3~2020-07-23T22:27Z~ under a [[https://creativecommons.org/licenses/by-sa/4.0/][Creative Commons BY-SA 4.0 license]]. It
4was updated by Steven Baltakatei Sandoval on ~2020-07-25T19:34Z~
5** Development Task list
6*** Set up prototype unit
7**** Solder wire for PPS signal
8**** Follow guide
9- [[https://ozzmaker.com/forums/topic/connecting-gps-pps-pin/][Ozzmaker post]] on ~PPS~ wiring and a [[https://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html][guide]] recommendation.
10- [[http://www.satsignal.eu/raspberry-pi/Schmidt-RPZ-NTP-2016.pdf][Schmidt article]] on Raspberry Pi Zero time server.
11- [[https://gpsd.gitlab.io/gpsd/gpsd-time-service-howto.html][GPSD dev ref]] page for ~gpsd~ interfacing with ~ntp~.
12*** Document prototype unit
13** Narrative
14The ~ninfacyzga-01~ device is equipped with an Ozzmaker BerryGPS-IMU
15module which provides time and location data to ~gpsd~. The time is
16provided by GPS satellites which themselves are [[https://science.nasa.gov/science-news/science-at-nasa/2002/08apr_atomicclock/][equipped]] with atomic
17clocks. This extremely accurate set of clocks are needed since a GPS
18receiver calculates its position in space using a General Relativity
19calculation that uses the small variations in the time stamps received
20from each satellite. This means that ~gpsd~ may be used to set the
21system clock without a need for an internet connection to a default
22Debian time server; ~ninfacyzga-01~ can be its own time server.
23** Description
24*** Hardware
25Ozzmaker BerryGPS-IMU, Version 3
26*** Software
27This guide describes steps that may be used to convert a Raspberry Pi
28into a time server using ~gpsd~.
29** Operating Procedures
30*** Initial Startup
31**** Install Raspbian 10 (Buster) onto a Raspberry Pi Zero W.
32**** Install Hardware
33See [[https://ozzmaker.com/forums/topic/connecting-gps-pps-pin/][this]] Ozzmaker forum topic about connecting the BerryGPS-IMU
34~T_PULSE~ pin to GPIO 18.
35
36Connect the ~T_PULSE~ connection on the BerryGPS-IMU-3 to GPIO pin 18
37in order to enable ~gpsd~ to read the PPS signal for forwarding to
38~ntp~.
39
40**** Install Software
41Run the following command to install the required packages.
42: $ sudo apt install usbmount eject gpsd gpsd-clients python-gps pps-tools ntp
43
44These instructions assume that ~gpsd~ has already been setup to
45provide NMEA sentences to ~gpspipe~ for location. See the ~README.org~
46in ~doc/location~ for details. Basically, ~gpsd~ needs to be told via
47its ~/etc/default/gpsd~ configuration file of which ~/dev/tty???~ will
48provide the raw GPS module data.
49
50*** Normal Startup
51*** Normal Operation
52*** Normal Shutdown
53*** Unscheduled Shutdown
54
55