Displaying 1 result from an estimated 1 matches for "sph2cart".
2012 Dec 31
2
code to convert 3D geographical coordinates to Cartesian?
Is there packaged code to convert geographical coordinates (e.g.,
longitude, latitude, elevation) to Cartesian coordinates in 3-space?
I can see how to do this using
1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr)
http://cran.r-project.org/web/packages/pracma/
2. a geographical-to-spherical conversion. This seems to involve (in
roughly increasing order of difficulty or error-prone-ness)
* converting longitude (units=?) to an azimuthal angle (units=rad)
* converting latitude (units=?) to a polar...