NAME

timeconvert - Display time stamps in a variety of formats

SYNOPSIS

timeconvert -h
timeconvert --systems
timeconvert [-d] [-v] [-A \argarg{TIME}] [-c \argarg{TIME}] [-R \argarg{TIME}] [-o \argarg{TIME}] [-f \argarg{TIME}] [-w \argarg{TIME}] [--z29 \argarg{TIME}] [-Z \argarg{TIME}] [-j \argarg{TIME}] [-m \argarg{TIME}] [-u \argarg{TIME}] [-y \argarg{TIME}] [--src-sys \argarg{ARG}] [--tgt-sys \argarg{ARG}] [--nav \argarg{ARG}] [--input-format \argarg{ARG}] [--input-time \argarg{ARG}] [--offset] [-F \argarg{ARG}] [-a \argarg{NUM}] [-s \argarg{NUM}]

DESCRIPTION

This application allows the user to convert between time formats associated with GNSS. Time formats include, but are not limited to: civilian time, Julian day of year and year, GPS week and seconds of week, Z counts, and Modified Julian Date (MJD).

\dictionary \dicterm{-d, --debug} \dicdef{Increase debug level} \dicterm{-v, --verbose} \dicdef{Increase verbosity} \dicterm{-h, --help} \dicdef{Print help usage} \dicterm{-A, --ansi=\argarg{TIME}} \dicdef{"ANSI-Second"} \dicterm{-c, --civil=\argarg{TIME}} \dicdef{"Month(numeric) DayOfMonth Year Hour:Minute:Second"} \dicterm{-R, --rinex-file=\argarg{TIME}} \dicdef{"Year(2-digit) Month(numeric) DayOfMonth Hour Minute Second"} \dicterm{-o, --ews=\argarg{TIME}} \dicdef{"GPSEpoch 10bitGPSweek SecondOfWeek"} \dicterm{-f, --ws=\argarg{TIME}} \dicdef{"FullGPSWeek SecondOfWeek"} \dicterm{-w, --wz=\argarg{TIME}} \dicdef{"FullGPSWeek Zcount"} \dicterm{--z29=\argarg{TIME}} \dicdef{"29bitZcount"} \dicterm{-Z, --z32=\argarg{TIME}} \dicdef{"32bitZcount"} \dicterm{-j, --julian=\argarg{TIME}} \dicdef{"JulianDate"} \dicterm{-m, --mjd=\argarg{TIME}} \dicdef{"ModifiedJulianDate"} \dicterm{-u, --unixtime=\argarg{TIME}} \dicdef{"UnixSeconds UnixMicroseconds"} \dicterm{-y, --doy=\argarg{TIME}} \dicdef{"Year DayOfYear SecondsOfDay"} \dicterm{--systems} \dicdef{List available time systems} \dicterm{--src-sys=\argarg{ARG}} \dicdef{Source time system when converting between systems} \dicterm{--tgt-sys=\argarg{ARG}} \dicdef{Target time system when converting between systems} \dicterm{--nav=\argarg{ARG}} \dicdef{Where to get the navigation data. Can be RINEX2, RINEX3.} \dicterm{--input-format=\argarg{ARG}} \dicdef{Time format to use on input} \dicterm{--input-time=\argarg{ARG}} \dicdef{Time to be parsed by "input-format" option} \dicterm{--offset} \dicdef{Only display the offset at the reference time} \dicterm{-F, --format=\argarg{ARG}} \dicdef{Time format to use on output} \dicterm{-a, --add-offset=\argarg{NUM}} \dicdef{Add NUM seconds to specified time} \dicterm{-s, --sub-offset=\argarg{NUM}} \dicdef{Subtract NUM seconds from specified time} \enddictionary

EXAMPLES

Get the current system time in UTC.

> timeconvert
Month/Day/Year H:M:S 08/10/2020 17:00:04
Modified Julian Date 59071.708386331
GPSweek DayOfWeek SecOfWeek 70 1 147604.579029
FullGPSweek Zcount 2118 98403
Year DayOfYear SecondOfDay 2020 223 61204.579029
Unix: Second Microsecond 1597078804 579029
Zcount: 29-bit (32-bit) 36798563 (1110540387)

