first aerpaw test prepared
This commit is contained in:
@@ -143,6 +143,11 @@
|
|||||||
<Size type="coderapp.internal.codertype.Dimension"/>
|
<Size type="coderapp.internal.codertype.Dimension"/>
|
||||||
<Size type="coderapp.internal.codertype.Dimension"/>
|
<Size type="coderapp.internal.codertype.Dimension"/>
|
||||||
</Types>
|
</Types>
|
||||||
|
<Types id="29" type="coderapp.internal.codertype.PrimitiveType">
|
||||||
|
<ClassName>int32</ClassName>
|
||||||
|
<Size type="coderapp.internal.codertype.Dimension"/>
|
||||||
|
<Size type="coderapp.internal.codertype.Dimension"/>
|
||||||
|
</Types>
|
||||||
</Types>
|
</Types>
|
||||||
</coderapp.internal.interface.project.Interface>
|
</coderapp.internal.interface.project.Interface>
|
||||||
</MF0>
|
</MF0>
|
||||||
@@ -708,7 +713,7 @@
|
|||||||
</Artifacts>
|
</Artifacts>
|
||||||
<BuildFolder type="coderapp.internal.util.mfz.FileSpec"/>
|
<BuildFolder type="coderapp.internal.util.mfz.FileSpec"/>
|
||||||
<Success>true</Success>
|
<Success>true</Success>
|
||||||
<Timestamp>2026-04-01T21:59:22</Timestamp>
|
<Timestamp>2026-04-02T10:07:33</Timestamp>
|
||||||
</MainBuildResult>
|
</MainBuildResult>
|
||||||
</coderapp.internal.mlc.mfz.MatlabCoderProjectState>
|
</coderapp.internal.mlc.mfz.MatlabCoderProjectState>
|
||||||
</MF0>
|
</MF0>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
function [f, G] = plotGpsLogs(logDirs, seaToGroundLevel)
|
function [f, G] = plotGpsLogs(logDirs, seaToGroundLevel, plotWholeFlight)
|
||||||
arguments (Input)
|
arguments (Input)
|
||||||
logDirs (1, 1) string;
|
logDirs (1, 1) string;
|
||||||
seaToGroundLevel (1, 1) double = 110; % measured approximately from USGS national map viewer for the AERPAW test field
|
seaToGroundLevel (1, 1) double = 110; % measured approximately from USGS national map viewer for the AERPAW test field
|
||||||
|
plotWholeFlight (1, 1) logical = false;
|
||||||
end
|
end
|
||||||
arguments (Output)
|
arguments (Output)
|
||||||
f (1, 1) matlab.ui.Figure;
|
f (1, 1) matlab.ui.Figure;
|
||||||
@@ -48,8 +49,10 @@ function [f, G] = plotGpsLogs(logDirs, seaToGroundLevel)
|
|||||||
stopIdx = find(verticalSpeed <= prctile(verticalSpeed, pctThreshold), 1, "last");
|
stopIdx = find(verticalSpeed <= prctile(verticalSpeed, pctThreshold), 1, "last");
|
||||||
|
|
||||||
% % Plot whole flight, including setup/cleanup
|
% % Plot whole flight, including setup/cleanup
|
||||||
% startIdx = 1;
|
if plotWholeFlight
|
||||||
% stopIdx = length(verticalSpeed);
|
startIdx = 1;
|
||||||
|
stopIdx = length(verticalSpeed);
|
||||||
|
end
|
||||||
|
|
||||||
% Convert LLA trajectory data to ENU for external analysis
|
% Convert LLA trajectory data to ENU for external analysis
|
||||||
% NaN out entries outside the algorithm flight range so they don't plot
|
% NaN out entries outside the algorithm flight range so they don't plot
|
||||||
|
|||||||
@@ -31,14 +31,26 @@ function R = readRadioLogs(logPath)
|
|||||||
end
|
end
|
||||||
|
|
||||||
fid = fopen(filepath, 'r');
|
fid = fopen(filepath, 'r');
|
||||||
% Skip 3 lines: 2 junk (tail errors) + 1 header (tx_uav_id,value)
|
% Skip header lines: some files have 2 tail-error lines + 1 column
|
||||||
for k = 1:3
|
% header ("tx_uav_id,value"), others start with data immediately.
|
||||||
fgetl(fid);
|
% Read until a line that looks like a data record, then rewind to it.
|
||||||
|
dataPattern = '^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+\] [-\d]';
|
||||||
|
linePos = ftell(fid);
|
||||||
|
while true
|
||||||
|
line = fgetl(fid);
|
||||||
|
if ~ischar(line)
|
||||||
|
break; % EOF
|
||||||
|
end
|
||||||
|
if ~isempty(regexp(line, dataPattern, 'once'))
|
||||||
|
fseek(fid, linePos, 'bof'); % rewind to start of this line
|
||||||
|
break;
|
||||||
|
end
|
||||||
|
linePos = ftell(fid);
|
||||||
end
|
end
|
||||||
data = textscan(fid, '[%26c] %d,%f');
|
data = textscan(fid, '[%26c] %d,%f');
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
|
|
||||||
ts = datetime(data{1}, 'InputFormat', 'yyyy-MM-dd HH:mm:ss.SSSSSS');
|
ts = datetime(cellstr(data{1}), 'InputFormat', 'yyyy-MM-dd HH:mm:ss.SSSSSS');
|
||||||
txId = int32(data{2});
|
txId = int32(data{2});
|
||||||
val = data{3};
|
val = data{3};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ resultsPath = fullfile(matlab.project.rootProject().RootFolder, "sandbox", "two_
|
|||||||
|
|
||||||
% Plot GPS logged data and scenario information (domain, objective, obstacles)
|
% Plot GPS logged data and scenario information (domain, objective, obstacles)
|
||||||
seaToGroundLevel = 110; % measured approximately from USGS national map viewer
|
seaToGroundLevel = 110; % measured approximately from USGS national map viewer
|
||||||
[fGlobe, G] = plotGpsLogs(resultsPath, seaToGroundLevel);
|
plotWholeFlight = true; % do not attempt to automatically trim initial and final positioning and landing from flight plot (buggy)
|
||||||
|
[fGlobe, G] = plotGpsLogs(resultsPath, seaToGroundLevel, true);
|
||||||
|
|
||||||
% Plot radio statistics
|
% Plot radio statistics
|
||||||
[fRadio, R] = plotRadioLogs(resultsPath);
|
[fRadio, R] = plotRadioLogs(resultsPath);
|
||||||
@@ -21,7 +22,7 @@ makeVideo = true;
|
|||||||
% Define scenario according to CSV specification
|
% Define scenario according to CSV specification
|
||||||
domain = rectangularPrism;
|
domain = rectangularPrism;
|
||||||
domain = domain.initialize([params.domainMin; params.domainMax], REGION_TYPE.DOMAIN, "Domain");
|
domain = domain.initialize([params.domainMin; params.domainMax], REGION_TYPE.DOMAIN, "Domain");
|
||||||
domain.objective = domain.objective.initialize(objectiveFunctionWrapper(params.objectivePos, reshape(params.objectiveVar, [2 2])), domain, params.discretizationStep, params.protectedRange, params.sensorPerformanceMinimum);
|
domain.objective = domain.objective.initialize(objectiveFunctionWrapper(params.objectivePos, reshape(params.objectiveVar, [1, 2 2])), domain, params.discretizationStep, params.protectedRange, params.sensorPerformanceMinimum);
|
||||||
|
|
||||||
agents = cell(size(params.initialPositions, 2) / 3, 1);
|
agents = cell(size(params.initialPositions, 2) / 3, 1);
|
||||||
for ii = 1:size(agents, 1)
|
for ii = 1:size(agents, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user