jpl.mipl.diviner.spice.jni
Class SpiceLib

java.lang.Object
  extended by jpl.mipl.diviner.spice.jni.SpiceLib

public class SpiceLib
extends Object

Wrapper for the C language SPICE Toolkit.

Author:
Alice Stanboli

Field Summary
static short ABORT
          a SPICE toolkit error action
static short DEFAULT
          a SPICE toolkit error action
static short IGNORE
          a SPICE toolkit error action
static short REPORT
          a SPICE toolkit error action
static short RETURN
          a SPICE toolkit error action
 
Constructor Summary
SpiceLib()
          Creates new SpiceLib
 
Method Summary
static void bodvar(int Id, String item)
          Return the values of some item for any body in the kernel pool.
static void chkin(String module)
           
static void chkout(String module)
           
static void ckcls()
           
static void ckopn(String fname, String ifname, int ncomch)
           
static void ckw02(BigDecimal begtim, BigDecimal endtim, int inst, String ref, String segid, long nrec, BigDecimal[] start, BigDecimal[] stop, BigDecimal[] quats, BigDecimal[] avvs, BigDecimal[] rates)
           
static BigDecimal dpr()
          Return the number of degrees per radian.
static String erract(String op, int lenout, String list)
           
static String errprt(String op, int lenout, String list)
           
static String et2utc(BigDecimal et, String format, int prec)
          Converts an ephemeris time in double form to an utc time in string form, formated as specified.
static boolean failed()
           
static void furnsh(String file)
           
static void gcpool(String name, int start, int room, int lenout, int n, String[] cvals, int found)
           
static BigDecimal getColat()
           
static int getDim()
           
static BigDecimal getDist()
           
static BigDecimal getLon()
           
static BigDecimal getLt()
           
static void getmsg(String type, int err_size, String err)
           
static BigDecimal[] getPnear()
           
static BigDecimal[] getPTarg()
           
static BigDecimal getR()
           
static String getsms(int len)
           
static BigDecimal[] getValues()
           
static int gipool(String name, int start, int room, int n, int ivals, int found)
           
static BigDecimal halfpi()
          Return the value of halp PI.
static BigDecimal lspcn(String body, BigDecimal et, String abberation)
           
static BigDecimal[] m2q(BigDecimal[][] r)
           
static void main(String[] Args)
           
static BigDecimal[] mxv(BigDecimal[][] m1, BigDecimal[] vin)
           
static void npedln(BigDecimal a, BigDecimal b, BigDecimal c, BigDecimal[] linept, BigDecimal[] linedr)
           
static void nplnpt(BigDecimal[] linpt, BigDecimal[] lindir, BigDecimal[] point)
           
static BigDecimal[] nvp2pl_surfnm_vprjp(BigDecimal[] normal, BigDecimal[] point, BigDecimal a, BigDecimal b, BigDecimal c, BigDecimal[] fixed_point)
           
static BigDecimal pi()
          Return the value of halp PI.
static BigDecimal[][] pxform(String from, String to, BigDecimal et)
           
static void recsph(BigDecimal[] rectan)
           
static void reset()
           
static BigDecimal[][] rotate(BigDecimal angle, int iaxis)
           
static BigDecimal rpd()
           
static String sce2s(int sc, BigDecimal et)
          Converts an ephemeris time in double form to an utc time in string form, formated as specified.
static BigDecimal scencd(int sc, String sclkch)
           
static BigDecimal scs2e(int spacecraftId, String sclkTime)
          Converts a spacecraft clock time to an ephemeris time.
static void setErract(short action)
          Sets the action which the toolkit will take when an error is detected.
static void spkezp(int targ, BigDecimal et, String ref, String abcorr, int obs)
           
static String timout(BigDecimal et, String format)
          Converts an ephemeris time in double form to an ephemeris time in string form, formated as specified.
static void unload(String file)
           
static BigDecimal utc2et(String scet)
          Converts an ephemeris time in double form to an utc time in string form, formated as specified.
static BigDecimal[] vcrss(BigDecimal[] v1, BigDecimal[] v2)
           
static BigDecimal vdot(BigDecimal[] v1, BigDecimal[] v2)
           
static BigDecimal vnorm(BigDecimal[] v1)
           
