diff -r 037b67701b72 -r 8b8db821a54c inst/deg2sm.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inst/deg2sm.m	Tue Mar 04 17:58:51 2014 +0530
@@ -0,0 +1,45 @@
+## Copyright (C) 2013 Carnë Draug <carandraug@octave.org>
+##Copyright (C) 2013 Arpit Sharma <arpit17792@octave.org>
+##
+## This program is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free Software
+## Foundation; either version 3 of the License, or (at your option) any later
+## version.
+##
+## This program is distributed in the hope that it will be useful, but WITHOUT
+## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+## details.
+##
+## You should have received a copy of the GNU General Public License along with
+## this program; if not, see <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{sm} =} deg2sm (@var{deg})
+## @deftypefnx {Function File} {@var{sm} =} deg2sm (@var{deg}, @var{radius})
+## @deftypefnx {Function File} {@var{sm} =} deg2sm (@var{deg}, @var{sphere})
+## Converts angle to U.S. survey miles (statute miles). If unspecified, radius defaults to
+## 6371, the mean radius of Earth.
+##
+## Alternatively, @var{sphere} can be one of "sun", "mercury", "venus", "earth",
+## "moon", "mars", "jupiter", "saturn", "uranus", "neptune", or "pluto", in
+## which case radius will be set to that object mean radius.
+##
+## @seealso{sm2deg}
+## @end deftypefn
+
+## Author: arpit17792@gmail.com>
+
+function sm = deg2sm (deg, radius = "earth")
+  if (nargin < 1 || nargin > 2)
+    print_usage();
+  elseif (ischar (radius))
+    radius = spheres_radius (radius);
+  elseif (! isnumeric (radius) || ! isscalar (radius))
+    error ("deg2km: RADIUS must be a numeric scalar");
+  endif
+  km = (deg * pi * radius) / 180;
+  ratio = unitsratio ("statute mile","kilometer");
+  sm = km * ratio;
+endfunction
+
diff -r 037b67701b72 -r 8b8db821a54c inst/sm2deg.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inst/sm2deg.m	Tue Mar 04 17:58:51 2014 +0530
@@ -0,0 +1,49 @@
+## Copyright (C) 2008 Alexander Barth <abarth93@users.sourceforge.net>
+## Copyright (C) 2013 Carnë Draug <carandraug@octave.org>
+## Copyright (C) 2014 Arpit Sharma <arpit17792@octave.org>
+##
+## This program is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free Software
+## Foundation; either version 3 of the License, or (at your option) any later
+## version.
+##
+## This program is distributed in the hope that it will be useful, but WITHOUT
+## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+## details.
+##
+## You should have received a copy of the GNU General Public License along with
+## this program; if not, see <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{deg} =} sm2deg (@var{sm})
+## @deftypefnx {Function File} {@var{deg} =} sm2deg (@var{sm}, @var{radius})
+## @deftypefnx {Function File} {@var{deg} =} sm2deg (@var{sm}, @var{sphere})
+## Convert distance to angle.
+##
+## Calculates the angles @var{deg} for the U.S. survey miles (statute miles) in a sphere with
+## @var{radius} (in kilometers).  If unspecified, radius defaults to 6371,
+## the mean radius of Earth.
+##
+## Alternatively, @var{sphere} can be one of "sun", "mercury", "venus", "earth",
+## "moon", "mars", "jupiter", "saturn", "uranus", "neptune", or "pluto", in
+## which case radius will be set to that object mean radius.
+##
+## @seealso{deg2sm}
+## @end deftypefn
+
+## Author: Arpit Sharma <arpit17792@gmail.com>
+
+function deg = sm2deg (sm, radius = "earth")
+  if (nargin < 1 || nargin > 2)
+    print_usage();
+  elseif (ischar (radius))
+    radius = spheres_radius (radius);
+  elseif (! isnumeric (radius) || ! isscalar (radius))
+    error ("km2deg: RADIUS must be a numeric scalar");
+  endif
+  persistent ratio = unitsratio ("kilometer", "statute mile");
+  km = sm * ratio;
+  deg = 180 * km/(pi*radius);
+endfunction
+
