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(AbsoluteDate date,
SatelliteSystem system,
TimeScales timeScales)
Build an instance from an absolute date.
|
GNSSDate(int weekNumber,
double milliInWeek,
SatelliteSystem system)
Build an instance corresponding to a GNSS date.
|
GNSSDate(int weekNumber,
double milliInWeek,
SatelliteSystem system,
TimeScales timeScales)
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.
|
@DefaultDataContext 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.
This method uses the default data context
.
weekNumber
- week numbermilliInWeek
- number of milliseconds since week startsystem
- satellite system to considerGNSSDate(int, double, SatelliteSystem, TimeScales)
public GNSSDate(int weekNumber, double milliInWeek, SatelliteSystem system, TimeScales timeScales)
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 considertimeScales
- the set of time scales. Used to retrieve the appropriate time
scale for the given system
.@DefaultDataContext public GNSSDate(AbsoluteDate date, SatelliteSystem system)
This method uses the default data context
.
date
- absolute date to considersystem
- satellite system to considerGNSSDate(AbsoluteDate, SatelliteSystem, TimeScales)
public GNSSDate(AbsoluteDate date, SatelliteSystem system, TimeScales timeScales)
date
- absolute date to considersystem
- satellite system to considertimeScales
- the set of time scales. Used to retrieve the appropriate time
scale for the given system
.public 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-2022 CS GROUP. All rights reserved.