Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for QZSS and IRNSS time scale #210

Open
ljbade opened this issue Mar 18, 2023 · 2 comments
Open

Add support for QZSS and IRNSS time scale #210

ljbade opened this issue Mar 18, 2023 · 2 comments

Comments

@ljbade
Copy link

ljbade commented Mar 18, 2023

The two time scales from RINEX 4.0 used in https://github.com/gwbres/rinex/ that is not supported by TimeScale is the QZSS and IRNSS System Time. I would like to make a feature request to add it.

The QZSS System Time has the same offset from TAI as the GPS Time Scale, however technically it is its own time scale as they have their own set of master clocks. Per the QZSS ICD https://qzss.go.jp/en/technical/download/pdf/ps-is-qzss/is-qzss-pnt-004.pdf

5.1. Time System
The PNT time system shall is the QZSS time system (QZSST) shown below.
(1) Definitions
(a) Length of 1 second
The length of 1 second in QZSST shall be identical to the International Atomic Time (TAI).
(b) Offset between QZSST and TAI
QZSST shall be delayed from TAI by 19 seconds.
(c) Starting point of week number for QZSST
The starting point of the week number for QZSST shall be the same as the GPS time system
(GPST), which is 0:00 am (UTC) on January 6, 1980.
(2) Navigation message reference time
The parameters relating to time such as the SV clock parameter, mean motion and UTC
parameters shall all be based on QZSST.

The IRNSS System Time has a 13 second offset from UTC. Per the IRNSS ICD https://www.isro.gov.in/media_isro/pdf/Publications/Vispdf/Pdf2017/irnss_sps_icd_version1.1-2017.pdf

5.7 IRNSS SYSTEM TIME
The IRNSS system time is given as 27-bit binary number composed of two parameters as
follows:
The Week Number is an integer counter that gives the sequential week number from the
origin of the IRNSS time. This parameter is coded on 10 bits appearing in the first subframe,
which covers 1024 weeks (about 19 years).
The Time of Week Count (TOWC) indicates the number of 12 second counts at which the
next subframe will begin. It is represented in 17 bits. The TOW count value ranges from 1 to
50400 to cover one entire week. The Time Of Week (TOW) in seconds is obtained by
multiplying TOWC with 12. The TOWC will have a value of 1 at 00:00:00 Sunday
(Changeover from Saturday to Sunday).
The IRNSS System Time start epoch shall be 00:00 UT on Sunday August 22 nd 1999
(midnight between August 21 st and 22 nd ). At the start epoch, IRNSS System Time shall be
ahead of UTC by 13 leap seconds. (i.e. IRNSS time, August 22 nd 1999, 00:00:00 corresponds
to UTC time August 21 st 1999, 23:59:47)
The epoch denoted in the navigation messages by TOWC and WN will be measured relative
to the leading edge of the first chip of the first code sequence of the first subframe symbol.
The transmission timing of the navigation message provided through the TOWC is
synchronized to IRNSS System Time.

@ChristopherRabotin
Copy link
Member

QZSS seems pretty straightforward: it seems like a new variant could be added and every operation on that time system would just use the same path as GPST. Is that correct?

IRNSS time is definitely a bit more complicated, especially for the week calculations.

I'll note that this change will require adding non_exhaustive to the time system enum to prevent future breaking changes for users who match on all variants of the enums. Adding a new enum variant is considered a breaking change because the time scale isn't yet defined as a non_exhaustive.

@ljbade
Copy link
Author

ljbade commented Mar 20, 2023

Yeah QZSS should have some operations as GPST.

Good idea on non_exhaustive as in the future there might be newer GNSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants