gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] patch to fix minor problems and and a usage option to leapsec


From: Claus Klein
Subject: [gpsd-dev] patch to fix minor problems and and a usage option to leapsecond.py script
Date: Sun, 17 Feb 2013 20:53:53 +0100

Hi developers,

I have prepared a patch to add a more useful help and verbose option to leapsecond.py
It fix also some wrong comments and minor errors.

claus-kleins-macbook-pro:gpsd clausklein$ ./leapsecond.py -h


Usage: leapsecond.py [-v] { [-h] | [-f filename] | [-g filename] | [-H filename] | [-I isodate] | [-O unixdate] | [-i rfcdate] | [-o unixdate] | [- n MMMYYYY] }

With no option, get the current leap-second value. This is the offset between UTC and GPS time, which changes occasionally due to variations in the Earth's
rotation.

Options:

  -I take a date in ISO8601 format and convert to Unix gmt time

  -O take a date in Unix gmt time and convert to ISO8601.

  -i take a date in RFC822 format and convert to Unix gmt time

  -o take a date in Unix gmt time and convert to RFC822.

  -c generate a C initializer listing leap seconds in Unix time.

  -f fetch USNO data and save to local cache file

  -H make leapsecond include

  -h print this help

  -v be verbose

-g generate a plot of the leap-second trend over time. The command you probably want is "leapsecond.py -g leapseconds.cache | gnuplot - persist".

-n compute Unix gmt time for an IERS leap-second event given as a three-letter
     English Gregorian month abbreviation followed by a 4-digit year.

Public urls and local cache file used:

http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
ftp://maia.usno.navy.mil/ser7/tai-utc.dat
file:///var/run/leapsecond
leapseconds.cache

This file is Copyright (c) 2013 by the GPSD project
BSD terms apply: see the file COPYING in the distribution root for details.


claus-kleins-macbook-pro:gpsd clausklein$

Attachment: leapsecond.py.diff
Description: Binary data





reply via email to

[Prev in Thread] Current Thread [Next in Thread]