No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Date Conversion Utility GUI

4.0 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 37.5 KB File ID: #15615 Version: 1.0
image thumbnail

Date Conversion Utility GUI



17 Jul 2007 (Updated )

A GUI utility to compute calendar date, GPS time, Julian day, and day of the week

| Watch this File

File Information

This GUI will allow you to quickly and easily compute the GPS time and week number (modulo 1024) of a given (Gregorian) calendar date. It will also allow you to do the reverse operation of computing the calendar date, given the GPS time.

Both calculations will display the Julian day and the day of the week.

The screen shot shows the results of computing GPS time at the GPS birth date (midnight of January 5, 1980)

Generated on Windows platform, not sure if compatible other OS.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
05 Nov 2013 Chad Webb

The algorithms are self-contained functions and easily extracted from the GUI code. As for the GPS/UTC times - leap seconds are the primary difference between the two. Granted, UTC seconds are typically expressed as seconds into the current DAY, and GPS time is usually expressed as seconds into the current WEEK. They still represent the same quantity, just offset by leap seconds. Unfortunately, leap seconds occur irregularly, and are unpredictable. Thus, while it may be helpful to have an algorithm for specifying the historical values of leap seconds, one that predicts when they occur in the future is not available to my knowledge. Thus, it would need to be an input parameter of some sort.

Comment only
08 May 2012 Kevin Bartlett

Kevin Bartlett (view profile)

The time-conversion routines for GPS time look really useful, but I need to call them from within other programs, not via a GUI.

Have you considered creating a utc2gps() function that would take a Matlab-format time and convert it to GPS time? A gps2utc() companion function could convert back the other way. (files of these names already exist on FileExchange, but the author hard-coded leap seconds rather than using an algorithm, so it would have to be updated as years go by).

I would write this code myself, but

(a) I don't want to steal your thunder; and

(b) I'd rather somebody else did the work for me!

Comment only
22 Sep 2011 Shien Kwun Leong

How does quant() work?

Comment only
10 Aug 2008 kaspar g

The function quant(.,.) is missing...

01 Aug 2007 Gregor Pfyffer

Easy to use

18 Jul 2007

Julian date calculation was off by 0.5 days, even though GPS time and day of week calculations were "adjusted" accordingly.

15 Aug 2007

When computing calendar date from GPS time, needed to add 0.5 days to the calculation to obtain the correct result

Contact us