diff --git a/state_machine.m b/state_machine.m index 48bdd0c97f4ee085d7c1892ed42e0610cb9d3bb1..7babafc044401ac0b77bcd1acc6a884e00e359f9 100644 --- a/state_machine.m +++ b/state_machine.m @@ -1,11 +1,13 @@ d2r = 180/pi; +fs = 24414; th_az = 5; % Degrees step_distance = 0.1; % meters th_dist = 0.78; +icvec = zeros(100,1); % sendPosition.moveRelativePosition('map', moveFront, moveLeft, rotateClockwise); - +it = 1; while(true) pause(0.01) @@ -21,6 +23,8 @@ while(true) % The angle to the source is small enough, take a step forward [there, ic] = get_distance(audio, th_dist, 0); + icvec(it) = ic; + it = it + 1; if ~there sendPosition.moveRelativePosition('map', step_distance, 0, 0);