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
andQZSS
dates.- Author:
- Luc Maisonobe (original code), Bryan Cazabonne (generalization to all GNSS constellations)
- See Also:
AbsoluteDate
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GNSSDate(int weekNumber, double secondsInWeek, SatelliteSystem system)
Build an instance corresponding to a GNSS date.GNSSDate(int weekNumber, double secondsInWeek, SatelliteSystem system, DateComponents reference, TimeScales timeScales)
Build an instance corresponding to a GNSS date.GNSSDate(int weekNumber, double secondsInWeek, SatelliteSystem system, TimeScales timeScales)
Build an instance corresponding to a GNSS date.GNSSDate(int weekNumber, TimeOffset secondsInWeek, SatelliteSystem system)
Build an instance corresponding to a GNSS date.GNSSDate(int weekNumber, TimeOffset secondsInWeek, SatelliteSystem system, DateComponents reference, TimeScales timeScales)
Build an instance corresponding to a GNSS date.GNSSDate(int weekNumber, TimeOffset secondsInWeek, SatelliteSystem system, TimeScales timeScales)
Build an instance corresponding to a GNSS date.GNSSDate(AbsoluteDate date, SatelliteSystem system)
Build an instance from an absolute date.GNSSDate(AbsoluteDate date, SatelliteSystem system, TimeScales timeScales)
Build an instance from an absolute date.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbsoluteDate
getDate()
Get the date.double
getMilliInWeek()
Get the number of milliseconds since week start.static DateComponents
getRolloverReference()
Get the reference date ensuring continuity across GNSS week rollover.double
getSecondsInWeek()
Get the number of seconds since week start.TimeOffset
getSplitSecondsInWeek()
Get the number of seconds since week start.int
getWeekNumber()
Get the week number since the GNSS reference epoch.static void
setRolloverReference(DateComponents reference)
Set a reference date for ensuring continuity across GNSS week rollover.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.time.TimeStamped
durationFrom
-
-
-
-
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 numbersecondsInWeek
- number of seconds since week startsystem
- satellite system to consider- Since:
- 12.0
- See Also:
GNSSDate(int, double, SatelliteSystem, TimeScales)
-
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 numbersecondsInWeek
- number of seconds since week startsystem
- satellite system to consider- Since:
- 13.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 numbersecondsInWeek
- number of seconds since week startsystem
- satellite system to considertimeScales
- the set of time scales. Used to retrieve the appropriate time scale for the givensystem
.- 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 numbersecondsInWeek
- number of seconds since week startsystem
- satellite system to considertimeScales
- the set of time scales. Used to retrieve the appropriate time scale for the givensystem
.- 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 numbersecondsInWeek
- number of seconds since week startsystem
- satellite system to considerreference
- reference date for rollover, the generated date will be less than one half cycle from this datetimeScales
- the set of time scales. Used to retrieve the appropriate time scale for the givensystem
.- 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 numbersecondsInWeek
- number of seconds since week startsystem
- satellite system to considerreference
- reference date for rollover, the generated date will be less than one half cycle from this datetimeScales
- the set of time scales. Used to retrieve the appropriate time scale for the givensystem
.- 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 considersystem
- satellite system to consider- See Also:
GNSSDate(AbsoluteDate, SatelliteSystem, TimeScales)
-
GNSSDate
public GNSSDate(AbsoluteDate date, SatelliteSystem system, TimeScales timeScales)
Build an instance from an absolute date.- Parameters:
date
- absolute date to considersystem
- satellite system to considertimeScales
- the set of time scales. Used to retrieve the appropriate time scale for the givensystem
.- 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 betweenreference - cycleW / 2 weeks
andreference + 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)
-
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:
setRolloverReference(DateComponents)
,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
-
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 interfaceTimeStamped
- Returns:
- date attached to the object
-
-