- java.lang.Object
-
- spice.basic.Coordinates
-
- 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 Modifier and Type Field Description private double
colatitude
private double
longitude
private double
radius
-
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
Constructors Constructor Description SphericalCoordinates()
No-arguments constructor.SphericalCoordinates(double radius, double colatitude, double longitude)
Construct a SphericalCoordinates instance from a radius, colatitude, and longitude.Angular units are radians.SphericalCoordinates(SphericalCoordinates coords)
Copy constructor.SphericalCoordinates(Vector3 v)
Construct a SphericalCoordinates instance from a 3-vector.
-
Method Summary
Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
SphericalCoordinates
public SphericalCoordinates()
No-arguments constructor.
-
SphericalCoordinates
public SphericalCoordinates(SphericalCoordinates coords)
Copy constructor.This method creates a deep copy.
- Parameters:
coords
- SphericalCoordinates
-
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.- Parameters:
radius
- doublelongitude
- doublecolatitude
- double- Throws:
SpiceException
- exception
-
SphericalCoordinates
public SphericalCoordinates(Vector3 v) throws SpiceException
Construct a SphericalCoordinates instance from a 3-vector.- Parameters:
v
- Vector3- Throws:
SpiceException
- exception
-
-
Method Detail
-
getRadius
public double getRadius()
Return radius.- Returns:
- double
-
getLongitude
public double getLongitude()
Return longitude in radians.- Returns:
- double
-
getColatitude
public double getColatitude()
Return colatitude in radians.- Returns:
- double
-
toRectangular
public Vector3 toRectangular() throws SpiceException
Convert this instance to rectangular coordinates.- Specified by:
toRectangular
in classCoordinates
- Returns:
- Vector3
- Throws:
SpiceException
- exception
-
getSphRecJacobian
public Matrix33 getSphRecJacobian() throws SpiceException
Return the Jacobian matrix of the spherical-to-rectangular coordinate transformation at the point specified by this instance.- Returns:
- Matrix33
- Throws:
SpiceException
- exception
-
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.- Parameters:
v
- Vector3- Returns:
- Matrix33
- Throws:
SpiceException
- exception
-
-