- java.lang.Object
-
- spice.basic.Time
-
- spice.basic.SCLKTime
-
-
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().
-
-
-
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
- SCLKsclkch
- String- Throws:
SpiceException
- exception
-
SCLKTime
public SCLKTime(SCLK clock, Time time) throws SpiceException
Construct an SCLKTime from a Time.- Parameters:
clock
- SCLKtime
- Time- Throws:
SpiceException
- exception
-
SCLKTime
public SCLKTime(SCLK clock, double ticks) throws SpiceException
Construct an SCLKTime from double precision ticks.- Parameters:
clock
- SCLKticks
- double- Throws:
SpiceException
- exception
-
-
Method Detail
-
getSCLK
public SCLK getSCLK() throws SpiceException
Get SCLK associated with an SCLKTime.- Returns:
- SCLK
- Throws:
SpiceException
- exception
-
getTDBSeconds
public double getTDBSeconds() throws SpiceException
Convert an SCLKTime to TDB seconds past J2000 TDB.- Specified by:
getTDBSeconds
in classTime
- Returns:
- double
- Throws:
SpiceException
- exception
-
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 classjava.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
-
sub
public SCLKDuration sub(Time t) throws SpiceException
Subtract a Time instance from a SCLKTime, producing an SCLKDuration.- Specified by:
sub
in classTime
- Parameters:
t
- Time- Returns:
- SCLKDuration
- Throws:
SpiceException
- exception
-
add
public SCLKTime add(Duration d) throws SpiceException
Add a Duration to an SCLKTime instance, producing another SCLKTime.- Specified by:
add
in classTime
- Parameters:
d
- Duration- Returns:
- SCLKTime
- Throws:
SpiceException
- exception
-
sub
public SCLKTime sub(Duration d) throws SpiceException
Subtract a Duration from an SCLKTime instance, producing another SCLKTime.- Specified by:
sub
in classTime
- Parameters:
d
- Duration- Returns:
- SCLKTime
- Throws:
SpiceException
- exception
-
-