Module JNISpice
Package spice.basic

Class TDTDuration


  • public class TDTDuration
    extends Duration
    Class TDTDuration measures time intervals in units of TDT seconds.

    Version 1.0.0 03-NOV-2009 (NJB)

    • Field Summary

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

      Constructors 
      Constructor Description
      TDTDuration()
      No-arguments constructor.
      TDTDuration​(double seconds)
      Construct a TDTDuration from a double precision count of seconds past J2000 TDT.
      TDTDuration​(Duration d, Time startTime)
      Create a TDTDuration from any Duration subclass and a start Time.
      TDTDuration​(TDTDuration d)
      Copy constructor.
    • Method Summary

      Modifier and Type Method Description
      TDTDuration add​(TDTDuration d)
      Add a TDTDuration to this instance.
      double getMeasure()
      Return the measure of a TDTDuration.Units are TDT seconds.
      double getTDBSeconds​(Time startTime)
      Convert this instance to a count of of TDB seconds, measured relative to a given count of TDB seconds past J2000 TDB.
      TDTDuration negate()
      Negate a TDTDuration.
      TDTDuration scale​(double s)
      Scale a TDTDuration.
      TDTDuration sub​(TDTDuration d)
      Subtract a TDTDuration from this instance.
      private double toTDTSeconds​(double TDBSeconds)
      Convert a count of TDB seconds past J2000 TDB to a count of TDT seconds past J2000 TDT.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • measure

        private double measure
    • Constructor Detail

      • TDTDuration

        public TDTDuration()
        No-arguments constructor.
      • TDTDuration

        public TDTDuration​(double seconds)
        Construct a TDTDuration from a double precision count of seconds past J2000 TDT.
        Parameters:
        seconds -
      • TDTDuration

        public TDTDuration​(TDTDuration d)
        Copy constructor.
        Parameters:
        d -
      • TDTDuration

        public TDTDuration​(Duration d,
                           Time startTime)
                    throws SpiceException
        Create a TDTDuration from any Duration subclass and a start Time.
        Parameters:
        d -
        startTime -
        Throws:
        SpiceException
    • Method Detail

      • getTDBSeconds

        public double getTDBSeconds​(Time startTime)
                             throws SpiceException
        Convert this instance to a count of of TDB seconds, measured relative to a given count of TDB seconds past J2000 TDB.
        Specified by:
        getTDBSeconds in class Duration
        Parameters:
        startTime -
        Returns:
        Throws:
        SpiceException
      • add

        public TDTDuration add​(TDTDuration d)
        Add a TDTDuration to this instance.
        Parameters:
        d -
        Returns:
      • sub

        public TDTDuration sub​(TDTDuration d)
        Subtract a TDTDuration from this instance.
        Parameters:
        d -
        Returns:
      • scale

        public TDTDuration scale​(double s)
        Scale a TDTDuration.
        Specified by:
        scale in class Duration
        Parameters:
        s -
        Returns:
      • toTDTSeconds

        private double toTDTSeconds​(double TDBSeconds)
                             throws SpiceErrorException
        Convert a count of TDB seconds past J2000 TDB to a count of TDT seconds past J2000 TDT.

        This method is needed to avoid circular class definitions: Since TDTTime depends on this class, this class should not refer to TDTTime. Hence the constructors of TDTTime are off-limits.

        Throws:
        SpiceErrorException