pyacs.lib.gpstime.gpsFromUTC
- pyacs.lib.gpstime.gpsFromUTC(year, month, day, hour, minute, ssec, leapSecs=30)[source]
Convert UTC to GPS week, seconds of week, GPS day, seconds of day.
- Parameters:
year (int) – UTC date/time components.
month (int) – UTC date/time components.
day (int) – UTC date/time components.
hour (int) – UTC date/time components.
minute (int) – UTC date/time components.
ssec (float) – Seconds (and fraction).
leapSecs (int, optional) – Leap seconds (GPS - UTC). Default is 30; update as leap seconds change.
- Returns:
(gpsWeek, secsOfWeek, gpsDay, secsOfDay).
- Return type:
tuple
Notes
GPS time is seconds since 1980-01-06 00:00:00. Week starts Saturday midnight. See http://www.oc.nps.navy.mil/~jclynch/timsys.html. Python uses integer seconds; fractional seconds in ssec are preserved in the return value.