Changeset 101 for trunk/SRC/Interpolation/ll_narcs_distances.pro
- Timestamp:
- 06/12/06 10:29:56 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/ll_narcs_distances.pro
r59 r101 1 1 ;+ 2 ; NAME:3 ; LL_NARCS_DISTANCES4 2 ; 5 ; PURPOSE:6 ; 7 ; 8 ; 3 ; @file_comments 4 ; 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. 9 7 ; Same as LL_ARC_DISTANCE but for n points without do loop. 10 8 ; 11 ; CATEGORY: 12 ; Mapping, geography. 9 ; @categories Mapping, geography 13 10 ; 14 ; CALLING SEQUENCE:15 ; 11 ; @examples 12 ;Result = LL_NARCS_DISTANCES(Lon, lat0, Arc_Dist, Az) 16 13 ; 17 ; INPUTS: 18 ; Lon0: An array containing the longitude of the starting point. 14 ; @param Lon0 {in}{required} An array containing the longitude of the starting point. 19 15 ; Values are assumed to be in radians unless the keyword 20 16 ; DEGREES is set. 21 ; Lat0:An array containing the latitude of the starting point.17 ; @param Lat0 {in}{required} An array containing the latitude of the starting point. 22 18 ; Values are assumed to be in radians unless the keyword 23 19 ; DEGREES is set. 24 ; Arc_Dist:The arc distance from Lon_lat0. The value must be between25 ; 26 ; 27 ; 28 ; 29 ; Az:The azimuth from Lon_lat0. The value is assumed to be in30 ; 20 ; @param Arc_Dist {in}{required} The arc distance from Lon_lat0. The value must be between 21 ; -!PI and +!PI. To express distances in arc units, divide 22 ; by the radius of the globe expressed in the original units. 23 ; For example, if the radius of the earth is 6371 km, divide 24 ; the distance in km by 6371 to obtain the arc distance. 25 ; @param Az {in}{required} The azimuth from Lon_lat0. The value is assumed to be in 26 ; radians unless the keyword DEGREES is set. 31 27 ; 32 ; KEYWORD PARAMETERS: 33 ; DEGREES: Set this keyword to express all measurements and 34 ; results in degrees. 28 ; @keyword DEGREES Set this keyword to express all measurements and 29 ; results in degrees. 35 30 ; 36 ; OUTPUTS:37 ; This function returnsa (2, n) array containing the31 ; @returns 32 ; a (2, n) array containing the 38 33 ; longitude / latitude of the resultings points. Values are in radians 39 34 ; unless the keyword DEGREES is set. 40 35 ; 41 ; PROCEDURE:42 ; 43 ; 36 ; @file_comments 37 ;Formula from Map Projections - a working manual. USGS paper 38 ;1395. Equations (5-5) and (5-6). 44 39 ; 45 ; EXAMPLE:46 ; Lon_lat0 = [1.0, 2.0] ; Initial point specified in radians47 ; Arc_Dist = 2.0; Arc distance in radians48 ; Az = 1.0; Azimuth in radians49 ; 50 ; 51 ; 40 ; @examples 41 ;Lon_lat0 = [1.0, 2.0]; Initial point specified in radians 42 ;Arc_Dist = 2.0; Arc distance in radians 43 ;Az = 1.0; Azimuth in radians 44 ;Result = LL_ARC_DISTANCE(Lon_lat0, Arc_Dist, Az) 45 ;PRINT, Result 46 ; 2.91415 -0.622234 52 47 ; 53 ; 54 ; 55 ; 56 ; 57 ; 58 ; 59 ; 60 ; 61 ; 62 ; 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, *]) 56 ; 10.000000 60.000000 280.00000 57 ;IDL> print, reform(res[1, *]) 63 58 ; 1.1999280e-15 10.000000 45.000000 64 59 ; 65 ; MODIFICATION HISTORY:60 ; @history 66 61 ; Based on the IDL function ll_arc_distance.pro,v 1.11 2003/02/03 67 ; Sebastien Masson (smasson@lodyc.jussieu.fr)62 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 68 63 ; August 2005 69 64 ;- 70 65 71 ; Return the [lon, lat] of the point a given arc distance 72 ; (-pi <= arc_dist <= pi), 66 ;+ 67 ; @file_comments Return the [lon, lat] of the point a given arc distance 68 ;(-pi <= arc_dist <= pi), 73 69 ; and azimuth (az), from lon_lat0. 70 ;- 74 71 ; 75 72 FUNCTION LL_NARCS_DISTANCES, lon0, lat0, arc_dist, az, DEGREES = degs
Note: See TracChangeset
for help on using the changeset viewer.