Changeset 28013 for issm/trunk/src/m/coordsystems/ll2xy.m
- Timestamp:
- 11/15/23 12:14:04 (16 months ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/coordsystems/ll2xy.m
r27232 r28013 40 40 end 41 41 42 %Move to CoordTransform now... 43 if exist('CoordTransform_matlab')==3 44 disp('Calling CoordTransform instead, make sure to change your MATLAB script'); 45 if sgn==+1 46 if delta==45 && slat==70 %BedMachine 47 [x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3413'); return; 48 elseif delta==0 && slat==75 %IBCAO 49 [x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3996'); return; 50 elseif delta==39 && slat==71 %Bamber 51 Bamber_proj = '+proj=stere +lat_0=90 +lat_ts=71 +lon_0=-39 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'; 52 [x y]=CoordTransform(lat,lon,'EPSG:4326',Bamber_proj); return; 53 else 54 error('not supported yet'); 55 end 56 else 57 assert(delta==0); assert(slat ==71); 58 [x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3031'); 59 return; 60 end 42 %Choose ellipsoid 43 if 0 44 %Hughes ellipsoid 45 re = 6378.273*10^3; % Radius of the earth in meters 46 ex2 = .006693883; % Eccentricity of the Hughes ellipsoid squared 47 else 48 %WGS84 ellipsoid 49 re = 6378137; % Radius of the earth in meters 50 f = 1./298.257223563;% Earth flattening 51 ex2 = 2*f-f^2; % Eccentricity squared 61 52 end 62 53 63 % Conversion constant from degrees to radians 64 cde = 57.29577951; 65 % Radius of the earth in meters 66 re = 6378.273*10^3; 67 % Eccentricity of the Hughes ellipsoid squared 68 ex2 = .006693883; 69 % Eccentricity of the Hughes ellipsoid 70 ex = sqrt(ex2); 54 % Eccentricity 55 ex = sqrt(ex2); 71 56 72 57 latitude = abs(lat) * pi/180.;
Note:
See TracChangeset
for help on using the changeset viewer.