Class GNSSDate

java.lang.Object
org.orekit.time.GNSSDate
All Implemented Interfaces:
Serializable, TimeStamped

public class GNSSDate extends Object implements Serializable, TimeStamped
Container for date in GNSS form.

This class can be used to handle GPS, Galileo, BeiDou and QZSS dates.

Author:
Luc Maisonobe (original code), Bryan Cazabonne (generalization to all GNSS constellations)
See Also:
  • Constructor Details

    • 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

      @DefaultDataContext public GNSSDate(int weekNumber, TimeOffset 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:
      13.0
      See Also:
    • 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, TimeOffset 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:
      13.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(int weekNumber, TimeOffset 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:
      13.0
    • GNSSDate

      @DefaultDataContext public GNSSDate(AbsoluteDate date, SatelliteSystem system)
      Build an instance from an absolute date.

      This method uses the default data context.

      Parameters:
      date - absolute date to consider
      system - satellite system to consider
      See Also:
    • 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 Details

    • getSystem

      public SatelliteSystem getSystem()
      Get satellite system.
      Returns:
      satellite system
      Since:
      14.0
    • 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

      public static DateComponents getRolloverReference()
      Get the reference date ensuring continuity across GNSS week rollover.
      Returns:
      reference reference date for GNSS week rollover
      Since:
      9.3.1
      See Also:
    • 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 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
    • getSplitSecondsInWeek

      public TimeOffset getSplitSecondsInWeek()
      Get the number of seconds since week start.
      Returns:
      number of seconds since week start
      Since:
      13.0
    • getDate

      public AbsoluteDate getDate()
      Get the date.
      Specified by:
      getDate in interface TimeStamped
      Returns:
      date attached to the object