Converting GPS Time to calendar date

3,800 views
Skip to first unread message

Darlene Wilcox

unread,
Dec 20, 2011, 2:05:18 PM12/20/11
to The LAS room - a friendly place to discuss specifications of the LAS format
How do I convert a GPS time to a regular date? I was under the
understanding that GPS time started 1/6/1980 and is measured in
seconds, but I've got some numbers like:

426752.253067
and
434466.994541

If I divide those numbers by (60*60) to get days, that comes out to be
118.54... for the first one. This would be May 3, 1980? I'm actually
expecting something around 2007-2009.

So, how does one read the GPS time?

Sorry if my question is naive -- I nibble at the fringes of LiDAR
data, and only occassionally at that.

Thanks,
Darlene

Konstantin Lisitsyn

unread,
Dec 20, 2011, 3:14:26 PM12/20/11
to las...@googlegroups.com
Hello Darlene,

those appear to be GPS Seconds of Week. A week starts at midnight between Saturday and Sunday. So the following procedure should is used to get the time:
(I hope formatting won't be lost when posting)

426752.253067 =MOD(A1,86400) =MOD(B1,3600) =MOD(C1,60) =MOD(D1,60)
=(A1-B1)/86400 =(B1-C1)/3600 =(C1-D1)/60 =E1

426752.2531 81152.25307 1952.253 32.25307 32.25307
4 22 32 32.25307

That's Wednesday, 22:32:32.25307.

--
Konstantin

In order to get the absolute time, not just the relative within the week, the knowledge of the week number since 1980 is necessary.


--
You are subscribed to the LAS room - a friendly place to discuss the specifications of the LAS format. This is a public forum for those who want LAS to succeed as an open standard. Here you can go on record with bug reports, suggestions, and concerns about the current and proposed specifications.

Visit this group at http://groups.google.com/group/lasroom
Post to this group with an email to las...@googlegroups.com
Unsubscribe by email to lasroom+u...@googlegroups.com

Darlene Easson

unread,
Dec 21, 2011, 8:04:23 AM12/21/11
to las...@googlegroups.com
Oh, and a second question (I did say I'm not a regular user of LiDAR data!) -- isn't 10:32 at night an unusual time to be flying LiDAR?  Thanks, Darlene

On Wed, Dec 21, 2011 at 7:02 AM, Darlene Easson <dwea...@gmail.com> wrote:
Konstantin,
Thank you -- I thought that might be the answer, but that leaves the obvious question -- Wednesday of WHAT WEEK?  I ferreted about and know we're at week 1667, so I'm guessing that the number I'm looking for would be around 1500-1550 -- 2.5 years ago, give or take.  I'm not seeing anything like that in the header info?  Anything you can offer....  Thanks, Darlene

Konstantin Lisitsyn

unread,
Dec 21, 2011, 6:34:13 PM12/21/11
to las...@googlegroups.com
Darlene,

GPS time equals UTC time plus leap seconds (see  http://leapsecond.com/java/gpsclock.htm). So 10:32pm UTC is 2:32pm Pacific Standard Time.

As of the the week number - I'm afraid that normally week isn't stored in the header of LAS fiels, although it could be present in some  vendor specific custom header field. On another hand, some organizations encode week since GPS time inception or year and day of year in the file name:
- WWWWD, e.g. 16670 - Sunday of week 1667, or 15506 - Saturday of week 1550
- YYDDD, e.g. 09101 - day 101 of year 2009
You may try looking for this patterns in your files' names.

Antonio

unread,
Dec 22, 2011, 8:49:46 AM12/22/11
to The LAS room - a friendly place to discuss specifications of the LAS format
No, it is not so odd flying lidar at night. As it is an active sensor
you don't need the sun shining. When you have to flight over a crowded
airport or with low tide it is usual doing it at night.

Regards,

Antonio

On Dec 21, 2:04 pm, Darlene Easson <dweas...@gmail.com> wrote:
> Oh, and a second question (I did say I'm not a regular user of LiDAR data!)
> -- isn't 10:32 at night an unusual time to be flying LiDAR?  Thanks, Darlene
>
>
>
> On Wed, Dec 21, 2011 at 7:02 AM, Darlene Easson <dweas...@gmail.com> wrote:
> > Konstantin,
> > Thank you -- I thought that might be the answer, but that leaves the
> > obvious question -- Wednesday of WHAT WEEK?  I ferreted about and know
> > we're at week 1667, so I'm guessing that the number I'm looking for would
> > be around 1500-1550 -- 2.5 years ago, give or take.  I'm not seeing
> > anything like that in the header info?  Anything you can offer....  Thanks,
> > Darlene
>
> >  On Tue, Dec 20, 2011 at 2:14 PM, Konstantin Lisitsyn <
> > konstantin.lisit...@gmail.com> wrote:
>
> >> Hello Darlene,
>
> >> those appear to be GPS Seconds of Week. A week starts at midnight between
> >> Saturday and Sunday. So the following procedure should is used to get the
> >> time:
> >> (I hope formatting won't be lost when posting)
>
> >>    426752.253067 =MOD(A1,86400) =MOD(B1,3600) =MOD(C1,60) =MOD(D1,60)
> >> =(A1-B1)/86400 =(B1-C1)/3600 =(C1-D1)/60 =E1
> >>     426752.2531 81152.25307 1952.253 32.25307 32.25307  4 22 32 32.25307
> >> That's Wednesday, 22:32:32.25307.
>
> >> --
> >> Konstantin
>
> >> In order to get the absolute time, not just the relative within the week,
> >> the knowledge of the week number since 1980 is necessary.
>
> >> On Tue, Dec 20, 2011 at 11:05 AM, Darlene Wilcox <dweas...@gmail.com>wrote:
>
> >>> How do I convert a GPS time to a regular date?  I was under the
> >>> understanding that GPS time started 1/6/1980 and is measured in
> >>> seconds, but I've got some numbers like:
>
> >>> 426752.253067
> >>> and
> >>> 434466.994541
>
> >>> If I divide those numbers by (60*60) to get days, that comes out to be
> >>> 118.54... for the first one.  This would be May 3, 1980?  I'm actually
> >>> expecting something around 2007-2009.
>
> >>> So, how does one read the GPS time?
>
> >>> Sorry if my question is naive -- I nibble at the fringes of LiDAR
> >>> data, and only occassionally at that.
>
> >>> Thanks,
> >>> Darlene
>
> >>> --
> >>> You are subscribed to the LAS room - a friendly place to discuss the
> >>> specifications of the LAS format. This is a public forum for those who want
> >>> LAS to succeed as an open standard. Here you can go on record with bug
> >>> reports, suggestions, and concerns about the current and proposed
> >>> specifications.
>
> >>> Visit this group athttp://groups.google.com/group/lasroom
> >>> Post to this group with an email to las...@googlegroups.com
> >>> Unsubscribe by email to lasroom+u...@googlegroups.com
>
> >>  --
> >> You are subscribed to the LAS room - a friendly place to discuss the
> >> specifications of the LAS format. This is a public forum for those who want
> >> LAS to succeed as an open standard. Here you can go on record with bug
> >> reports, suggestions, and concerns about the current and proposed
> >> specifications.
>
> >> Visit this group athttp://groups.google.com/group/lasroom
> >> Post to this group with an email to las...@googlegroups.com
> >> Unsubscribe by email to lasroom+u...@googlegroups.com- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages