Index: /issm/trunk-jpl/src/m/coordsystems/ll2xy.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/ll2xy.m	(revision 27470)
+++ /issm/trunk-jpl/src/m/coordsystems/ll2xy.m	(revision 27471)
@@ -40,33 +40,18 @@
 end
 
-%Move to CoordTransform now...
-if exist('CoordTransform_matlab')==3
-	disp('Calling CoordTransform instead, make sure to change your MATLAB script');
-	if sgn==+1
-		if delta==45 && slat==70      %BedMachine
-			[x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3413'); return;
-		elseif delta==0 && slat==75   %IBCAO
-			[x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3996'); return;
-		elseif delta==39 && slat==71  %Bamber
-			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';
-			[x y]=CoordTransform(lat,lon,'EPSG:4326',Bamber_proj); return;
-		else
-			error('not supported yet');
-		end
-	else
-		assert(delta==0); assert(slat ==71);
-		[x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3031');
-		return;
-	end
+%Choose ellipsoid
+if 0
+	%Hughes ellipsoid
+	re   = 6378.273*10^3; % Radius of the earth in meters
+	ex2 = .006693883;     % Eccentricity of the Hughes ellipsoid squared
+else
+	%WGS84 ellipsoid
+	re = 6378137;         % Radius of the earth in meters
+	f  = 1./298.257223563;% Earth flattening
+	ex2 = 2*f-f^2         % Eccentricity squared
 end
 
-% Conversion constant from degrees to radians
-cde  = 57.29577951;
-% Radius of the earth in meters
-re   = 6378.273*10^3;
-% Eccentricity of the Hughes ellipsoid squared
-ex2   = .006693883;
-% Eccentricity of the Hughes ellipsoid
-ex    =  sqrt(ex2);
+% Eccentricity 
+ex = sqrt(ex2);
 
 latitude  = abs(lat) * pi/180.;
Index: /issm/trunk-jpl/src/m/coordsystems/xy2ll.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/xy2ll.m	(revision 27470)
+++ /issm/trunk-jpl/src/m/coordsystems/xy2ll.m	(revision 27471)
@@ -36,38 +36,18 @@
 end
 
-%Move to CoordTransform now...
-if exist('CoordTransform_matlab')==3
-	disp('Calling CoordTransform instead, make sure to change your MATLAB script');
-	if sgn==+1
-		if delta==45 && slat==70      %BedMachine
-			[lat lon]=CoordTransform(x, y,'EPSG:3413','EPSG:4326'); return;
-		elseif delta==0 && slat==75   %IBCAO
-			[lat lon]=CoordTransform(x, y,'EPSG:3996','EPSG:4326'); return;
-		elseif delta==39 && slat==71  %Bamber
-			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';
-			[lat lon]=CoordTransform(x, y, Bamber_proj, 'EPSG:4326'); return;
-		else
-			error('not supported yet');
-		end
-	else
-		assert(delta==0); assert(slat ==71);
-		[lat lon]=CoordTransform(x, y,'EPSG:3031','EPSG:4326');
-		return;
-	end
+%Choose ellipsoid
+if 0
+	%Hughes ellipsoid
+	re   = 6378.273*10^3; % Radius of the earth in meters
+	ex2 = .006693883;     % Eccentricity of the Hughes ellipsoid squared
+else
+	%WGS84 ellipsoid
+	re = 6378137;         % Radius of the earth in meters
+	f  = 1./298.257223563;% Earth flattening
+	ex2 = 2*f-f^2         % Eccentricity squared
 end
 
-if nargout~=3 & nargout~=2,
-	help xy2ll
-	error('bad usage');
-end
-
-% Conversion constant from degrees to radians
-cde  = 57.29577951;
-% Radius of the earth in meters
-re   = 6378.273*10^3;
-% Eccentricity of the Hughes ellipsoid squared
-ex2   = .006693883;
-% Eccentricity of the Hughes ellipsoid
-ex    =  sqrt(ex2);
+% Eccentricity 
+ex = sqrt(ex2);
 
 sl  = slat*pi/180.;
