Home > arte3.2.0 > RAPID > functions > obtain_zone_data.m

obtain_zone_data

PURPOSE ^

given a tag specifying the zone data. Return a radius in meters

SYNOPSIS ^

function radius = obtain_zone_data(zonedata)

DESCRIPTION ^

given a tag specifying the zone data. Return a radius in meters
 for example, given z100, return radius=0.1 m

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %given a tag specifying the zone data. Return a radius in meters
0002 % for example, given z100, return radius=0.1 m
0003 
0004 % Copyright (C) 2012, by Arturo Gil Aparicio
0005 %
0006 % This file is part of ARTE (A Robotics Toolbox for Education).
0007 %
0008 % ARTE is free software: you can redistribute it and/or modify
0009 % it under the terms of the GNU Lesser General Public License as published by
0010 % the Free Software Foundation, either version 3 of the License, or
0011 % (at your option) any later version.
0012 %
0013 % ARTE is distributed in the hope that it will be useful,
0014 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0015 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016 % GNU Lesser General Public License for more details.
0017 %
0018 % You should have received a copy of the GNU Leser General Public License
0019 % along with ARTE.  If not, see <http://www.gnu.org/licenses/>.
0020 function radius = obtain_zone_data(zonedata)
0021 
0022 if strncmp(zonedata, 'fine',4) %case fine
0023    radius = 0;
0024 else 
0025     [tag,remain] = strtok(zonedata, 'z');
0026     radius = eval(tag)/1000;
0027 end
0028

Generated on Fri 03-Jan-2014 12:20:01 by m2html © 2005