From 0f43c3fe441c3a4f56d16a374076a9b23378aed0 Mon Sep 17 00:00:00 2001 From: Kevin D Date: Tue, 2 Jun 2026 08:50:17 -0700 Subject: [PATCH] more AERPAW analysis --- @rfSensor/plotPerformance.m | 10 ++++------ aerpaw/results/plotGpsLogs.m | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/@rfSensor/plotPerformance.m b/@rfSensor/plotPerformance.m index 1c4d441..8207225 100644 --- a/@rfSensor/plotPerformance.m +++ b/@rfSensor/plotPerformance.m @@ -34,10 +34,6 @@ function f = plotPerformance(obj, altitude, otherSensorsPos, otherSensors) SINR = reshape(SINR, size(targetPosX)); SNR = reshape(SNR, size(targetPosX)); - % normalize in linear scale - SINR = 10.^(SINR/10); SINR = SINR ./ max(SINR(:)); SINR = 10 * log10(SINR); - SNR = 10.^(SNR/10); SNR = SNR ./ max(SNR(:)); SNR = 10 * log10(SNR); - % Collect sensor positions and boresight parameters for overlay sensorXY = [0, 0; otherSensorsPos(:, 1:2)]; sensorTilts = [obj.tilt; cellfun(@(s) s.tilt, otherSensors)]; @@ -50,7 +46,8 @@ function f = plotPerformance(obj, altitude, otherSensorsPos, otherSensors) nexttile; imagesc(distances, distances, SNR); axis("image"); set(gca, 'YDir', 'normal'); - colorbar; xlabel("X (m)"); ylabel("Y (m)"); + cb = colorbar; cb.Label.String = "SNR (dB)"; + xlabel("X (m)"); ylabel("Y (m)"); title("Linearly Normalized SNR (dB)"); subtitle("No interfering sources"); addSensorOverlay(gca, sensorXY(1, 1:2), sensorTilts(1, 1), sensorAzimuths(1, 1), tailScale); @@ -58,7 +55,8 @@ function f = plotPerformance(obj, altitude, otherSensorsPos, otherSensors) nexttile; imagesc(distances, distances, SINR); axis("image"); set(gca, 'YDir', 'normal'); - colorbar; xlabel("X (m)"); ylabel("Y (m)"); + cb = colorbar; cb.Label.String = "SNR (dB)"; + xlabel("X (m)"); ylabel("Y (m)"); title("Linearly Normalized SINR (dB)"); subtitle(sprintf("%d interfering source(s)", size(otherSensorsPos, 1))); addSensorOverlay(gca, sensorXY, sensorTilts, sensorAzimuths, tailScale); diff --git a/aerpaw/results/plotGpsLogs.m b/aerpaw/results/plotGpsLogs.m index 71bf513..a2073ec 100644 --- a/aerpaw/results/plotGpsLogs.m +++ b/aerpaw/results/plotGpsLogs.m @@ -78,6 +78,8 @@ function [f, G] = plotGpsLogs(logDirs, seaToGroundLevel, plotWholeFlight) d = d(~isnan(d)); fprintf("Minimum distance between agents %d and %d is %2.3f\n", ii, jj, min(d)); + fprintf("Average distance between agents %d and %d is %2.3f\n", ii, jj, mean(d)); + fprintf("Median distance between agents %d and %d is %2.3f\n", ii, jj, median(d)); if min(d) < 6 warning("Minimum distance between agents %d and %d of %2.3f is questionable for AERPAW", ii, jj, min(d)); end @@ -86,6 +88,7 @@ function [f, G] = plotGpsLogs(logDirs, seaToGroundLevel, plotWholeFlight) % Plot recorded trajectory over specified range of indices geoplot3(gf, G{ii}.Latitude(startIdx:stopIdx), G{ii}.Longitude(startIdx:stopIdx), G{ii}.Altitude(startIdx:stopIdx) + seaToGroundLevel, c(mod(ii, length(c))), 'LineWidth', 2, "MarkerSize", 5); end + fprintf("Flight duration is %s\n", string(G{1}.Timestamp(end) - G{1}.Timestamp(1), 'mm:ss')); % Plot domain altOffset = 1; % to avoid clipping into the ground when displayed