Index Page
drdcyl_c
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   void drdcyl_c ( SpiceDouble    r,
                   SpiceDouble    lon,
                   SpiceDouble    z,
                   SpiceDouble    jacobi[3][3] ) 

Abstract

 
   This routine computes the Jacobian of the transformation from 
   cylindrical to rectangular coordinates. 
 

Required_Reading

 
   None. 
 

Keywords

 
   COORDINATES 
   DERIVATIVES 
   MATRIX 
 

Brief_I/O

 
   Variable  I/O  Description 
   --------  ---  -------------------------------------------------- 
   r          I   Distance of a point from the origin. 
   lon        I   Angle of the point from the xz plane in radians. 
   z          I   Height of the point above the xy plane. 
   jacobi     O   Matrix of partial derivatives. 
 

Detailed_Input

 
   r          Distance of the point of interest from z axis. 
 
   lon        Cylindrical angle (in radians) of the point of 
              interest from xz plane.  The angle increases in the  
              counterclockwise sense about the +z axis. 
 
   z          Height of the point above xy plane. 
 

Detailed_Output

 
   jacobi     is the matrix of partial derivatives of the conversion 
              between cylindrical and rectangular coordinates.  It 
              has the form 
 
                 .-                               -. 
                 |  dx/dr     dx/dlon     dx/dz    | 
                 |                                 | 
                 |  dy/dr     dy/dlon     dy/dz    | 
                 |                                 | 
                 |  dz/dr     dz/dlon     dz/dz    | 
                 `-                               -' 
 
              evaluated at the input values of r, lon and z. 
              Here x,y, and z are given by the familiar formulae 
 
                 x = r*cos(lon) 
                 y = r*sin(lon) 
                 z = z 
 

Parameters

 
   None. 
 

Exceptions

 
   Error free. 
 

Files

 
   None. 
 

Particulars

 
   It is often convenient to describe the motion of an object in 
   the cylindrical coordinate system.  However, when performing 
   vector computations its hard to beat rectangular coordinates. 
 
   To transform states given with respect to cylindrical coordinates 
   to states with respect to rectangular coordinates, one uses 
   the Jacobian of the transformation between the two systems. 
 
   Given a state in cylindrical coordinates 
 
      ( r, lon, z, dr, dlon, dz ) 
 
   the velocity in rectangular coordinates is given by the matrix 
   equation: 
                  t          |                          t 
      (dx, dy, dz)   = jacobi|          * (dr, dlon, dz) 
                             |(r,lon,z) 
 
   This routine computes the matrix  
 
            | 
      jacobi| 
            |(r,lon,z) 
 

Examples

 
   Suppose that one has a model that gives radius, longitude and 
   height as a function of time (r(t), lon(t), z(t)) for 
   which the derivatives ( dr/dt, dlon/dt, dz/dt ) are computable. 
 
   To find the corresponing velocity in bodyfixed rectangular 
   coordinates, one simply multiplies the Jacobian of the 
   transformation from cylindrical to rectangular coordinates  
   (evaluated at r(t), lon(t), z(t) ) by the vector of derivatives  
   of the cylindrical coordinates. 
 
   In code this looks like: 
 
      #include "SpiceUsr.h"
            .
            .
            .
      /.
      Load the derivatives of r, lon, and z into the 
      cylindrical velocity vector sphv. 
      ./
      cylv[0] = dr_dt   ( t );
      cylv[1] = dlon_dt ( t );
      cylv[2] = dz_dt   ( t );
 
      /.
      Determine the Jacobian of the transformation from 
      cylindrical to rectangular at the coordinates at the 
      given cylindrical coordinates at time t. 
      ./
      drdcyl_c ( r(t), lon(t), z(t), jacobi );
 
      /.
      Multiply the Jacobian on the left by the cylindrical 
      velocity to obtain the rectangular velocity recv. 
      ./
      mxv_c ( jacobi, cylv, recv );
 

Restrictions

 
   None. 
 

Literature_References

 
   None. 
 

Author_and_Institution

 
   W.L. Taber     (JPL) 
   I.M. Underwood (JPL) 
   N.J. Bachman   (JPL)
 

Version

 
   -CSPICE Version 1.0.0, 19-JUL-2001 (WLT) (IMU) (NJB)

Index_Entries

 
   Jacobian of rectangular w.r.t. cylindrical coordinates 
 

Link to routine drdcyl_c source file drdcyl_c.c

Wed Apr  5 17:54:32 2017