reorganized code into separate files
This commit is contained in:
40
@agent/agent.m
Normal file
40
@agent/agent.m
Normal file
@@ -0,0 +1,40 @@
|
||||
classdef agent
|
||||
properties (SetAccess = private, GetAccess = public)
|
||||
% Identifiers
|
||||
index = NaN;
|
||||
label = "";
|
||||
|
||||
% Sensor
|
||||
sensorModel;
|
||||
sensingLength = 0.05; % length parameter used by sensing function
|
||||
|
||||
% Guidance
|
||||
guidanceModel;
|
||||
|
||||
% State
|
||||
lastPos = NaN(1, 3); % position from previous timestep
|
||||
pos = NaN(1, 3); % current position
|
||||
vel = NaN(1, 3); % current velocity
|
||||
pan = NaN; % pan angle
|
||||
tilt = NaN; % tilt angle
|
||||
|
||||
% Collision
|
||||
collisionGeometry;
|
||||
|
||||
% FOV cone
|
||||
fovGeometry;
|
||||
|
||||
% Communication
|
||||
comRange = NaN;
|
||||
|
||||
% Plotting
|
||||
scatterPoints;
|
||||
end
|
||||
|
||||
methods (Access = public)
|
||||
[obj] = initialize(obj, pos, vel, pan, tilt, collisionGeometry, sensorModel, guidanceModel, comRange, index, label);
|
||||
[obj] = run(obj, sensingObjective, domain, partitioning);
|
||||
[obj, f] = plot(obj, ind, f);
|
||||
updatePlots(obj);
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user