From 75373ae37f961f1debe2c07b762e6ca42a3d1fc9 Mon Sep 17 00:00:00 2001 From: Marco Marchesi <marco4.marchesi@mail.polimi.it> Date: Fri, 29 Sep 2023 10:04:58 +0200 Subject: [PATCH] Added motor lines on plots --- RoccarasoFlight/postprocessing/GNC/postProcess.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RoccarasoFlight/postprocessing/GNC/postProcess.m b/RoccarasoFlight/postprocessing/GNC/postProcess.m index 1e3bd78..69a60c1 100644 --- a/RoccarasoFlight/postprocessing/GNC/postProcess.m +++ b/RoccarasoFlight/postprocessing/GNC/postProcess.m @@ -464,6 +464,8 @@ subplot(3,1,1) plot(main.MEAControllerStatus(main.MEAControllerStatus(:,1)<t_end,1),main.MEAControllerStatus(main.MEAControllerStatus(:,1)<t_end,2),'DisplayName','OBSW') hold on; plot(sensorTot.mea.time,sensorTot.mea.estimatedMass,'DisplayName','Simulator') +xline(motor.mainServoData(find(motor.mainServoData(:,2)>0.965,1),1),'k--','OPEN MAIN','HandleVisibility','off') +xline(motor.mainServoData(find(motor.mainServoData(:,2)<0.001,1),1),'k--','CLOSE MAIN','HandleVisibility','off') legend title('Estimated Mass') xlabel('Time [s]') @@ -477,6 +479,8 @@ title('Pressure') legend xlabel('Time [s]') ylabel('Pressure [Pa]') +xline(motor.mainServoData(find(motor.mainServoData(:,2)>0.965,1),1),'k--','OPEN MAIN','HandleVisibility','off') +xline(motor.mainServoData(find(motor.mainServoData(:,2)<0.001,1),1),'k--','CLOSE MAIN','HandleVisibility','off') % apogee subplot(3,1,3) plot(main.MEAControllerStatus(main.MEAControllerStatus(:,1)<t_end,1),main.MEAControllerStatus(main.MEAControllerStatus(:,1)<t_end,3),'DisplayName','OBSW') @@ -484,6 +488,8 @@ hold on; plot(sensorTot.mea.time,sensorTot.mea.predictedApogee,'DisplayName','Simulator'); plot(main.NASData(main.NASData(:,1)<t_end,1),-main.NASData(main.NASData(:,1)<t_end,4),'DisplayName','NAS Altitude') yline(main.MEATarget,'--','SHUTDOWN TARGET','HandleVisibility','off') +xline(motor.mainServoData(find(motor.mainServoData(:,2)>0.965,1),1),'k--','OPEN MAIN','HandleVisibility','off') +xline(motor.mainServoData(find(motor.mainServoData(:,2)<0.001,1),1),'k--','CLOSE MAIN','HandleVisibility','off') legend title('Apogee prediction') xlabel('Time [s]') -- GitLab