function render_corrected_CG_title() % Publication-only plots from completed MAT data. No physical model runs. here=fileparts(mfilename('fullpath')); root=fileparts(fileparts(fileparts(fileparts(fileparts(here))))); model=fullfile(root,'reports','04_models','R23-001');addpath(fullfile(model,'matlab')); dest=fullfile(root,'reports','05_simulation','R23-001','equal-storage-supplement'); source=fullfile(dest,'equal-storage-results.mat');before=r23.sha256_file(source); d=load(source,'out','results','settings');out=d.out;res=d.results; baseline=res.CG_CLIMB_CORRECTED_MAX_WORK;S=baseline.series;c=d.settings.corrected_reference_settings; set(groot,'defaultFigureVisible','off','defaultAxesFontName','Arial','defaultAxesFontSize',11); set(groot,'defaultAxesColorOrder',[.08 .35 .65;.85 .30 .10;.10 .50 .25]); figures=struct('figures',dest); fig=figure('Position',[80 80 1100 720]);tiledlayout(2,2,'Padding','compact'); nexttile;plot(S.time_s/60,[S.bus_load_W,S.FC_bus_W,S.battery_bus_signed_W]/1000,'LineWidth',1.4); grid on;xlabel('Complete profile time (min)');ylabel('Power (kW)');legend('Bus load','FC net','Battery bus','Location','best'); title('R23-HE2.1.0 reference: power');xtickformat('%.2f');ytickformat('%.2f'); nexttile;plot(S.time_s/60,100*S.SOC,'LineWidth',1.4);hold on;yline(100*c.SOCmin,'k--'); grid on;xlabel('Complete profile time (min)');ylabel('Energy-equivalent SOC (%)');xtickformat('%.2f');ytickformat('%.2f'); nexttile;plot(S.time_s/60,S.H2_kg*1000,'LineWidth',1.4);hold on;yline(c.H0_kg*c.hydrogen_reserve_fraction*1000,'k--'); grid on;xlabel('Complete profile time (min)');ylabel('Hydrogen inventory (g)');xtickformat('%.2f');ytickformat('%.2f'); nexttile;plot(S.time_s/60,S.aircraft_mass_kg,'LineWidth',1.4);grid on; xlabel('Complete profile time (min)');ylabel('Aircraft mass (kg)');xtickformat('%.2f');ytickformat('%.2f'); sgtitle(sprintf('Corrected mission | flight %.2f h | final SOC %.2f',baseline.flight_s/3600,baseline.SOC_final),'Color','k'); r23.save_figure(fig,figures,'corrected-CG-mission-publication');close(fig); assert(strcmp(r23.sha256_file(source),before)); files={'corrected-CG-mission-publication.png','corrected-CG-mission-publication.svg'};outputs=struct([]); for k=1:numel(files) item=struct('path',['reports/05_simulation/R23-001/equal-storage-supplement/' files{k}], 'sha256',r23.sha256_file(fullfile(dest,files{k}))); if isempty(outputs),outputs=item;else,outputs(end+1)=item;end end receipt=struct('operation','corrected_CG_total_title_black_only','new_physical_calculations',false, ... 'input','reports/05_simulation/R23-001/equal-storage-supplement/equal-storage-results.mat', ... 'input_sha256',before,'source_sha256',r23.sha256_file([mfilename('fullpath') '.m']),'outputs',outputs); r23.write_json(fullfile(dest,'corrected-CG-title-figures-receipt.json'),receipt); fprintf('CORRECTED_CG_BLACK_TITLE_COMPLETED\n'); end