cspice_llgrid_pl02 |
|||

## AbstractDeprecated: This routine has been superseded by the CSPICE routine cspice_latsrf. This routine is supported for purposes of backward compatibility only. CSPICE_LLGRID_PL02, given the planetocentric longitude and latitude values of a set of surface points on a specified target body, compute the corresponding rectangular coordinates of those points. The target body's surface is represented by a triangular plate model contained in a type 2 DSK segment. For important details concerning this module's function, please refer to the CSPICE routine llgrid_pl02. ## I/OGiven: handle the DAS file handle of a DSK file open for read access. This kernel must contain a type 2 segment that provides a plate model representing the entire surface of the target body. dladsc the DLA descriptor of a DSK segment representing the surface of a target body. npoints is the number of longitude/latitude pairs in the array of grid points `grid'. grid an array of planetocentric longitude/latitude pairs to be mapped to surface points on the target body. Elements grid[0,i] grid[1,i] are, respectively, the planetocentric longitude and latitude of the ith grid point. Units are radians. the call: ## ExamplesAny numerical results shown for this example may differ between platforms as the results depend on the SPICE kernels used as input and the machine specific arithmetic implementation. In the following example program, the file phobos.3.3.bds is a DSK file containing a type 2 segment that provides a plate model representation of the surface of Phobos. Find the surface points on a target body corresponding to a given planetocentric longitude/latitude grid. PRO llgrid_pl02_t, dsk ;; ;; Constants ;; NLAT = 9 NLON = 9 MAXGRID = NLAT * NLON TOL = 1.d-12 ;; ;; Open the DSK file for read access. ;; We use the DAS-level interface for ;; this function. ;; cspice_dasopr, dsk, handle ;; ;; Begin a forward search through the ;; kernel, treating the file as a DLA. ;; In this example, it's a very short ;; search. ;; cspice_dlabfs, handle, dladsc, found if ~found then begin ;; ;; We arrive here only if the kernel ;; contains no segments. This is ;; unexpected, but we're prepared for it. ;; message, 'No segments found in DSK file ', dsk endif ;; ;; If we made it this far, DLADSC is the ;; DLA descriptor of the first segment. ;; ;; Now generate the grid points. We generate ;; points along latitude bands, working from ;; north to south. The latitude range is selected ;; to range from +80 to -80 degrees. Longitude ;; ranges from 0 to 320 degrees. The increment ;; is 20 degrees for latitude and 40 degrees for ;; longitude. ;; grid = dblarr(2,MAXGRID) n = 0L for i = 0, (NLAT-1) do begin lat = cspice_rpd() * ( 80.d0 - 20.d0*i ) for j = 0, (NLON-1) do begin lon = cspice_rpd() * 40.d*j grid[0,n] = lon grid[1,n] = lat n = n + 1 endfor endfor npoints = n -1 ;; ;; Find the surface points corresponding to the grid points. ;; ## ParticularsSee the headers of the Icy routines cspice_reclat cspice_latrec for detailed definitions of Planetocentric coordinates. ## Required ReadingICY.REQ DSK.REQ PCK.REQ SPK.REQ TIME.REQ ## Version-Icy Version 1.0.0, 15-DEC-2016, ML (JPL), EDW (JPL) ## Index_Entriesmap latitudinal grid to dsk type 2 plate model surface |

Wed Apr 5 17:58:02 2017