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.
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.
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).