CSPICE_DRDSPH computes the Jacobian of the transformation from
spherical to rectangular coordinates.
Given:
r the distance of a point from the origin.
[1,n] = size(r); double = class(r)
colat the angle between the point and the positive zaxis, in radians.
[1,n] = size(colat); double = class(colat)
lon the angle of the point measured from the xz plane in radians.
The angle increases in the counterclockwise sense about
the +z axis.
[1,n] = size(lon); double = class(lon)
the call:
jacobi = cspice_drdsph( r, colat, lon)
returns:
jacobi the matrix of partial derivatives of the conversion between
spherical and rectangular coordinates, evaluated at the input
coordinates. This matrix has the form
If [1,1] = size(r) then [3,3] = size(jacobi)
If [1,n] = size(r) then [3,3,n] = size(jacobi)
double = class(jacobi)
 
 dx/dr dx/dcolat dx/dlon 
 
 dy/dr dy/dcolat dy/dlon 
 
 dz/dr dz/dcolat dz/dlon 
 
evaluated at the input values of r, lon and lat.
Here x, y, and z are given by the familiar formulae
x = r*cos(lon)*sin(colat)
y = r*sin(lon)*sin(colat)
z = r*cos(colat)
None.
It is often convenient to describe the motion of an object in
the spherical coordinate system. However, when performing
vector computations its hard to beat rectangular coordinates.
To transform states given with respect to spherical coordinates
to states with respect to rectangular coordinates, one uses
the Jacobian of the transformation between the two systems.
Given a state in spherical coordinates
( r, colat, lon, dr, dcolat, dlon )
the velocity in rectangular coordinates is given by the matrix
equation:
t  t
(dx, dy, dz) = jacobi * (dr, dcolat, dlon )
(r,colat,lon)
This routine computes the matrix

jacobi
(r,colat,lon)
For important details concerning this module's function, please refer to
the CSPICE routine drdsph_c.
MICE.REQ
Mice Version 1.0.0, 09NOV2012, EDW (JPL), SCK (JPL)
Jacobian of rectangular w.r.t. spherical coordinates
