Skip to content

Commit

Permalink
[lib/ocaml] update leap_seconds
Browse files Browse the repository at this point in the history
most recent leap second was inserted on June 30, 2012 at 23:59:60 UTC
So since the gps epoch 1980 we have 16 leap seconds.
  • Loading branch information
flixr committed Oct 5, 2013
1 parent 491a85f commit 0b12024
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sw/lib/ocaml/latlong.ml
Expand Up @@ -469,9 +469,16 @@ let bearing = fun geo1 geo2 ->
((Rad>>Deg)(atan2 dx dy), sqrt(dx*.dx+.dy*.dy))


let leap_seconds = 15 (* http://www.leapsecond.com/java/gpsclock.htm *)
(** Offset between GPS and UTC times in seconds.
* Update when a new leap second is inserted and be careful about times in the
* past when this offset was different.
* Last leap second was inserted on June 30, 2012 at 23:59:60 UTC
* http://www.leapsecond.com/java/gpsclock.htm
*)
let leap_seconds = 16

let gps_epoch = 315964800. (* In seconds, in the unix reference *)
(** Unix timestamp of the GPS epoch 1980-01-06 00:00:00 UTC *)
let gps_epoch = 315964800.

let gps_tow_of_utc = fun ?wday hour min sec ->
let wday =
Expand Down

0 comments on commit 0b12024

Please sign in to comment.