Exemple #1
0
        void GeneralEngineParameters()
        {
            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical(GUILayout.Width(290));

            double chamberPresMPa = engineCalcBase.chamberPresMPa;
            double chamberoFRatio = engineCalcBase.chamberOFRatio;
            double throatDiam     = engineCalcBase.throatDiameter;
            double areaRatio      = engineCalcBase.areaRatio;

            //Power Cycle Dropdown
            GUILayout.BeginHorizontal();
            GUILayout.Label("Power Cycle:", GUILayout.Width(125));
            powerCycleDropdown.GUIDropDownDisplay();
            GUILayout.EndHorizontal();

            //Mixture Dropdown
            GUILayout.BeginHorizontal();
            GUILayout.Label("Propellants:", GUILayout.Width(125));
            biPropellantConfigs.GUIDropDownDisplay();
            GUILayout.EndHorizontal();

            //O/F Ratio
            chamberoFRatio = GUIUtils.TextEntryForDoubleWithButtons("Chamber O/F Ratio:", 125, chamberoFRatio, 0.01, 0.1, 50);
            //Chamber Pressure
            chamberPresMPa = GUIUtils.TextEntryForDoubleWithButtons("Chamber Pres, MPa:", 125, chamberPresMPa, 0.1, 1.0, 50);
            //Throat Diameter
            throatDiam = GUIUtils.TextEntryForDoubleWithButtons("Throat Diam, m:", 125, throatDiam, 0.01, 0.1, 50);
            //Area Ratio
            areaRatio = GUIUtils.TextEntryForDoubleWithButtons("Expansion Ratio:", 125, areaRatio, 0.1, 1.0, 50);

            engineCalcBase.SetEngineProperties(biPropellantConfigs.ActiveSelection, chamberoFRatio, chamberPresMPa, areaRatio, throatDiam);
            GUILayout.EndVertical();

            GUILayout.BeginVertical(GUILayout.Width(290));

            //Vac Thrust
            GUILayout.BeginHorizontal();
            GUILayout.Label("Vacuum Thrust: ", GUILayout.Width(125));
            GUILayout.Label(engineCalcBase.thrustVac.ToString("F3") + " kN");
            GUILayout.EndHorizontal();

            //SL Thrust
            GUILayout.BeginHorizontal();
            GUILayout.Label("Sea Lvl Thrust: ", GUILayout.Width(125));
            GUILayout.Label(engineCalcBase.thrustSL.ToString("F3") + " kN");
            GUILayout.EndHorizontal();

            //Vac Isp
            GUILayout.BeginHorizontal();
            GUILayout.Label("Vacuum Isp: ", GUILayout.Width(125));
            GUILayout.Label(engineCalcBase.specImpulseVac.ToString("F3") + " s");
            GUILayout.EndHorizontal();

            //SL Isp
            GUILayout.BeginHorizontal();
            GUILayout.Label("Sea Lvl Isp: ", GUILayout.Width(125));
            GUILayout.Label(engineCalcBase.specImpulseSL.ToString("F3") + " s");
            GUILayout.EndHorizontal();

            //Total Mass Flow
            GUILayout.BeginHorizontal();
            GUILayout.Label("Overall O/F: ", GUILayout.Width(125));
            GUILayout.Label(engineCalcBase.overallOFRatio.ToString("F3"));
            GUILayout.EndHorizontal();

            //Exit Diameter
            GUILayout.BeginHorizontal();
            GUILayout.Label("Nozzle Exit Diam: ", GUILayout.Width(125));
            GUILayout.Label(engineCalcBase.nozzleDiameter.ToString("F3") + " m");
            GUILayout.EndHorizontal();

            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
        }