Class GNSSDate

    • Constructor Detail

      • GNSSDate

        @DefaultDataContext
        public GNSSDate​(int weekNumber,
                        double secondsInWeek,
                        SatelliteSystem system)
        Build an instance corresponding to a GNSS date.

        GNSS dates are provided as a week number starting at the GNSS reference epoch and as a number of seconds since week start.

        Many interfaces provide week number modulo the constellation week cycle. In order to cope with this, when the week number is smaller than the week cycle, this constructor assumes a modulo operation has been performed and it will fix the week number according to the reference date set up for handling rollover (see setRolloverReference(reference)). If the week number is equal to the week cycle or larger, it will be used without any correction.

        This method uses the default data context.

        Parameters:
        weekNumber - week number
        secondsInWeek - number of seconds since week start
        system - satellite system to consider
        Since:
        12.0
        See Also:
        GNSSDate(int, double, SatelliteSystem, TimeScales)
      • GNSSDate

        public GNSSDate​(int weekNumber,
                        double secondsInWeek,
                        SatelliteSystem system,
                        TimeScales timeScales)
        Build an instance corresponding to a GNSS date.

        GNSS dates are provided as a week number starting at the GNSS reference epoch and as a number of seconds since week start.

        Many interfaces provide week number modulo the constellation week cycle. In order to cope with this, when the week number is smaller than the week cycle, this constructor assumes a modulo operation has been performed and it will fix the week number according to the reference date set up for handling rollover (see setRolloverReference(reference)). If the week number is equal to the week cycle or larger, it will be used without any correction.

        Parameters:
        weekNumber - week number
        secondsInWeek - number of seconds since week start
        system - satellite system to consider
        timeScales - the set of time scales. Used to retrieve the appropriate time scale for the given system.
        Since:
        12.0
      • GNSSDate

        public GNSSDate​(int weekNumber,
                        double secondsInWeek,
                        SatelliteSystem system,
                        DateComponents reference,
                        TimeScales timeScales)
        Build an instance corresponding to a GNSS date.

        GNSS dates are provided as a week number starting at the GNSS reference epoch and as a number of seconds since week start.

        Parameters:
        weekNumber - week number
        secondsInWeek - number of seconds since week start
        system - satellite system to consider
        reference - reference date for rollover, the generated date will be less than one half cycle from this date
        timeScales - the set of time scales. Used to retrieve the appropriate time scale for the given system.
        Since:
        12.0
      • GNSSDate

        public GNSSDate​(AbsoluteDate date,
                        SatelliteSystem system,
                        TimeScales timeScales)
        Build an instance from an absolute date.
        Parameters:
        date - absolute date to consider
        system - satellite system to consider
        timeScales - the set of time scales. Used to retrieve the appropriate time scale for the given system.
        Since:
        10.1
    • Method Detail

      • setRolloverReference

        public static void setRolloverReference​(DateComponents reference)
        Set a reference date for ensuring continuity across GNSS week rollover.

        Instance created using the GNSSDate(weekNumber, secondsInWeek, system) constructor and with a week number between 0 and the constellation week cycle (cycleW) after this method has been called will fix the week number to ensure they correspond to dates between reference - cycleW / 2 weeks and reference + cycleW / 2 weeks.

        If this method is never called, a default reference date for rollover will be set using the date of the last known EOP entry retrieved from UT1 time scale.

        Parameters:
        reference - reference date for GNSS week rollover
        Since:
        9.3.1
        See Also:
        getRolloverReference(), GNSSDate(int, double, SatelliteSystem)
      • getWeekNumber

        public int getWeekNumber()
        Get the week number since the GNSS reference epoch.

        The week number returned here has been fixed for GNSS week rollover, i.e. it may be larger than the corresponding week cycle of the constellation.

        Returns:
        week number since since the GNSS reference epoch
      • getMilliInWeek

        public double getMilliInWeek()
        Get the number of milliseconds since week start.
        Returns:
        number of milliseconds since week start
      • getSecondsInWeek

        public double getSecondsInWeek()
        Get the number of seconds since week start.
        Returns:
        number of seconds since week start
        Since:
        12.0