Convert RINEX file time.

> timeconvert -R "85 05 06 13 50 02"
Month/Day/Year H:M:S 05/06/1985 13:50:02
Modified Julian Date 46191.576412037
GPSweek DayOfWeek SecOfWeek 278 1 136202.000000
FullGPSweek Zcount 278 90801
Year DayOfYear SecondOfDay 1985 126 49802.000000
Unix: Second Microsecond 484235402 0
Zcount: 29-bit (32-bit) 145842865 (145842865)

Convert civil time.

> timeconvert -c "5 6 1985 13:50:02"
Month/Day/Year H:M:S 05/06/1985 13:50:02
Modified Julian Date 46191.576412037
GPSweek DayOfWeek SecOfWeek 278 1 136202.000000
FullGPSweek Zcount 278 90801
Year DayOfYear SecondOfDay 1985 126 49802.000000
Unix: Second Microsecond 484235402 0
Zcount: 29-bit (32-bit) 145842865 (145842865)

Output only year, day of year and seconds of day.

> timeconvert -F "%04Y %03j %05.0s"
2020 223 61347

Custom input format.

> timeconvert --input-format="%Y %j %H:%M:%S" --input-time="1985 126 13:50:02"
Month/Day/Year H:M:S 05/06/1985 13:50:02
Modified Julian Date 46191.576412037
GPSweek DayOfWeek SecOfWeek 278 1 136202.000000
FullGPSweek Zcount 278 90801
Year DayOfYear SecondOfDay 1985 126 49802.000000
Unix: Second Microsecond 484235402 0
Zcount: 29-bit (32-bit) 145842865 (145842865)

Display beginning of yesterday.

> timeconvert -s 86400 -F "%4Y %03j 0"
2020 222 0

Convert between time systems.

Show current time in the GPS time system.

> timeconvert --tgt-sys GPS
Month/Day/Year H:M:S 02/10/2021 21:12:34
Modified Julian Date 59255.883732244
GPSweek DayOfWeek SecOfWeek 96 3 335554.465877
FullGPSweek Zcount 2144 223702
Year DayOfYear SecondOfDay 2021 041 76354.465877
Unix: Second Microsecond 1612991554 465877
Zcount: 29-bit (32-bit) 50555350 (1124297174)

Convert GPS time to UTC.

> timeconvert -y "2021 2 0" --tgt-sys UTC
Month/Day/Year H:M:S 01/01/2021 23:59:42
Modified Julian Date 59215.999791667
GPSweek DayOfWeek SecOfWeek 90 5 518382.000000
FullGPSweek Zcount 2138 345588
Year DayOfYear SecondOfDay 2021 001 86382.000000
Unix: Second Microsecond 1609545582 0
Zcount: 29-bit (32-bit) 47531508 (1121273332)

Show the current UTC-GPS offset in seconds.

> timeconvert --offset --tgt-sys GPS
18

Convert GPS time to UTC using RINEX NAV DELTA-UTC headers.

> timeconvert -f "1854 233472" --nav gnsstk-apps/data/test_input_mpsolve.15n --tgt-sys UTC
Month/Day/Year H:M:S 07/21/2015 16:51:29
Modified Julian Date 57224.702418981
GPSweek DayOfWeek SecOfWeek 830 2 233489.000000
FullGPSweek Zcount 1854 155659
Year DayOfYear SecondOfDay 2015 202 60689.000000
Unix: Second Microsecond 1437497489 0
Zcount: 29-bit (32-bit) 435314699 (972185611)

List supported time systems:

> timeconvert --systems
Available Time Systems:
UNK
Any
GPS
GLO
GAL
QZS
BDT
IRN
UTC
TAI
TT
TDB

EXIT STATUS

The following exit values are returned: \dictable \dictentry{0,No errors occurred} \dictentry{1,A C++ exception occurred (typically invalid time format or value)} \enddictable

SEE ALSO

printTime()



gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:43