Changeset 22339 for issm/trunk-jpl/src/m/coordsystems/xy2ll.m
- Timestamp:
- 01/05/18 14:45:40 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/coordsystems/xy2ll.m
r21041 r22339 1 function [lat,lon ] = xy2ll(x,y,sgn,central_meridian,standard_parallel)1 function [lat,lon,scale_factor] = xy2ll(x,y,sgn,central_meridian,standard_parallel) 2 2 %XY2LL - converts xy to lat long 3 3 % … … 5 5 % latitude and longitude Stereographic (X,Y) coordinates for the polar 6 6 % regions. 7 % Optional scale factor provides the scaling factor needed to correct projection error 8 % in areas and volumes 7 9 % Author: Michael P. Schodlok, December 2003 (map2xy.m) 8 10 % 9 11 % Usage: 10 12 % [lat,lon] = xy2ll(x,y,sgn); 13 % [lat,lon,scale_factor] = xy2ll(x,y,sgn); 11 14 % [lat,lon] = xy2ll(x,y,sgn,central_meridian,standard_parallel); 12 15 % … … 29 32 end 30 33 else 34 help xy2ll 35 error('bad usage'); 36 end 37 38 if nargout~=3 & nargout~=2, 31 39 help xy2ll 32 40 error('bad usage'); … … 71 79 lat = lat * 180. / pi; 72 80 lon = lon - delta; 81 if nargout==3, 82 m=((1+sin(abs(slat)*pi/180))*ones(length(lat),1)./(1+sin(abs(lat)*pi/180))); 83 scale_factor=(1./m).^2; 84 end
Note:
See TracChangeset
for help on using the changeset viewer.