static BigDecimal vsep(BigDecimal[] v1, BigDecimal[] v2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABORT

public static final short ABORT
a SPICE toolkit error action

See Also:
Constant Field Values

IGNORE

public static final short IGNORE
a SPICE toolkit error action

See Also:
Constant Field Values

REPORT

public static final short REPORT
a SPICE toolkit error action

See Also:
Constant Field Values

RETURN

public static final short RETURN
a SPICE toolkit error action

See Also:
Constant Field Values

DEFAULT

public static final short DEFAULT
a SPICE toolkit error action

See Also:
Constant Field Values
Constructor Detail

SpiceLib

public SpiceLib()
Creates new SpiceLib

Method Detail

setErract

public static void setErract(short action)
Sets the action which the toolkit will take when an error is detected.

Parameters:
action - must be ABORT, IGNORE, REPORT, RETURN, or DEFAULT
Throws:
SpiceException - if an error was detected in the SPICE toolkit

timout

public static String timout(BigDecimal et,
                            String format)
                     throws SpiceException
Converts an ephemeris time in double form to an ephemeris time in string form, formated as specified.

Parameters:
et - the ephemeris time to be converted.
format - the desired format of the output. See the comments in timout_c.c for details about acceptable formats.
Throws:
SpiceException

et2utc

public static String et2utc(BigDecimal et,
                            String format,
                            int prec)
                     throws SpiceException
Converts an ephemeris time in double form to an utc time in string form, formated as specified.

Parameters:
et - the ephemeris time to be converted.
format - the desired format of the output. See the comments in timout_c.c for details about acceptable formats.
prec - Digits of precision in fractional seconds or days.
Throws:
SpiceException

sce2s

public static String sce2s(int sc,
                           BigDecimal et)
                    throws SpiceException
Converts an ephemeris time in double form to an utc time in string form, formated as specified.

Parameters:
sc - NAIF spacecraft clock ID code.
et - the ephemeris time to be converted.
Throws:
SpiceException

utc2et

public static BigDecimal utc2et(String scet)
                         throws SpiceException
Converts an ephemeris time in double form to an utc time in string form, formated as specified.

Parameters:
et - the ephemeris time to be converted.
format - the desired format of the output. See the comments in timout_c.c for details about acceptable formats.
prec - Digits of precision in fractional seconds or days.
Throws:
SpiceException

scs2e

public static BigDecimal scs2e(int spacecraftId,
                               String sclkTime)
                        throws SpiceException
Converts a spacecraft clock time to an ephemeris time.

Parameters:
the - NAIF integer code for the spacecraft
Throws:
SpiceException

bodvar

public static void bodvar(int Id,
                          String item)
                   throws SpiceException
Return the values of some item for any body in the kernel pool.

Parameters:
Id - ID code of body
item - Item for which values are desired. ("RADII", "NUT_PREC_ANGLES", etc. )
Throws:
SpiceException

getValues

public static BigDecimal[] getValues()
                              throws SpiceException
Throws:
SpiceException

getDim

public static int getDim()
                  throws SpiceException
Throws:
SpiceException

dpr

public static BigDecimal dpr()
                      throws SpiceException
Return the number of degrees per radian.

Throws:
SpiceException

getsms

public static String getsms(int len)
                     throws SpiceException
Parameters:
Id - ID code of body
item - Item for which values are desired. ("RADII", "NUT_PREC_ANGLES", etc. )
Throws:
SpiceException

halfpi

public static BigDecimal halfpi()
                         throws SpiceException
Return the value of halp PI.

Throws:
SpiceException

lspcn

public static BigDecimal lspcn(String body,
                               BigDecimal et,
                               String abberation)
                        throws SpiceException
Throws:
SpiceException

mxv

public static BigDecimal[] mxv(BigDecimal[][] m1,
                               BigDecimal[] vin)
                        throws SpiceException
Throws:
SpiceException

npedln

public static void npedln(BigDecimal a,
                          BigDecimal b,
                          BigDecimal c,
                          BigDecimal[] linept,
                          BigDecimal[] linedr)
                   throws SpiceException
Throws:
SpiceException

nplnpt

public static void nplnpt(BigDecimal[] linpt,
                          BigDecimal[] lindir,
                          BigDecimal[] point)
                   throws SpiceException
Throws:
SpiceException

getPnear

public static BigDecimal[] getPnear()
                             throws SpiceException
Throws:
SpiceException

getDist

public static BigDecimal getDist()
                          throws SpiceException
Throws:
SpiceException

nvp2pl_surfnm_vprjp

public static BigDecimal[] nvp2pl_surfnm_vprjp(BigDecimal[] normal,
                                               BigDecimal[] point,
                                               BigDecimal a,
                                               BigDecimal b,
                                               BigDecimal c,
                                               BigDecimal[] fixed_point)
                                        throws SpiceException
Throws:
SpiceException

pi

public static BigDecimal pi()
                     throws SpiceException
Return the value of halp PI.

Throws:
SpiceException

pxform

public static BigDecimal[][] pxform(String from,
                                    String to,
                                    BigDecimal et)
                             throws SpiceException
Throws:
SpiceException

recsph

public static void recsph(BigDecimal[] rectan)
                   throws SpiceException
Throws:
SpiceException

getR

public static BigDecimal getR()
                       throws SpiceException
Throws:
SpiceException

getColat

public static BigDecimal getColat()
                           throws SpiceException
Throws:
SpiceException

getLon

public static BigDecimal getLon()
                         throws SpiceException
Throws:
SpiceException

spkezp

public static void spkezp(int targ,
                          BigDecimal et,
                          String ref,
                          String abcorr,
                          int obs)
                   throws SpiceException
Throws:
SpiceException

getPTarg

public static BigDecimal[] getPTarg()
                             throws SpiceException
Throws:
SpiceException

getLt

public static BigDecimal getLt()
                        throws SpiceException
Throws:
SpiceException

vcrss

public static BigDecimal[] vcrss(BigDecimal[] v1,
                                 BigDecimal[] v2)
                          throws SpiceException
Throws:
SpiceException

vdot

public static BigDecimal vdot(BigDecimal[] v1,
                              BigDecimal[] v2)
                       throws SpiceException
Throws:
SpiceException

vnorm

public static BigDecimal vnorm(BigDecimal[] v1)
                        throws SpiceException
Throws:
SpiceException

vsep

public static BigDecimal vsep(BigDecimal[] v1,
                              BigDecimal[] v2)
                       throws SpiceException
Throws:
SpiceException

furnsh

public static void furnsh(String file)
                   throws SpiceException
Throws:
SpiceException

unload

public static void unload(String file)
                   throws SpiceException
Throws:
SpiceException

getmsg

public static void getmsg(String type,
                          int err_size,
                          String err)
                   throws SpiceException
Throws:
SpiceException

failed

public static boolean failed()
                      throws SpiceException
Throws:
SpiceException

reset

public static void reset()
                  throws SpiceException
Throws:
SpiceException

gipool

public static int gipool(String name,
                         int start,
                         int room,
                         int n,
                         int ivals,
                         int found)
                  throws SpiceException
Throws:
SpiceException

gcpool

public static void gcpool(String name,
                          int start,
                          int room,
                          int lenout,
                          int n,
                          String[] cvals,
                          int found)
                   throws SpiceException
Throws:
SpiceException

chkin

public static void chkin(String module)
                  throws SpiceException
Throws:
SpiceException

chkout

public static void chkout(String module)
                   throws SpiceException
Throws:
SpiceException

errprt

public static String errprt(String op,
                            int lenout,
                            String list)
                     throws SpiceException
Throws:
SpiceException

erract

public static String erract(String op,
                            int lenout,
                            String list)
                     throws SpiceException
Throws:
SpiceException

scencd

public static BigDecimal scencd(int sc,
                                String sclkch)

ckopn

public static void ckopn(String fname,
                         String ifname,
                         int ncomch)

rpd

public static BigDecimal rpd()
                      throws SpiceException
Throws:
SpiceException

rotate

public static BigDecimal[][] rotate(BigDecimal angle,
                                    int iaxis)
                             throws SpiceException
Throws:
SpiceException

m2q

public static BigDecimal[] m2q(BigDecimal[][] r)
                        throws SpiceException
Throws:
SpiceException

ckw02

public static void ckw02(BigDecimal begtim,
                         BigDecimal endtim,
                         int inst,
                         String ref,
                         String segid,
                         long nrec,
                         BigDecimal[] start,
                         BigDecimal[] stop,
                         BigDecimal[] quats,
                         BigDecimal[] avvs,
                         BigDecimal[] rates)
                  throws SpiceException
Throws:
SpiceException

ckcls

public static void ckcls()

main

public static void main(String[] Args)