Package org.orekit.time
Class GPSDate
- java.lang.Object
-
- org.orekit.time.GPSDate
-
- All Implemented Interfaces:
Serializable,TimeStamped
public class GPSDate extends Object implements Serializable, TimeStamped
Container for date in GPS form.- Since:
- 9.3
- Author:
- Luc Maisonobe
- See Also:
AbsoluteDate, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GPSDate(int weekNumber, double milliInWeek)Build an instance corresponding to a GPS date.GPSDate(AbsoluteDate date)Build an instance from an absolute date.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbsoluteDategetDate()Get the date.doublegetMilliInWeek()Get the number of milliseconds since week start.intgetWeekNumber()Get the week number sinceGPS epoch.
-
-
-
Constructor Detail
-
GPSDate
public GPSDate(int weekNumber, double milliInWeek)Build an instance corresponding to a GPS date.GPS dates are provided as a week number starting at
GPS epochand as a number of milliseconds since week start.- Parameters:
weekNumber- week number sinceGPS epochmilliInWeek- number of milliseconds since week start
-
GPSDate
public GPSDate(AbsoluteDate date)
Build an instance from an absolute date.- Parameters:
date- absolute date to consider
-
-
Method Detail
-
getWeekNumber
public int getWeekNumber()
Get the week number sinceGPS epoch.- Returns:
- week number since
GPS epoch
-
getMilliInWeek
public double getMilliInWeek()
Get the number of milliseconds since week start.- Returns:
- number of milliseconds since week start
-
getDate
public AbsoluteDate getDate()
Get the date.- Specified by:
getDatein interfaceTimeStamped- Returns:
- date attached to the object
-
-