diff --git a/RoccarasoFlight/postprocessing/GNC/postProcess.m b/RoccarasoFlight/postprocessing/GNC/postProcess.m index 7efc753166082e5484ec1b350be0c0296c07405b..8facc9a8d00086d3b0465bfaa072ffcf00cc943c 100644 --- a/RoccarasoFlight/postprocessing/GNC/postProcess.m +++ b/RoccarasoFlight/postprocessing/GNC/postProcess.m @@ -106,7 +106,7 @@ ylabel('Mass [kg]') set(gca,"YColor",'#D3212D') xlim([-1160,-1000]) legend -exportStandardizedFigure(gcf, 'TARS pressure mass',textDim, 'addMarkers',false,'changeColors',false,'overwriteFigure',true) +exportStandardizedFigure(gcf, 'TARS pressure mass',textDim, 'addMarkers',false,'changeColors',false,'overwriteFigure',true,'exportPDF',false) figure yyaxis left @@ -126,7 +126,7 @@ legend set(gca,"YColor",'#D3212D') xlim([-1160,-1000]) title('Mass finite difference vs venting valve') -exportStandardizedFigure(gcf, 'TARS mass offset',textDim, 'addMarkers',false,'changeColors',false,'overwriteFigure',true) +exportStandardizedFigure(gcf, 'TARS mass offset',textDim, 'addMarkers',false,'changeColors',false,'overwriteFigure',true,'exportPDF',false) % % % commento: non abbiamo lasciato che TARS finisse, ma abbiamo stoppato % % % noi perché abbiamo visto fase liquida. Probabilmente si @@ -384,18 +384,19 @@ xline(main.NASData(main.NASApogeeIndex,1),'--','APOGEE','HandleVisibility','off' % % % Mi devo inventare un modo per sincronizzarle %% MAGNETOMETER CALIBRATION -figure -scatter3(main.MAGNETOMETER(:,2),main.MAGNETOMETER(:,3),main.MAGNETOMETER(:,4),'.','DisplayName','Raw') +fig_magnetometerCalibration = figure; +% scatter3(main.MAGNETOMETER(:,2),main.MAGNETOMETER(:,3),main.MAGNETOMETER(:,4),'.','DisplayName','Raw') hold on; scatter3(main.IMU_CORRECTED(:,10),main.IMU_CORRECTED(:,11),main.IMU_CORRECTED(:,12),'.','DisplayName','Rotated') scatter3(sensorTot.imu.magnetometerMeasuresCalib(:,1),sensorTot.imu.magnetometerMeasuresCalib(:,2),sensorTot.imu.magnetometerMeasuresCalib(:,3),'.','DisplayName','Calibrated') - axis equal legend title('Magnetometer calibration') xlabel('X') ylabel('Y') zlabel('Z') +view(-60,40) +% exportgraphics(fig_magnetometerCalibration,'MagnetometerCalibration.pdf') % % % commento: i dati raw ok, però anche i dati non raw non sono calibrati % % % purtroppo, la sfera non è centrata in zero, a meno che non @@ -587,7 +588,7 @@ xlabel('Altitude [m]') legend title('ABK vs References') ylim([0,1.1]) -exportStandardizedFigure(gcf, 'ABK wrt references',textDim, 'addMarkers',false,'forcedMarkers',5,'changeColors',false) +exportStandardizedFigure(gcf, 'ABK wrt references',textDim, 'addMarkers',false,'forcedMarkers',5,'changeColors',false,'exportPDF',false) % % % commento: la shadowmode probabilmente si è mangiata il fatto che il primo @@ -599,6 +600,24 @@ exportStandardizedFigure(gcf, 'ABK wrt references',textDim, 'addMarkers',false,' % % % del controllore inaspettato. Sicuramente però, se è tarato è la migliore % % % stima della velocità xbody che abbiamo +%% NAS consistency check + +v_int_PITOT = 0; +v_int_NOpitot = 0; +for i = 2:length(sensorTot_WithPitot.nas.states(:,3)) + v_int_PITOT(i) = v_int_PITOT(i-1) + sum(sensorTot_WithPitot.nas.states([i-1,i],6))*nas.dt_k/2; + v_int_NOpitot(i) = v_int_NOpitot(i-1) + sum(sensorTot_NoPitot.nas.states([i-1,i],6))*nas.dt_k/2; +end +figure +sgtitle('NAS consistency check') +plot(sensorTot_WithPitot.nas.time,v_int_PITOT,'DisplayName','Int vel PITOT') +hold on; +plot(sensorTot_WithPitot.nas.time,sensorTot_WithPitot.nas.states(:,3),'DisplayName','Altitude PITOT') +plot(sensorTot_NoPitot.nas.time,v_int_NOpitot,'DisplayName','Int vel NO PITOT') +plot(sensorTot_NoPitot.nas.time,sensorTot_NoPitot.nas.states(:,3),'DisplayName','Altitude NOPITOT') +legend + + %% rocket animation for i = 1:length(main.NASData(:,1)) diff --git a/RoccarasoFlight/postprocessing/commonFunctions/miscellaneous/checkSubmodules.m b/RoccarasoFlight/postprocessing/commonFunctions/miscellaneous/checkSubmodules.m index f49d239c2fd055dab113b3979a96d0dc369a18c8..f7d075e9ca96251b95c277ccb3a79cf7efe35e9a 100644 --- a/RoccarasoFlight/postprocessing/commonFunctions/miscellaneous/checkSubmodules.m +++ b/RoccarasoFlight/postprocessing/commonFunctions/miscellaneous/checkSubmodules.m @@ -1,6 +1,6 @@ currentPath = pwd; -localRepoPath_generalUtilities = '../../../general-utilities/'; -if ~exist([localRepoPath_generalUtilities,'exportStandardizedFigure'],'file') +localRepoPath_generalUtilities = '../../../general-utilities'; +if ~exist([localRepoPath_generalUtilities,'/exportStandardizedFigure'],'file') % clone repo answer = input('WARNING! You don''have the exportStandardizedFigure installed. Do you want to install it? (recommended) (y/n)','s'); if answer == "y" || answer == "yes"