stopped randomly placing agents too close to objective, fixed row/col preference
This commit is contained in:
@@ -16,7 +16,7 @@ classdef sensingObjective
|
||||
arguments (Input)
|
||||
obj (1,1) {mustBeA(obj, 'sensingObjective')};
|
||||
objectiveFunction (1, 1) {mustBeA(objectiveFunction, 'function_handle')};
|
||||
footprint (2, :) double;
|
||||
footprint (:, 2) double;
|
||||
groundAlt (1, 1) double = 0;
|
||||
discretizationStep (1, 1) double = 1;
|
||||
end
|
||||
@@ -27,10 +27,10 @@ classdef sensingObjective
|
||||
obj.groundAlt = groundAlt;
|
||||
|
||||
% Extract footprint limits
|
||||
xMin = min(footprint(1, :));
|
||||
xMax = max(footprint(1, :));
|
||||
yMin = min(footprint(2, :));
|
||||
yMax = max(footprint(2, :));
|
||||
xMin = min(footprint(:, 1));
|
||||
xMax = max(footprint(:, 1));
|
||||
yMin = min(footprint(:, 2));
|
||||
yMax = max(footprint(:, 2));
|
||||
|
||||
xGrid = unique([xMin:discretizationStep:xMax, xMax]);
|
||||
yGrid = unique([yMin:discretizationStep:yMax, yMax]);
|
||||
|
||||
Reference in New Issue
Block a user