Module JNISpice
Package spice.basic

Class JEDTime


  • public class JEDTime
    extends Time
    Class JEDime represents times as Julian ephemeris dates.

    Version 1.0.0 22-DEC-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double JED  
    • Constructor Summary

      Constructors 
      Constructor Description
      JEDTime​(double JED)
      Construct a JEDTime from a double precision Julian ephemeris date having units of Julian days.
      JEDTime​(JEDTime t)
      Copy constructor: create a new JEDTime value from another.
      JEDTime​(Time t)
      Universal constructor: create a JEDTime from any Time instance.
    • Method Summary

      Modifier and Type Method Description
      JEDTime add​(Duration d)
      Add a Duration to a JEDTime.
      boolean equals​(java.lang.Object obj)
      Test two JEDTimes for equality.
      double getDays()
      Get the scalar count of days stored in this JED instance.
      double getTDBSeconds()
      Express a JEDTime as a count of TDB seconds past J2000 TDB.
      int hashCode()
      Return hash code for a JEDTime object.This method is overridden to support the overridden equals( Object ) method.
      JEDTime sub​(Duration d)
      Subtract a Duration from a JEDTime.
      JEDDuration sub​(Time t)
      Subtract a Time instance from this JEDTime, producing a JEDDuration.
      java.lang.String toString()
      Convert a JEDTime to a formatted time string using a default picture.Note: this method overrides Object's "toString" method, and as such cannot throw a SpiceErrorException.
      java.lang.String toString​(java.lang.String picture)
      Convert a JEDTime to a formatted time string using a format picture.The format picture may be any supported by the SPICE routine TIMOUT.
      java.lang.String toUTCString​(java.lang.String format, int precision)
      Convert a JEDTime to a formatted time string using a format code and an integer precision level for fractional seconds.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • JED

        private double JED
    • Constructor Detail

      • JEDTime

        public JEDTime​(double JED)
        Construct a JEDTime from a double precision Julian ephemeris date having units of Julian days.

        Note that the input is a primitive type, so no semantic checking is possible. The user must ensure that the input value has the correct reference epoch and time system.

        Parameters:
        JED - double
      • JEDTime

        public JEDTime​(JEDTime t)
        Copy constructor: create a new JEDTime value from another.
        Parameters:
        t - JEDTime
      • JEDTime

        public JEDTime​(Time t)
                throws SpiceException
        Universal constructor: create a JEDTime from any Time instance.

        This constructor performs all supported time conversions that produce a result expressed as seconds past J2000 TDB.

        Parameters:
        t - Time
        Throws:
        SpiceException - exception
    • Method Detail

      • getDays

        public double getDays()
        Get the scalar count of days stored in this JED instance.
        Returns:
        double
      • equals

        public boolean equals​(java.lang.Object obj)
        Test two JEDTimes for equality.
        Overrides:
        equals in class java.lang.Object
        Returns:
        boolean
      • hashCode

        public int hashCode()
        Return hash code for a JEDTime object.This method is overridden to support the overridden equals( Object ) method.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int
      • toString

        public java.lang.String toString​(java.lang.String picture)
                                  throws SpiceErrorException
        Convert a JEDTime to a formatted time string using a format picture.The format picture may be any supported by the SPICE routine TIMOUT.
        Parameters:
        picture - String
        Returns:
        String
        Throws:
        SpiceErrorException - exception
      • toUTCString

        public java.lang.String toUTCString​(java.lang.String format,
                                            int precision)
                                     throws SpiceErrorException
        Convert a JEDTime to a formatted time string using a format code and an integer precision level for fractional seconds.
        Parameters:
        format - String
        precision - int
        Returns:
        String
        Throws:
        SpiceErrorException - exception
      • toString

        public java.lang.String toString()
        Convert a JEDTime to a formatted time string using a default picture.Note: this method overrides Object's "toString" method, and as such cannot throw a SpiceErrorException. Instead, if a conversion error occurs, the associated message is returned.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • getTDBSeconds

        public double getTDBSeconds()
        Express a JEDTime as a count of TDB seconds past J2000 TDB.
        Specified by:
        getTDBSeconds in class Time
        Returns:
        double