public class GNSSDate extends Object implements Serializable, TimeStamped
This class can be used to handle GPS
,
Galileo
, BeiDou
and QZSS
dates.
AbsoluteDate
,
Serialized FormConstructor and Description |
---|
GNSSDate(AbsoluteDate date,
SatelliteSystem system)
Build an instance from an absolute date.
|
GNSSDate(int weekNumber,
double milliInWeek,
SatelliteSystem system)
Build an instance corresponding to a GNSS date.
|
Modifier and Type | Method and 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.
|
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.
|
public GNSSDate(int weekNumber, double milliInWeek, SatelliteSystem system)
GNSS dates are provided as a week number starting at the GNSS reference epoch and as a number of milliseconds 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.
weekNumber
- week numbermilliInWeek
- number of milliseconds since week startsystem
- satellite system to considerpublic GNSSDate(AbsoluteDate date, SatelliteSystem system)
date
- absolute date to considersystem
- satellite system to considerpublic static void setRolloverReference(DateComponents reference)
Instance created using the GNSSDate(weekNumber, milliInWeek, 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.
reference
- reference date for GNSS week rollovergetRolloverReference()
,
GNSSDate(int, double, SatelliteSystem)
public static DateComponents getRolloverReference()
setRolloverReference(DateComponents)
,
GNSSDate(int, double, SatelliteSystem)
public int getWeekNumber()
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.
public double getMilliInWeek()
public AbsoluteDate getDate()
getDate
in interface TimeStamped
Copyright © 2002-2019 CS Systèmes d'information. All rights reserved.