Index: /issm/trunk/src/m/utils/LatLong/ll2xy.m
===================================================================
--- /issm/trunk/src/m/utils/LatLong/ll2xy.m	(revision 6342)
+++ /issm/trunk/src/m/utils/LatLong/ll2xy.m	(revision 6343)
@@ -1,3 +1,3 @@
-function [x,y] = ll2xy(lat,lon,sgn)  
+function [x,y] = ll2xy(lat,lon,sgn,central_meridian,standard_parallel)  
 %LL2XY - converts lat long to polar stereographic
 %
@@ -7,10 +7,24 @@
 %
 %   Usage:
-%      [x,y] = map2ll(lat,lon,sgn)
-%      - sgn = Sign of latitude +1 : north latitude
-%                               -1 : south latitude
+%      [x,y] = ll2xy(lat,lon,sgn)
+%      [x,y] = ll2xy(lat,lon,sgn,central_meridian,standard_parallel)
+%
+%      - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70)
+%                               -1 : south latitude (default is mer=0  lat=70)
 
-if nargin ~= 3
-	help map2ll
+%Get central_meridian and standard_parallel depending on hemisphere
+if nargin==5,
+	delta = central_meridian;
+	slat  = standard_parallel;
+elseif nargin==3
+	if sgn == 1,
+		delta = 45; slat = 70;
+	elseif sgn==-1,
+		delta = 0;  slat = 70;
+	else
+		error('Sign should be either +1 or -1');
+	end
+else
+	help ll2xy
 	error('bad usage');
 end
@@ -18,6 +32,4 @@
 % Conversion constant from degrees to radians
 cde  = 57.29577951;
-% Standard latitude for the SSM/I grid with no distorsion
-slat = 70.;
 % Radius of the earth in meters
 re   = 6378.273*10^3;
@@ -26,10 +38,4 @@
 % Eccentricity of the Hughes ellipsoid
 ex    =  sqrt(ex2);
-
-if sgn == 1 
-	delta = 45.;
-else
-	delta = 0.0;
-end
 
 latitude  = abs(lat) * pi/180.;
Index: /issm/trunk/src/m/utils/LatLong/xy2ll.m
===================================================================
--- /issm/trunk/src/m/utils/LatLong/xy2ll.m	(revision 6342)
+++ /issm/trunk/src/m/utils/LatLong/xy2ll.m	(revision 6343)
@@ -1,3 +1,3 @@
-function [lat,lon] = xy2ll(x,y,sgn)
+function [lat,lon] = xy2ll(x,y,sgn,central_meridian,standard_parallel)
 %XY2LL - converts xy to lat long
 %
@@ -8,10 +8,24 @@
 %
 %   Usage:
-%      [lat,lon] = map2xy(x,y,sgn);
-%      - sgn = Sign of latitude +1 : north latitude
-%                               -1 : south latitude
+%      [lat,lon] = xy2ll(x,y,sgn);
+%      [lat,lon] = xy2ll(x,y,sgn,central_meridian,standard_parallel);
+%
+%      - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70)
+%                               -1 : south latitude (default is mer=0  lat=70)
 
-if nargin ~= 3
-	help map2xy
+%Get central_meridian and standard_parallel depending on hemisphere
+if nargin==5,
+	delta = central_meridian;
+	slat  = standard_parallel;
+elseif nargin==3
+	if sgn == 1,
+		delta = 45; slat = 70;
+	elseif sgn==-1,
+		delta = 0;  slat = 70;
+	else
+		error('Sign should be either +1 or -1');
+	end
+else
+	help xy2ll
 	error('bad usage');
 end
@@ -19,6 +33,4 @@
 % Conversion constant from degrees to radians
 cde  = 57.29577951;
-% Standard latitude for the SSM/I grid with no distorsion
-slat = 70.;
 % Radius of the earth in meters
 re   = 6378.273*10^3;
@@ -27,10 +39,4 @@
 % Eccentricity of the Hughes ellipsoid
 ex    =  sqrt(ex2);
-
-if sgn == 1 
-	delta = 45.;
-else
-	delta = 0.0;
-end
 
 sl  = slat*pi/180.;
