JNISpice
version 2.0.0

spice.basic
Class SphericalCoordinates

java.lang.Object
  extended by spice.basic.Coordinates
      extended by spice.basic.SphericalCoordinates

public class SphericalCoordinates
extends Coordinates

Class SphericalCoordinates represents sets of coordinates expressed in the spherical system: positions are specified by radius, colatitude, and longitude.

Longitude increases in the counterclockwise sense about the +Z axis. Colatitude of a point is the angular separation between the +Z axis and the vector from the origin to the point.

Version 1.0.0 28-NOV-2009 (NJB)


Field Summary
 
Fields inherited from class spice.basic.Coordinates
ALTITUDE, COLATITUDE, CYLINDRICAL, DECLINATION, GEODETIC, LATITUDE, LATITUDINAL, LONGITUDE, PLANETOGRAPHIC, RA, RADEC, RADIUS, RANGE, RECTANGULAR, SPHERICAL, X, Y, Z
 
Constructor Summary
SphericalCoordinates()
          No-arguments constructor.
SphericalCoordinates(double radius, double colatitude, double longitude)
          Construct a SphericalCoordinates instance from a radius, colatitude, and longitude.
SphericalCoordinates(SphericalCoordinates coords)
          Copy constructor.
SphericalCoordinates(Vector3 v)
          Construct a SphericalCoordinates instance from a 3-vector.
 
Method Summary
 double getColatitude()
          Return colatitude in radians.
 double getLongitude()
          Return longitude in radians.
 double getRadius()
          Return radius.
static Matrix33 getRecSphJacobian(Vector3 v)
          Return the Jacobian matrix of the rectangular-to-spherical coordinate transformation at the point specified by a 3-vector.
 Matrix33 getSphRecJacobian()
          Return the Jacobian matrix of the spherical-to-rectangular coordinate transformation at the point specified by this instance.
 Vector3 toRectangular()
          Convert this instance to rectangular coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphericalCoordinates

public SphericalCoordinates()
No-arguments constructor.


SphericalCoordinates

public SphericalCoordinates(SphericalCoordinates coords)
Copy constructor.

This method creates a deep copy.


SphericalCoordinates

public SphericalCoordinates(double radius,
                            double colatitude,
                            double longitude)
                     throws SpiceException
Construct a SphericalCoordinates instance from a radius, colatitude, and longitude. Angular units are radians.

Throws:
SpiceException

SphericalCoordinates

public SphericalCoordinates(Vector3 v)
                     throws SpiceException
Construct a SphericalCoordinates instance from a 3-vector.

Throws:
SpiceException
Method Detail

getRadius

public double getRadius()
Return radius.


getLongitude

public double getLongitude()
Return longitude in radians.


getColatitude

public double getColatitude()
Return colatitude in radians.


toRectangular

public Vector3 toRectangular()
                      throws SpiceException
Convert this instance to rectangular coordinates.

Specified by:
toRectangular in class Coordinates
Throws:
SpiceException

getSphRecJacobian

public Matrix33 getSphRecJacobian()
                           throws SpiceException
Return the Jacobian matrix of the spherical-to-rectangular coordinate transformation at the point specified by this instance.

Throws:
SpiceException

getRecSphJacobian

public static Matrix33 getRecSphJacobian(Vector3 v)
                                  throws SpiceException
Return the Jacobian matrix of the rectangular-to-spherical coordinate transformation at the point specified by a 3-vector.

Throws:
SpiceException

JNISpice
version 2.0.0

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