%panel that allows the user to select power and propulsion protect_gui figure(105); clf; %set(105,'name','Solar Array & Engine Parameters','numbertitle','off',... % 'menubar','none','toolbar','none'); set(105,'name','Power & Propulsion Parameters','numbertitle','off',... 'menubar','none','toolbar','none'); set(105,'position',panelsize_inf{5},'color',[0.701960784313725 0.701960784313725 0.701960784313725]); str=sprintf('if exist(''solengpanel_ui'',''var'')\n set(solengpanel_ui,''value'',0);\nend\ndelete(105);'); set(105,'CloseRequestFcn',str); swlabclr_fg=[0 0 1]; % engine switch strategy: label color (foreground) swinpclr_bg=[.3 .3 1]; % engine switch strategy: input boxes bg color swinpclr_fg=[1 1 1]; % engine switch strategy: input boxes fg color simplesepclr_bg=[.8 .2 .2]; % simple sep models : bg colour for ui controls simplesepclr_fg=[ 1 1 1]; % simple sep models : fg colour for ui controls rows=36; hgt=1/rows; row=1; row=2; str='Propulsion Type'; proptype_txt=uicontrol('style','text','string',str,'units','normalized','fontweight','bold','position',[0 1-row*hgt .2 hgt]); str=' SEP | SEP (optimize p0) | NEP (Thrust/Mass Flow) | NEP (Isp/Efficiency) | NEP (optimize p0) | Sail | (Blank) '; proptype_ui=uicontrol('style','popupmenu','units','normalized','string',str,'position',[.2 1-row*hgt .2 hgt],'callback','r_solengpanel','tooltipstring','Use NEP Model instead of SEP'); str='Scaled Thrust Upper Limit:'; sthrustul_txt=uicontrol('style','text','string',str,'units','normalized','position',[.4 1-row*hgt .25 hgt],'HorizontalAlignment','right'); sthrustul_ui=uicontrol('style','edit','string','1','units','normalized','position',[.65 1-row*hgt .08 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring',sprintf('Upper limit on the magnitude of the normalized thrust vector (applies to all segments on the trajectory).\n1 basically corresponds to the max actual thrust available (can vary from segment to segment - i.e. the normalizing factor may vary from seg to seg).\nIs an additional constraint beyond the limits on thrust components (see thrust profile panel) [1d0] =ScaledThrustUL=') ); str='# of Engines'; numeng_txt=uicontrol('style','text','string',str,'units','normalized','position',[.75 1-row*hgt .15 hgt],'foregroundcolor',swlabclr_fg,'HorizontalAlignment','right'); numeng_ui=uicontrol('style','edit','units','normalized','position',[.9 1-row*hgt .08 hgt],'backgroundcolor',swinpclr_bg,'foregroundcolor',swinpclr_fg,'callback','r_solengpanel','tooltipstring','Number of Engines, =nEngines='); row=3; str='Switching Strategy:'; swstrat_txt=uicontrol('style','text','string',str,'units','normalized','position',[.65 1-row*hgt .15 hgt],'foregroundcolor',swlabclr_fg,'HorizontalAlignment','right'); str=' Min num engines| Max num engines'; swstrat_ui=uicontrol('style','popupmenu','string',str,'units','normalized','position',[.8 1.01-row*hgt .18 hgt*.8],'backgroundcolor',swinpclr_bg,'foregroundcolor',swinpclr_fg,'callback','r_solengpanel','tooltipstring',sprintf('Engine switching strategy. Options are:\n * Use as few engines as possible for the available power\n * Use as many engines as possible for the available power\n=SwitchingStrat=')); row=4; str='Solar Pressure Area'; txt=uicontrol('style','text','string',str,'units','normalized','position',[0.07 1-row*hgt 0.13 hgt]); solpressarea_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','The S/C area (m^2) used in computing solar pressure as follows: amag=(A*K*4.60689E-6)/(mass*rsun^2)'); str='Solar Pressure Const. (K)'; txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt 0.15 hgt]); solpressk_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Constant used in computing solar pressure acceleration. 0 - perectly translucent, 1 - perfectly absorbing, 2 - perfectly reflecting'); str='P_low_Switch'; tt_str=sprintf('Minimum power to use per engine when trying to maximise the number of engines used [kW].\n -1 or empty (default) means use Pmin. =PlowSwitch='); plowsw_txt=uicontrol('style','text','string',str,'units','normalized','position',[.65 1-row*hgt .25 hgt],'foregroundcolor',swlabclr_fg,'HorizontalAlignment','right'); plowsw_ui=uicontrol('style','edit','units','normalized','position',[.9 1-row*hgt .08 hgt],'backgroundcolor',swinpclr_bg,'foregroundcolor',swinpclr_fg,'callback','r_solengpanel','tooltipstring',tt_str); row=5; str='Duty Cycle'; txt=uicontrol('style','text','string',str,'units','normalized','position',[0.1 1-row*hgt 0.1 hgt]); duty_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Engine Duty Cycle'); str='Prop. Sys. Mass Factor'; txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt 0.15 hgt]); propsys_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Propulsion System Mass Factor (PropSysMass=k*PropSysMassFactor)'); str='P_high_Switch'; tt_str=sprintf('Maximum power to use per engine when trying to minimise the number of engines used [kW].\n-1 or empty (default) means use Pmax. =PhighSwitch='); phighsw_txt=uicontrol('style','text','string',str,'units','normalized','position',[.65 1-row*hgt .25 hgt],'HorizontalAlignment','right','foregroundcolor',swlabclr_fg); phighsw_ui=uicontrol('style','edit','units','normalized','position',[.9 1-row*hgt .08 hgt],'backgroundcolor',swinpclr_bg,'foregroundcolor',swinpclr_fg,'callback','r_solengpanel','tooltipstring',tt_str); row=6; str='Mass Dec. Rate'; txt=uicontrol('style','text','string',str,'units','normalized','position',[0.1 1-row*hgt .1 hgt]); massdecrate_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Time rate of mass loss (kg/sec)'); str='Mass Flow Rate Factor'; mdotfactor_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt 0.15 hgt]); mdotfactor_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Flow rate factor. Only 1 is physically valid. Values less than 1 decrease consumption rate without affecting thrust.'); row=7; row=8; str='SEP'; sep_txt=uicontrol('style','text','string',str,'units','normalized','fontweight','bold','position',[.1 1-row*hgt .1 hgt]); row=9; str='p0'; p0_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); p0_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Array Power at 1AU (kW)'); str='p0opt (LB,G,UB)'; p0opt_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt .15 hgt]); p0optlb_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Lower bound on optimized reference power, p0opt (kW)'); p0optg_ui=uicontrol('style','edit','units','normalized','position',[.65 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Guess for optimized reference power, p0opt (kW)'); p0optub_ui=uicontrol('style','edit','units','normalized','position',[.8 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Upper bound on optimized reference power, p0opt (kW)'); row=10; str='solRtilt'; solrtilt_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); solrtilt_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','The maximum solar power is limited to the value of power at distance solRtilt from the Sun (AU)'); str='Power Cost A'; powcostA_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt .15 hgt]); powcostA_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','First coefficient [kg/kW] for computing power system mass in terms of optimized reference power [mass(powerSystem)=PowerCostA*p0opt+PowerCostB], =PowerCostA='); str='Power Cost B'; powcostB_txt=uicontrol('style','text','string',str,'units','normalized','position',[.65 1-row*hgt .15 hgt]); powcostB_ui=uicontrol('style','edit','units','normalized','position',[.8 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Second coefficient [kg/kW] for computing power system mass in terms of optimized reference power [mass(powerSystem)=PowerCostA*p0opt+PowerCostB], =PowerCostB='); row=11; %%solar model parameters pulldown arr_str='Solar Model Parameters | --------------------- | User Defined | APSA1 APSA [minimum] | APSA2 APSA [average] | HIGH High Efficiency Silicon | ULTRAFLX Lockheed UltraFlex | GAS28 28 deg C GaAs | GAS40 40 deg C GaAs | GAS52 Hermes 52 deg C GaAs | GAS60 60 deg C GaAs | GA/AS LM Single Junction GaAs | GAAS135 TechStar 135 micron GaAs/Ge Single Junction | GAAS175 Spectrolab 175 micron GaAs/Ge Single Junction | GAAS-DJ TechStar 135 micron GaInP/GaAs/Ge Dual Junction | SCARLET Scarlet Concentrator | SCARLET2 Scarlet Concentrator #2 | SCARLET3 DS1 Scarlet Concentrator | HES High Efficiency Silicon (2001) | TJ Triple Junction Gallium Arsenide | TJ Triple Junction Ga/As extended | SEPS Old SEPS | MSFC Old MSFC | SAIC SAIC solar array data'; if (~isempty(iofile_inf{3})) & (exist(iofile_inf{3},'file')) read_models; if ~isempty(array_data) % array_data is from read_models routine add_str=[' | ' arr_name{1} ' (' num2str(arr_num(1)) ' FROM MODELS FILE)']; if length(arr_num)>1 for i=2:length(arr_num) add_str=[add_str ' | ' arr_name{i} ' (' num2str(arr_num(i)) ' FROM MODELS FILE)']; end end arr_str=[arr_str add_str]; end end solpar_txt=uicontrol('style','popupmenu','string',arr_str,'units','normalized','position',[0 1-row*hgt .2 hgt],'callback','r_solengpanel','tooltipstring',sprintf('Solar Array Selection, or User-Defined Array-Power-Output (as a function of heliocentric distance), using SEPTOP model:\n P=P0/R^2 * (solModel1+solModel2/R+solModel3/R^2)/(1+solmodel4*R+solmodel5*R^2)')); solpar1_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=solModel(1)= [AU^2]'); solpar2_ui=uicontrol('style','edit','units','normalized','position',[.35 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=solModel(2)= [AU^3]'); solpar3_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=solModel(3)= [AU^4]'); solpar4_ui=uicontrol('style','edit','units','normalized','position',[.65 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=solModel(4)= [1/AU]'); solpar5_ui=uicontrol('style','edit','units','normalized','position',[.8 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=solModel(5)= [1/AU^2]'); row=12; str='Array Number'; arrnum_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt 0.1 hgt]); arrnum_ui=uicontrol('style','edit','units','normalized','position',[0.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','solar array number in models file - THS OVERRIDES SOLAR MODEL PARAMETERS'); str='Array Type'; arrtype_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt 0.15 hgt]); arrtype_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','solar array type in models file'); sep1overr2_ui=uicontrol('style','pushbutton','string','1/r^2 Power','units','normalized','position',[0.65 1-row*hgt 0.15 hgt],'backgroundcolor',simplesepclr_bg,'foregroundcolor',simplesepclr_fg,... 'callback',... ['set(solpar_txt,''value'',3);'... 'set(solpar1_ui,''string'',''1'');'... 'set([solpar2_ui solpar3_ui solpar4_ui solpar5_ui],''string'',''0'');'],... 'tooltipstring',... 'Set the solar array coefficients to model power as proportional to 1/r^2'); row=13; row=14; str='S/C Power Radial Dependence'; tt_str='Power that must be diverted from thrusters to the remaining spacecraft (can only be specified as a function of radius from central body) =scPowerModel='; scdeg_txt=uicontrol('style','text','string',str,'units','normalized','position',[0 1-row*hgt .2 hgt],'tooltipstring',tt_str); str=' No Model | Psc=Asc+Bsc/R+Csc/R**2 | Psc=Asc if P>Asc, else Psc=Asc+Bsc*(Csc-P) '; scdeg_ui=uicontrol('style','popupmenu','string',str,'units','normalized','position',[0.2 1-row*hgt .4 hgt],'callback','r_solengpanel','tooltipstring',tt_str); row=15; str='Asc'; asc_txt=uicontrol('style','text','string',str,'units','normalized','position',[.2 1-row*hgt .05 hgt]); asc_ui=uicontrol('style','edit','units','normalized','position',[.25 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=Asc= [kW]'); str='Bsc'; bsc_txt=uicontrol('style','text','string',str,'units','normalized','position',[.4 1-row*hgt .05 hgt]); bsc_ui=uicontrol('style','edit','units','normalized','position',[.45 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=Bsc= [kW/km]'); str='Csc'; csc_txt=uicontrol('style','text','string',str,'units','normalized','position',[.6 1-row*hgt .05 hgt]); csc_ui=uicontrol('style','edit','units','normalized','position',[.65 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=Csc= [kW/km^2]'); row=16; sepdoispeff_ui=uicontrol('style','pushbutton','string','Use Isp,T below:','units','normalized','position',[0.65 1-row*hgt 0.15 hgt],'backgroundcolor',simplesepclr_bg,'foregroundcolor',simplesepclr_fg,... 'callback',... ['set(engnum_ui,''value'',1);'... 'set([ct2_ui ct3_ui ct4_ui ct5_ui],''string'',''0'');'... 'set([ct1_ui],''string'',num2str(str2num(get(septhr_ui,''string''))/1000,16));'... 'set([cm2_ui cm3_ui cm4_ui cm5_ui],''string'',''0'');'... 'set([cm1_ui],''string'',num2str(str2num(get(ct1_ui,''string''))/gE/str2num(get(sepisp_ui,''string'')),16));'... 'r_solengpanel;'],... 'tooltipstring',... sprintf('Use the specified constant Isp and Thrust (won''t vary with engine input power).\nWhen you push this button, Cthrust and Cmdot coeffs are computed and updated from the given Isp and Thrust: \n cthrust1=Thrust; cmdot1=Thrust/(g*Isp)')... ); row=17; str='Engine:'; engnum_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt 0.1 hgt]); eng_str='USER DEFINED | NEXT - High Thrust | NEXT - High Isp | Aerojet BPT-4000 | HiVHAC Hall | NSTAR Engine-I | NSTAR Engine-J | NSTAR Engine-K | NSTAR Engine-N | NSTAR Engine-O | Conventional TAL | Direct Drive TAL | 14 cm Xenon |Advanced NSTAR | Hughes 13 cm XIPS | NSTAR Engine-Q | NSTAR [DS4] |SPT-100 Hall | NSTAR ST4-IPS V4.0 | Hi Isp NSTAR V3.0 | Hi Isp NSTAR V4.0 | Hi Isp NSTAR V1.1 | Hi Isp NSTAR V5.0 | GRC 40 cm 4000 Isp | GRC 40 cm 6500 Isp | GRC Hi Isp 40 cm | SPT-140 Hall | GRC 5 kW 3300 Isp | Hi Isp NSTAR V5.1 | Modified | Modified | GRC - Unknown | GRC - Unknown'; if (~isempty(iofile_inf{3})) & (exist(iofile_inf{3},'file')) read_models; if ~isempty(eng_data) % eng_data is from read_models routine add_str2=[' | ' num2str(eng_name{1}) ' (' num2str(eng_num(1)) ' FROM MODELS FILE)']; if length(eng_num)>1 for i=2:length(eng_num) add_str2=[add_str2 ' | ' eng_name{i} ' (' num2str(eng_num(i)) ' FROM MODELS FILE)']; end end eng_str=[eng_str add_str2]; end end engnum_ui=uicontrol('style','popupmenu','string',eng_str,'units','normalized','position',[0.2 1-row*hgt 0.15 hgt],'callback','r_solengpanel','tooltipstring','Engine by name (canned coefficients or new coefficients for engines in models file - must specify file in IO panel)'); thrustmod_ui=uicontrol('style','edit','units','normalized','position',[.35 1-row*hgt .15 hgt],'callback','r_solengpanel','tooltipstring','Engine by number from models file (must specify file in IO panel), =ThrusterModel=','enable','off'); sepdoispeff_ui=uicontrol('style','pushbutton','string','Use This Isp,Eff:','units','normalized','position',[.5 1-row*hgt 0.15 hgt],'backgroundcolor',simplesepclr_bg,'foregroundcolor',simplesepclr_fg,... 'callback',... ['set(engnum_ui,''value'',1);'... 'set([ct1_ui ct3_ui ct4_ui ct5_ui],''string'',''0'');'... 'set([ct2_ui],''string'',num2str(2*str2num(get(sepeff_ui,''string''))/gE/str2num(get(sepisp_ui,''string''))*1000,16));'... 'set([cm1_ui cm3_ui cm4_ui cm5_ui],''string'',''0'');'... 'set([cm2_ui],''string'',num2str(str2num(get(ct2_ui,''string''))/gE/str2num(get(sepisp_ui,''string'')),16));'... 'r_solengpanel;'],... 'tooltipstring',... sprintf('Use the specified constant Isp and efficiency (won''t vary with engine input power).\nWhen you push this button, Cthrust and Cmdot coeffs are computed and updated from the given Isp and eff: \n cthrust2=2*eff/(g*Isp); cmdot2=2*eff/(g*Isp)^2')... ); sepisp_ui=uicontrol('style','edit','units','normalized','position',[0.65 1-row*hgt 0.15 hgt],'backgroundcolor',simplesepclr_bg,'foregroundcolor',simplesepclr_fg,'tooltipstring','Engine Isp, (constant) [seconds]'); sepeff_ui=uicontrol('style','edit','units','normalized','position',[0.8 1-row*hgt 0.15 hgt],'backgroundcolor',simplesepclr_bg,'foregroundcolor',simplesepclr_fg,'tooltipstring','Engine efficiency [0 to 1], usually 0.6-0.8'); row=18; str='Pmax'; pmax_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt 0.1 hgt]); pmax_ui=uicontrol('style','edit','units','normalized','position',[0.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Max Engine Power (kw)'); str='Pmin'; pmin_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt 0.15 hgt]); pmin_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Min Engine Power (kw)'); septhr_ui=uicontrol('style','edit','units','normalized','position',[0.65 1-row*hgt 0.15 hgt],'backgroundcolor',simplesepclr_bg,'foregroundcolor',simplesepclr_fg,'tooltipstring','Engine Thrust, (constant) [mN]'); row=19; str='cthrust'; ct_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt 0.1 hgt],'tooltipstring','coefficients for thrust in the engine model: thrust = SUM_i=1to5 (cthrust_i * EngineInputPower^(i-1))'); ct1_ui=uicontrol('style','edit','units','normalized','position',[0.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cthrust(1)= [N]'); ct2_ui=uicontrol('style','edit','units','normalized','position',[0.35 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cthrust(2)= [N/kW]'); ct3_ui=uicontrol('style','edit','units','normalized','position',[0.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cthrust(3)= [N/kW^2]'); ct4_ui=uicontrol('style','edit','units','normalized','position',[0.65 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','cthrust(4)= [N/kW^3]'); ct5_ui=uicontrol('style','edit','units','normalized','position',[0.8 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cthrust(5)= [N/kW^4]'); row=20; str='cmdot'; cm_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt 0.1 hgt],'tooltipstring','coefficients for mass flow rate in the engine model: propellant_mass_dot = SUM_i=1to5 (cmdot_i * EngineInputPower^(i-1))'); cm1_ui=uicontrol('style','edit','units','normalized','position',[0.2 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cmdot(1)= [kg/s]'); cm2_ui=uicontrol('style','edit','units','normalized','position',[0.35 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cmdot(2)= [kg/s/kW]'); cm3_ui=uicontrol('style','edit','units','normalized','position',[0.5 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cmdot(3)= [kg/s/kW^2]'); cm4_ui=uicontrol('style','edit','units','normalized','position',[0.65 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cmdot(4)= [kg/s/kW^3]'); cm5_ui=uicontrol('style','edit','units','normalized','position',[0.8 1-row*hgt 0.15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','=cmdot(5)= [kg/s/kW^4]'); row=21; row=22; str='NEP (Thrust/Massflow Rate)'; neptm_txt=uicontrol('style','text','string',str,'units','normalized','fontweight','bold','position',[0 1-row*hgt .2 hgt]); row=23; str='NEP Thrust'; nepforce_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); nepforce_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Force Provided by NEP Engine (N)'); str='NEP Mass Flow'; nepmfr_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt .15 hgt]); nepmfr_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','NEP Engine Mass Flow Rate (kg/s)'); row=24; row=25; str='NEP (Isp/Efficiency)'; nepie_txt=uicontrol('style','text','string',str,'units','normalized','fontweight','bold','position',[.025 1-row*hgt .2 hgt]); row=26; str='NEP Power'; neppower_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); neppower_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','NEP Reference Power (kW)'); row=27; str='bbEff'; nepbb_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); nepbb_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','bbEff: Eff = bbEff / ( 1 + (ddEff/Isp)**2 )'); str='ddEff'; nepdd_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt .15 hgt]); nepdd_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','ddEff: Eff = bbEff / ( 1 + (ddEff/Isp)**2 )'); str='Set ddEff=0 to input Non-Isp dependent Efficiency'; txt=uicontrol('style','text','string',str,'units','normalized','position',[.65 1-row*hgt .35 hgt]); row=28; str='Isp (lower,guess,upper)'; isp_txt=uicontrol('style','text','string',str,'units','normalized','position',[.01 1-row*hgt .19 hgt]); isplb_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Isp lower bound (seconds)'); ispg_ui=uicontrol('style','edit','units','normalized','position',[.35 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Isp initial guess (seconds)'); ispub_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Isp upper bound (seconds)'); row=29; row=30; str='NEP (Optimize p0)'; nepopt_txt=uicontrol('style','text','string',str,'units','normalized','fontweight','bold','position',[.025 1-row*hgt .2 hgt]); row=31; str='p0opt (LB,G,UB)'; p0opt2_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); p0optlb2_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Lower bound on optimized reference power, p0opt (kW)'); p0optg2_ui=uicontrol('style','edit','units','normalized','position',[.35 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Guess for optimized reference power, p0opt (kW)'); p0optub2_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Upper bound on optimized reference power, p0opt (kW)'); row=32; str='Power Cost A'; powcostA2_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); powcostA2_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','First coefficient for computing power system mass in terms of optimized reference power [mass(powerSystem)=PowerCostA*p0opt+PowerCostB]'); str='Power Cost B'; powcostB2_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt .15 hgt]); powcostB2_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Second coefficient for computing power system mass in terms of optimized reference power [mass(powerSystem)=PowerCostA*p0opt+PowerCostB]'); row=33; str='NEP Efficiency'; nepeff_txt=uicontrol('style','text','string',str,'units','normalized','position',[.1 1-row*hgt .1 hgt]); nepeff_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Efficiency of the NEP engine (0 - 1)'); str='NEP Isp'; nepisp_txt=uicontrol('style','text','string',str,'units','normalized','position',[.35 1-row*hgt .15 hgt]); nepisp_ui=uicontrol('style','edit','units','normalized','position',[.5 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Specific impulse of the NEP engine'); row=34; row=35; str='Sail Area'; sailarea_txt=uicontrol('style','text','string',str,'units','normalized','fontweight','bold','position',[.1 1-row*hgt .1 hgt]); sailarea_ui=uicontrol('style','edit','units','normalized','position',[.2 1-row*hgt .15 hgt],'backgroundcolor',[1 1 1],'callback','r_solengpanel','tooltipstring','Square meters'); row=36; unprotect_gui