John's Vademecum

Try to learn something about everything, and everything about something -Thomas Huxley “Darwin's bulldog” (1824-1895)

User Tools

Site Tools


public:watches:watchcheck

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:watches:watchcheck [04/05/22 10:27 BST] gm4slvpublic:watches:watchcheck [06/03/25 06:49 GMT] (current) – external edit 127.0.0.1
Line 12: Line 12:
 directory. the data from each measurement is stored in a **json** file in the same directory. directory. the data from each measurement is stored in a **json** file in the same directory.
  
- +++++ watchcheck.py | 
-<code python>+<file python watchcheck.py>
 #! /usr/bin/env python #! /usr/bin/env python
  
Line 210: Line 210:
  
 menu() menu()
-</code>+</file>
  
 +++++
  
 Running it for the first time, with no previous records stored, looks like this: Running it for the first time, with no previous records stored, looks like this:
Line 242: Line 243:
 </code> </code>
  
-I'll update this once I've done a second measurementin a day or so....+Running it againafter only 10 minutes looks like this:
  
 +<code>
 +Command > : n
 +New
 +Current Time = 10:30
 +Watch time 10:30
 +30
 +Press enter when seconds = 0
  
-There's also a small utility prog. that reads the ''error_list.json'' file to calculate and+2022/05/04 10:30:30 
 + 
 +Delta -30.2 seconds 
 +First record time  2022/05/04 10:19:30 
 +First record delta  -30.1799800396 
 + 
 +Previous record time  2022/05/04 10:19:30 
 +Previous record delta  -30.1799800396 
 + 
 +Latest record time  2022/05/04 10:30:30 
 +Latest record delta  -30.1998269558 
 + 
 +Overall elapsed time  0:11:00 
 +Latest elapsed time  0:11:00 
 + 
 +Latest delta change  -0.0198469161987 
 +Latest elapsed time 660 seconds 
 + 
 +Daily PPM : -30.071 
 +Daily rate error: -2.6 s/d 
 + 
 +Total Time 660 seconds 
 +Total error  -0.0198469161987 
 +Total PPM : -30.071 
 +Total rate error: -2.6 s/d 
 + 
 +======================================================== 
 + Delta : -30.2 s | Rate : -2.6 s/d | Average : -2.6 s/d 
 +======================================================== 
 +</code> 
 + 
 +The ''error_list.json'' file now looks like: 
 + 
 +<code> 
 +[["2022/05/04 10:19:30", -30.179980039596558], ["2022/05/04 10:30:30", -30.199826955795288]] 
 +</code> 
 + 
 + 
 +There's also a small utility called ''watchstat.py'' that reads the ''error_list.json'' file to calculate and
 display the data display the data
  
-<code python>+++++ watchstat.py | 
 + 
 +<file python watchstat.py>
 #! /usr/bin/env python #! /usr/bin/env python
  
Line 353: Line 401:
  
 watch_stat() watch_stat()
 +</file>
 +
 +++++
 +
 +Running watchstat.py on the newly updated ''error_list.json'' 
 +
 +<code>
 +gm4slv@laptop:~/watchcheck_damasko $ python watchstat.py
 +First record time  2022/05/04 10:19:30
 +First record delta  -30.1799800396
 +
 +Previous record time  2022/05/04 10:19:30
 +Previous record delta  -30.1799800396
 +
 +Latest record time  2022/05/04 10:30:30
 +Latest record delta  -30.1998269558
 +
 +Overall elapsed time  0:11:00
 +Latest elapsed time  0:11:00
 +
 +Latest delta change  -0.0198469161987
 +Latest elapsed time 660 seconds
 +
 +Daily PPM : -30.071
 +Daily rate error: -2.6 s/d
 +
 +Total Time 660 seconds
 +Total error  -0.0198469161987
 +Total PPM : -30.071
 +Total rate error: -2.6 s/d
 +
 +========================================================
 + Delta : -30.2 s | Rate : -2.6 s/d | Average : -2.6 s/d
 +========================================================
 </code> </code>
  
 +''watchcheck.py'' also creates a log file on each run.
 +
 +<code>
 +04/05/2022 09:30:30     -30.2           -2.6            -2.6
 +</code>
 +
 +The fields are "date time", current error, error in seconds per day since last record, average error in seconds per day since the start.
 +
 +This mimics the behaviour of the Android Watchcheck app
 +
 +{{:public:watches:screenshot_20220504-104043.png?direct&400|}}
  
  //[[gm4slv@gm4slv.plus.com|John Pumford-Green]] Wed May  4 09:09:09 2022//  //[[gm4slv@gm4slv.plus.com|John Pumford-Green]] Wed May  4 09:09:09 2022//
public/watches/watchcheck.1651656432.txt.gz · Last modified: 06/03/25 06:49 GMT (external edit)