Module JNISpice
Package spice.basic

Class 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 Detail

      • colatitude

        private double colatitude
      • longitude

        private double longitude
      • radius

        private double radius
    • 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 - double
        longitude - double
        colatitude - 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
      • 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