added support for 2 objectives in analysis script
This commit is contained in:
1 parent
283266c2a8
commit
8e8bb39cd9
2 files changed
+16
-4
No files matched your search
@@ -102,9 +102,14 @@ function [f, G] = plotGpsLogs(logDirs, seaToGroundLevel, plotWholeFlight)
|
||||
geoplot3(gf, [domain(1, 1), domain(2, 1), domain(2, 1), domain(1, 1), domain(1, 1)], [domain(1, 2), domain(1, 2), domain(2, 2), domain(2, 2), domain(1, 2)], repmat(domain(1, 3) + altOffset + floorAlt, 1, 5), 'LineWidth', 3, 'Color', 'r');
|
||||
|
||||
% Plot objective
|
||||
objectivePos = [params.objectivePos, 0];
|
||||
if length(params.objectivePos) > 2
|
||||
objectivePos = reshape(params.objectivePos, [2, length(params.objectivePos) / 2])';
|
||||
end
|
||||
objectivePos = [objectivePos, zeros(size(objectivePos, 1), 1)];
|
||||
llaObj = enu2lla(objectivePos, lla0, "flat");
|
||||
geoplot3(gf, [llaObj(1), llaObj(1)], [llaObj(2), llaObj(2)], [llaObj(3), domain(2, 3)], 'LineWidth', 3, "Color", 'y');
|
||||
for ii = 1:size(llaObj, 1)
|
||||
geoplot3(gf, [llaObj(ii, 1), llaObj(ii, 1)], [llaObj(ii, 2), llaObj(ii, 2)], [llaObj(ii, 3), domain(2, 3)], 'LineWidth', 3, "Color", 'y');
|
||||
end
|
||||
|
||||
% Plot obstacles
|
||||
for ii = 1:params.numObstacles
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%% Plot AERPAW logs (trajectory, radio)
|
||||
resultsPath = fullfile(matlab.project.rootProject().RootFolder, "sandbox", "two_around_wall"); % Define path to results copied from AERPAW platform
|
||||
resultsPath = fullfile(matlab.project.rootProject().RootFolder, "sandbox", "columns_simulated"); % Define path to results copied from AERPAW platform
|
||||
|
||||
% Check timeline in controller logs
|
||||
controller = controllerAnalysis(resultsPath);
|
||||
@@ -25,7 +25,14 @@ makeVideo = true;
|
||||
% Define scenario according to CSV specification
|
||||
domain = rectangularPrism;
|
||||
domain = domain.initialize([params.domainMin; params.domainMax], REGION_TYPE.DOMAIN, "Domain");
|
||||
domain.objective = domain.objective.initialize(objectiveFunctionWrapper(params.objectivePos, reshape(params.objectiveVar, [1, 2 2])), domain, params.discretizationStep, params.protectedRange, params.sensorPerformanceMinimum);
|
||||
if length(params.objectiveVar) > 4 && length(params.objectivePos) > 2
|
||||
objectiveSigma = permute(reshape(params.objectiveVar, [length(params.objectiveVar)/4 2 2]), [3 1 2]);
|
||||
objectivePos = reshape(params.objectivePos, [length(params.objectivePos)/2, 2])';
|
||||
else
|
||||
objectiveSigma = reshape(params.objectiveVar, [1, 2, 2]);
|
||||
objectivePos = params.objectivePos;
|
||||
end
|
||||
domain.objective = domain.objective.initialize(objectiveFunctionWrapper(objectivePos, objectiveSigma), domain, params.discretizationStep, params.protectedRange, params.sensorPerformanceMinimum);
|
||||
|
||||
agents = cell(size(params.initialPositions, 2) / 3, 1);
|
||||
for ii = 1:size(agents, 1)
|
||||
|
||||
Reference in new issue
Block a user