wgs84Ellipsoid generate a WGS84 ellipsoid parameter struct Inputs ------ lengthUnit: currently not implemented, for compatibility either nargin=0 or 'm' or 'meter' is accepted without conversion Outputs ------ E: struct with referenceEllipsoid() properties
0001 function E = wgs84Ellipsoid(lengthUnit) 0002 %wgs84Ellipsoid generate a WGS84 ellipsoid parameter struct 0003 % 0004 % Inputs 0005 % ------ 0006 % lengthUnit: currently not implemented, for compatibility either nargin=0 or 'm' or 'meter' is accepted without conversion 0007 % 0008 % Outputs 0009 % ------ 0010 % E: struct with referenceEllipsoid() properties 0011 0012 if nargin>0 && ~strcmpi(lengthUnit(1),'m') 0013 error('wgs84Ellipsoid only accepts units of meters for now.') 0014 end 0015 0016 E = getreferenceEllipsoid('wgs84'); 0017 0018 end % function 0019 0020 % Copyright (c) 2014-2018 Michael Hirsch, Ph.D. 0021 % 0022 % Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 0023 % 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 0024 % 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 0025 % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.