Module JNISpice
Package spice.basic

Class SCLKTime


  • public class SCLKTime
    extends Time
    Class SCLKTime represents times measured by spacecraft clocks.

    This class supports conversion between SCLK strings and encoded SCLK; it also supports conversion between encoded SCLK and other Time classes.

    Version 1.0.0 15-DEC-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private SCLK clockID  
      private double ticks  
    • Constructor Summary

      Constructors 
      Constructor Description
      SCLKTime​(SCLK clock, double ticks)
      Construct an SCLKTime from double precision ticks.
      SCLKTime​(SCLK clock, java.lang.String sclkch)
      Construct an SCLKTime from an SCLK string.
      SCLKTime​(SCLK clock, Time time)
      Construct an SCLKTime from a Time.
      SCLKTime​(SCLKTime t)
      Create an SCLK time from another SCLK time.This constructor creates a deep copy.
    • Method Summary

      Modifier and Type Method Description
      SCLKTime add​(Duration d)
      Add a Duration to an SCLKTime instance, producing another SCLKTime.
      double getContinuousTicks()
      Get continuous ticks as a double precision number.
      double getDiscreteTicks()
      Get discrete ticks as a double precision number.
      SCLK getSCLK()
      Get SCLK associated with an SCLKTime.
      java.lang.String getString()
      Convert an SCLKTime to an SCLK string.This method throws SpiceException, unlike toString().
      double getTDBSeconds()
      Convert an SCLKTime to TDB seconds past J2000 TDB.
      SCLKTime sub​(Duration d)
      Subtract a Duration from an SCLKTime instance, producing another SCLKTime.
      SCLKDuration sub​(Time t)
      Subtract a Time instance from a SCLKTime, producing an SCLKDuration.
      java.lang.String toString()
      Convert an SCLKTime to an SCLK string.This method overrides Object's toString().
      • Methods inherited from class java.lang.Object

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

      • clockID

        private SCLK clockID
      • ticks

        private double ticks
    • Constructor Detail

      • SCLKTime

        public SCLKTime​(SCLKTime t)
        Create an SCLK time from another SCLK time.This constructor creates a deep copy.
        Parameters:
        t - SCLKTime
      • SCLKTime

        public SCLKTime​(SCLK clock,
                        java.lang.String sclkch)
                 throws SpiceException
        Construct an SCLKTime from an SCLK string.
        Parameters:
        clock - SCLK
        sclkch - String
        Throws:
        SpiceException - exception
      • SCLKTime

        public SCLKTime​(SCLK clock,
                        Time time)
                 throws SpiceException
        Construct an SCLKTime from a Time.
        Parameters:
        clock - SCLK
        time - Time
        Throws:
        SpiceException - exception
      • SCLKTime

        public SCLKTime​(SCLK clock,
                        double ticks)
                 throws SpiceException
        Construct an SCLKTime from double precision ticks.
        Parameters:
        clock - SCLK
        ticks - double
        Throws:
        SpiceException - exception
    • Method Detail

      • getString

        public java.lang.String getString()
                                   throws SpiceException
        Convert an SCLKTime to an SCLK string.This method throws SpiceException, unlike toString().
        Returns:
        String
        Throws:
        SpiceException - exception
      • toString

        public java.lang.String toString()
        Convert an SCLKTime to an SCLK string.This method overrides Object's toString().
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • getContinuousTicks

        public double getContinuousTicks()
        Get continuous ticks as a double precision number.
        Returns:
        double
      • getDiscreteTicks

        public double getDiscreteTicks()
        Get discrete ticks as a double precision number.
        Returns:
        double