Ignore:
Timestamp:
07/06/06 16:10:25 (18 years ago)
Author:
pinsard
Message:

improvements of Interpolation/*.pro header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Interpolation/ll_narcs_distances.pro

    r121 r125  
    33; @file_comments 
    44; This function returns the longitude and latitude [lon, lat] of 
    5 ;a point a given arc distance (-pi <= Arc_Dist <= pi), and azimuth (Az), 
    6 ;from a specified location Lon0, lat0. 
    7 ;       Same as LL_ARC_DISTANCE but for n points without do loop. 
     5; a point a given arc distance (-pi <= Arc_Dist <= pi), and azimuth (Az), 
     6; from a specified location Lon0, lat0. 
     7; Same as LL_ARC_DISTANCE but for n points without do loop. 
     8; 
     9; Formula from Map Projections - a working manual.  USGS paper 
     10; 1395.  Equations (5-5) and (5-6). 
    811; 
    912; @categories Mapping, geography 
    1013; 
    11 ;    @param Lon0 {in}{required}  An array containing the longitude of the starting point. 
    12 ;             Values are assumed to be in radians unless the keyword 
    13 ;             DEGREES is set. 
    14 ;    @param Lat0 {in}{required}  An array containing the latitude of the starting point. 
    15 ;             Values are assumed to be in radians unless the keyword 
    16 ;             DEGREES is set. 
    17 ;    @param Arc_Dist {in}{required}  The arc distance from Lon_lat0. The value must be between 
     14; @param Lon0 {in}{required} 
     15; An array containing the longitude of the starting point. 
     16; Values are assumed to be in radians unless the keyword DEGREES is set. 
     17; 
     18; @param Lat0 {in}{required} 
     19; An array containing the latitude of the starting point. 
     20; Values are assumed to be in radians unless the keyword DEGREES is set. 
     21; 
     22; @param Arc_Dist {in}{required} 
     23; The arc distance from Lon_lat0. The value must be between 
    1824; -!PI and +!PI. To express distances in arc units, divide 
    1925;  by the radius of the globe expressed in the original units. 
    2026;  For example, if the radius of the earth is 6371 km, divide 
    21 ;  the distance in km by 6371 to obtain the arc distance.     
    22 ;    @param Az {in}{required}   The azimuth from Lon_lat0. The value is assumed to be in 
    23 ;  radians unless the keyword DEGREES is set. 
     27;  the distance in km by 6371 to obtain the arc distance. 
    2428; 
    25 ; @keyword    DEGREES  Set this keyword to express all measurements and 
    26 ;  results in degrees. 
     29; @param Az {in}{required} 
     30; The azimuth from Lon_lat0. The value is assumed to be in 
     31; radians unless the keyword DEGREES is set. 
     32; 
     33; @keyword DEGREES 
     34; Set this keyword to express all measurements and results in degrees. 
    2735; 
    2836; @returns 
    29 ; a (2, n) array containing the  
    30 ;       longitude / latitude of the resultings points. Values are in radians 
    31 ;       unless the keyword DEGREES is set. 
     37; a (2, n) array containing the longitude/latitude of the resultings points. 
     38; Values are in radians unless the keyword DEGREES is set. 
    3239; 
    33 ; @file_comments 
    34 ;Formula from Map Projections - a working manual.  USGS paper 
    35 ;1395.  Equations (5-5) and (5-6). 
    36 ; 
    37 ; @examples  
     40; @examples 
    3841; IDL> Lon_lat0 = [1.0, 2.0]; Initial point specified in radians 
    3942; IDL> Arc_Dist = 2.0; Arc distance in radians 
     
    4346;       2.91415    -0.622234 
    4447; 
    45 ;IDL> lon0 = [-10, 20, 100] 
    46 ;IDL> lat0 = [0, -10, 45] 
    47 ;IDL> lon1 = [10, 60, 280] 
    48 ;IDL> lat1 = [0, 10, 45] 
    49 ;IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two) 
    50 ;IDL> earthradius = 6378206.4d0 
    51 ;IDL> res = ll_narcs_distances(lon0, lat0, dist/earthradius, azi, /degrees) 
    52 ;IDL> print, reform(res[0, *]) 
     48; IDL> lon0 = [-10, 20, 100] 
     49; IDL> lat0 = [0, -10, 45] 
     50; IDL> lon1 = [10, 60, 280] 
     51; IDL> lat1 = [0, 10, 45] 
     52; IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two) 
     53; IDL> earthradius = 6378206.4d0 
     54; IDL> res = ll_narcs_distances(lon0, lat0, dist/earthradius, azi, /degrees) 
     55; IDL> print, reform(res[0, *]) 
    5356;       10.000000       60.000000       280.00000 
    54 ;IDL> print, reform(res[1, *]) 
    55 ;          1.1999280e-15       10.000000       45.000000 
     57; IDL> print, reform(res[1, *]) 
     58;           1.1999280e-15       10.000000       45.000000 
    5659; 
    5760; @history 
     
    6265; @version $Id$ 
    6366; 
    64 ;- 
    65  
    66 ;+ 
    67 ; @file_comments Return the [lon, lat] of the point a given arc distance  
    68 ;(-pi <= arc_dist <= pi), 
    69 ; and azimuth (az), from lon_lat0. 
    7067;- 
    7168; 
     
    9491 
    9592  zero = where(arc_dist eq 0, count) 
    96   IF count NE 0 THEN BEGIN  
     93  IF count NE 0 THEN BEGIN 
    9794    lam[zero] = lon0[zero] 
    9895    phi[zero] = lat0[zero] 
    99   ENDIF  
     96  ENDIF 
    10097 
    10198  if keyword_set(degs) then return, transpose([[lam], [phi]]) / s $ 
     
    103100 
    104101end 
    105  
    106  
Note: See TracChangeset for help on using the changeset viewer.