plotting update

This commit is contained in:
2026-03-04 18:42:17 -08:00
parent 1562fdc351
commit 3c775cf814

View File

@@ -13,19 +13,26 @@ params = readScenarioCsv(scenarioCsv);
% coordinate system constants % coordinate system constants
seaToGroundLevel = 110; % meters, measured approximately from USGS national map viewer seaToGroundLevel = 110; % meters, measured approximately from USGS national map viewer
fID = fopen(fullfile("aerpaw", "config", "client.yaml"), 'r'); fID = fopen(fullfile("aerpaw", "config", "client1.yaml"), 'r');
yaml = fscanf(fID, '%s'); yaml = fscanf(fID, '%s');
fclose(fID); fclose(fID);
% origin (LLA) % origin (LLA)
lla0 = [str2double(yaml((strfind(yaml, 'lat:') + 4):(strfind(yaml, 'lon:') - 1))), str2double(yaml((strfind(yaml, 'lon:') + 4):(strfind(yaml, 'alt:') - 1))), seaToGroundLevel]; lla0 = [str2double(yaml((strfind(yaml, 'lat:') + 4):(strfind(yaml, 'lon:') - 1))), str2double(yaml((strfind(yaml, 'lon:') + 4):(strfind(yaml, 'alt:') - 1))), seaToGroundLevel];
% Paths to logs % Paths to logs
gpsCsvs = dir(fullfile("sandbox", "test14", "*.csv")); logDirs = dir(fullfile("sandbox", "t1"));
logDirs = logDirs(3:end);
logDirs = logDirs([logDirs(:).isdir] == 1);
G = cell(size(gpsCsvs)); G = cell(size(logDirs));
for ii = 1:size(gpsCsvs, 1) for ii = 1:size(logDirs, 1)
% Read CSV % Find GPS log CSV
G{ii} = readGpsCsv(fullfile(gpsCsvs(ii).folder, gpsCsvs(ii).name)); gpsCsv = dir(fullfile(logDirs(ii).folder, logDirs(ii).name));
gpsCsv = gpsCsv(endsWith({gpsCsv(:).name}, "_gps_log.csv"));
gpsCsv = fullfile(gpsCsv.folder, gpsCsv.name);
% Read GPS log CSV
G{ii} = readGpsCsv(gpsCsv);
% Find when algorithm begins/ends (using ENU altitude rate change) % Find when algorithm begins/ends (using ENU altitude rate change)
enuTraj = lla2enu([G{ii}.Latitude, G{ii}.Longitude, G{ii}.Altitude], lla0, 'flat'); enuTraj = lla2enu([G{ii}.Latitude, G{ii}.Longitude, G{ii}.Altitude], lla0, 'flat');