logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

c_css2cd - convert from lat/lon coordinates to Cartesian coordinates.

Access

       To use c_css2cd, load the NCAR Graphics library ngmath.

Description

       n           The number of input lat/lon coordinates.

       rlat        An array containing the latitudes of the input coordinates, in degrees.

       rlon        An array containing the longitudes of the input coordinates, in degrees.

       x           An  array  containing  the  X  component  of  the  Cartesian  coordinates of the output data.
                   (x[i],y[i],z[i])  is  the  Cartesian  coordinate  corresponding  to  the  lat/lon  coordinate
                   (rlat[i],rlon[i]) for i=0 to n-1.

       y           An  array  containing  the  Y  component  of  the  Cartesian  coordinates of the output data.
                   (x[i],y[i],z[i])  is  the  Cartesian  coordinate  corresponding  to  the  lat/lon  coordinate
                   (rlat[i],rlon[i]) for i=0 to n-1.

       z           An  array  containing  the  Z  component  of  the  Cartesian  coordinates of the output data.
                   (x[i],y[i],z[i])  is  the  Cartesian  coordinate  corresponding  to  the  lat/lon  coordinate
                   (rlat[i],rlon[i]) for i=0 to n-1.

Function Prototype

           void   c_css2cd(int, double *, double *, double *, double *, double *);

Name

       c_css2cd - convert from lat/lon coordinates to Cartesian coordinates.

Return Value

       c_css2cd does not return a value.

See Also

       css_overview, c_cssgrid, c_csc2sd.

       Complete documentation for Cssgrid is available at URL
       http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/csshome.html

Synopsis

           c_css2cd(n, rlat, rlon, x, y, z);

Usage

       c_css2cd  is  called  to find the equivalent Cartesian coordinates on a unit sphere to specified latitude
       and longitude coordinates.  The coordinate of 0. latitude and 0.  longitude  is  converted  to  Cartesian
       coordinate  (1.,0.,0.).  Latitudes  and  longitudes  are  assumed to be in degrees.  c_css2cd is a double
       precision version of c_css2c.

See Also