# [AstroPy] Convert GPS time to UTC time

Paul Hirst phirst at gemini.edu
Mon Dec 9 15:58:23 EST 2013

```On 9/12/13, 09:48 , "Aldcroft, Thomas" <aldcroft at head.cfa.harvard.edu<mailto:aldcroft at head.cfa.harvard.edu>> wrote:

On Mon, Dec 9, 2013 at 12:22 PM, David Berry <d.berry at jach.hawaii.edu<mailto:d.berry at jach.hawaii.edu>> wrote:
On 9 December 2013 16:57, Aldcroft, Thomas
> This basically creates a Time object with the GPS format representation.  By
> default this object is in TAI scale, so you first convert to UTC and then
> ask for the ISO format representation.  As I understand GPS is not a time
> scale, but a simple difference of time in the TAI scale from the given
> epoch.

Doesn't that make it a timescale? After all TT (Terrestrial Time) is
also just a constant offset from TAI.

This is a good question and one for which I'm definitely interested in input.

>From what I can see there are two ways to view "GPS time":

1.  As a time scale which is behind TAI by 19 seconds.
2.  As a time format which is the floating point number giving the number of TAI seconds since UTC 1980-01-06 00:00:00.  This is roughly similar to the "unix" format or "cxcsec" format.

I would have thought (1) was actually a more appropriate representation. I'm not sure of the formal definition, but I always considered GPS time to be another timescale, which just happens to have a nice and simple transformation to and from TAI - I understand it's by definition just the simple and exact 19.0 second offset.

Depending on the level of accuracy required, I don't think that's true for TT as suggested above, the TT = TAI - 32.184s is an approximation; a more accurate transformation is given at eg ftp://tai.bipm.org/TFG/TT(BIPM)/TTBIPM.12

Now, I'm not suggesting that this is a priority for implementation right now, but in general I'm thinking that having things as separate time scales would make it easier in the future for someone to contribute a more advanced transformation - as opposed to figuring out how to make it a separate timescale first.

Cheers,
Paul.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20131209/730bf5c6/attachment.html>
```