JNISpice
version 2.0.0

spice.basic
Class SCLKTime

java.lang.Object
  extended by spice.basic.Time
      extended by spice.basic.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)


Constructor Summary
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(SCLKTime t)
          Create an SCLK time from another SCLK time.
SCLKTime(SCLK clock, Time time)
          Construct an SCLKTime from a Time.
 
Method Summary
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SCLKTime

public SCLKTime(SCLKTime t)
Create an SCLK time from another SCLK time. This constructor creates a deep copy.


SCLKTime

public SCLKTime(SCLK clock,
                java.lang.String sclkch)
         throws SpiceException
Construct an SCLKTime from an SCLK string.

Throws:
SpiceException

SCLKTime

public SCLKTime(SCLK clock,
                Time time)
         throws SpiceException
Construct an SCLKTime from a Time.

Throws:
SpiceException

SCLKTime

public SCLKTime(SCLK clock,
                double ticks)
         throws SpiceException
Construct an SCLKTime from double precision ticks.

Throws:
SpiceException
Method Detail

getSCLK

public SCLK getSCLK()
             throws SpiceException
Get SCLK associated with an SCLKTime.

Throws:
SpiceException

getTDBSeconds

public double getTDBSeconds()
                     throws SpiceException
Convert an SCLKTime to TDB seconds past J2000 TDB.

Specified by:
getTDBSeconds in class Time
Throws:
SpiceException

getString

public java.lang.String getString()
                           throws SpiceException
Convert an SCLKTime to an SCLK string. This method throws SpiceException, unlike toString().

Throws:
SpiceException

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

getContinuousTicks

public double getContinuousTicks()
Get continuous ticks as a double precision number.


getDiscreteTicks

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


sub

public SCLKDuration sub(Time t)
                 throws SpiceException
Subtract a Time instance from a SCLKTime, producing an SCLKDuration.

Specified by:
sub in class Time
Throws:
SpiceException

add

public SCLKTime add(Duration d)
             throws SpiceException
Add a Duration to an SCLKTime instance, producing another SCLKTime.

Specified by:
add in class Time
Throws:
SpiceException

sub

public SCLKTime sub(Duration d)
             throws SpiceException
Subtract a Duration from an SCLKTime instance, producing another SCLKTime.

Specified by:
sub in class Time
Throws:
SpiceException

JNISpice
version 2.0.0

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