>  Docs Center  >  Libraries  >  Buie  >  RECSPH
Libraries

RECSPH

RECSPH

Name


  recsph

Purpose (one Line Only)


  Convert from rectangular to spherical coordinates

Description


Category


  Mathematical

Calling Sequence


  recsph,x,y,z,r,lat,lon

Inputs


  x - Cartesian x-coordinate (same units as r).
  y - Cartesian y-coordinate (same units as r).
  z - Cartesian z-coordinate (same units as r).

Optional Input Parameters


Keyword Input Parameters


Outputs


  r - distance from origin
  lat - angular distance from x-y plane (radians)
  lon - longitude (angle from x axis) in radians

Keyword Output Parameters


Common Blocks


Side Effects


Restrictions


  rank and size of all inputs must match or be scalar.

Procedure


Modification History


  2011/11/29, Written by Marc W. Buie, Southwest Research Institute
                converted from sphrec.f
  2014/09/19, MWB, added prival call on lon to reduce to [0,2pi)



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us