JNISpice
version 2.0.0

spice.basic
Class TDTTime

java.lang.Object
  extended by spice.basic.Time
      extended by spice.basic.TDTTime

public class TDTTime
extends Time

Class TDTTime implements the representation of time as seconds past J2000 TDT (Terrestrial Dynamical Time).

A TDTTime instance can be converted to any other Time subclass by passing the instance to a constructor of that subclass.

Class TDTTime provides a convenient way to create a Time value from a double precision number representing seconds past J2000 TDT.

Class TDTTime also provides a convenient way to perform arithmetic using TDT time values.

Version 1.0.0 05-DEC-2009 (NJB)


Constructor Summary
TDTTime(double TDTsecondsPastJ2000)
          Construct a TDTTime from a double precision count of seconds past J2000 TDT.
TDTTime(java.lang.String timeString)
          Create a TDTTime instance from a calendar, DOY, or Julian date string accepted by STR2ET.
TDTTime(TDTTime t)
          Copy constructor: create a new TDTTime value from another.
TDTTime(Time t)
          Universal constructor: create a TDTTime from any Time instance.
 
Method Summary
 TDTTime add(Duration d)
          Add a Duration to a TDTTime.
 boolean equals(java.lang.Object obj)
          Test two TDTTimes for equality.
 double getTDBSeconds()
          Express a TDTTime as a count of TDB seconds past J2000 TDB.
 double getTDTSeconds()
          Retrieve seconds past J2000 TDT.
 int hashCode()
          Return hash code for a TDBTime object.
 TDTTime sub(Duration d)
          Subtract a Duration from a TDTTime.
 TDTDuration sub(Time t)
          Subtract a Time instance from this TDTTime, producing a TDTDuration.
 java.lang.String toString()
          Convert a TDTTime to a formatted time string using a default picture.
 java.lang.String toString(java.lang.String picture)
          Convert a TDTTime to a formatted time string using a format picture accepted by TIMOUT.
 java.lang.String toUTCString(java.lang.String format, int precision)
          Convert a TDBTime 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
 

Constructor Detail

TDTTime

public TDTTime(double TDTsecondsPastJ2000)
Construct a TDTTime from a double precision count of seconds past J2000 TDT.


TDTTime

public TDTTime(java.lang.String timeString)
        throws SpiceException
Create a TDTTime instance from a calendar, DOY, or Julian date string accepted by STR2ET.

Throws:
SpiceException

TDTTime

public TDTTime(TDTTime t)
Copy constructor: create a new TDTTime value from another.


TDTTime

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

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

Throws:
SpiceException
Method Detail

getTDTSeconds

public double getTDTSeconds()
Retrieve seconds past J2000 TDT.


sub

public TDTDuration sub(Time t)
                throws SpiceException
Subtract a Time instance from this TDTTime, producing a TDTDuration.

Specified by:
sub in class Time
Throws:
SpiceException

add

public TDTTime add(Duration d)
            throws SpiceException
Add a Duration to a TDTTime.

Specified by:
add in class Time
Throws:
SpiceException

sub

public TDTTime sub(Duration d)
            throws SpiceException
Subtract a Duration from a TDTTime.

Specified by:
sub in class Time
Throws:
SpiceException

equals

public boolean equals(java.lang.Object obj)
Test two TDTTimes for equality.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return hash code for a TDBTime object. This method is overridden to support the overridden equals( Object ) method.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString(java.lang.String picture)
                          throws SpiceException
Convert a TDTTime to a formatted time string using a format picture accepted by TIMOUT.

Throws:
SpiceException

toUTCString

public java.lang.String toUTCString(java.lang.String format,
                                    int precision)
                             throws SpiceException
Convert a TDBTime to a formatted time string using a format code and an integer precision level for fractional seconds.

Throws:
SpiceException

toString

public java.lang.String toString()
Convert a TDTTime 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

getTDBSeconds

public double getTDBSeconds()
                     throws SpiceException
Express a TDTTime as a count of TDB seconds past J2000 TDB.

Specified by:
getTDBSeconds in class Time
Throws:
SpiceException

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)