Ejemplo n.º 1
0
        public static void DrawContent()
        {
            MarkerForces     comv = RCSBuildAid.VesselForces;
            MassEditorMarker comm = RCSBuildAid.ReferenceMarker.GetComponent <MassEditorMarker> ();

            GUILayout.BeginHorizontal();
            {
                if (RCSBuildAid.EngineList.Count != 0)
                {
                    GUILayout.BeginVertical();
                    {
                        GUILayout.Label("Reference");
                        GUILayout.Label("Torque");
                        GUILayout.Label("Thrust");
                        GUILayout.Label("TWR");
                    }
                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();
                    {
                        MainWindow.referenceButton();
                        GUILayout.Label(comv.Torque().magnitude.ToString("0.### kNm"));
                        GUILayout.Label(comv.Thrust().magnitude.ToString("0.## kN"));
                        GUILayout.Label((comv.Thrust().magnitude / (comm.mass * 9.81)).ToString("0.##"));
                    }
                    GUILayout.EndVertical();
                }
                else
                {
                    GUILayout.Label("No engines attached", MainWindow.style.centerText);
                }
            }
            GUILayout.EndHorizontal();
        }
Ejemplo n.º 2
0
        static void DrawContent()
        {
            MarkerForces comv = RCSBuildAid.VesselForces;

            GUILayout.BeginHorizontal();
            {
                if (hasAttitudeControl())
                {
                    GUILayout.BeginVertical();
                    {
                        GUILayout.Label("Reference");
                        GUILayout.Label("Direction");
                        GUILayout.Label("Torque");
                        GUILayout.Label("Thrust");
                    }
                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();
                    {
                        MainWindow.referenceButton();
                        MainWindow.directionButton();
                        GUILayout.Label(comv.Torque().magnitude.ToString("0.### kNm"));
                        GUILayout.Label(comv.Thrust().magnitude.ToString("0.## kN"));
                    }
                    GUILayout.EndVertical();
                }
                else
                {
                    GUILayout.Label("No attitude control elements attached", MainWindow.style.centerText);
                }
            }
            GUILayout.EndHorizontal();
        }
Ejemplo n.º 3
0
        protected override void DrawContent()
        {
            MarkerForces comv = RCSBuildAid.VesselForces;

            GUILayout.BeginVertical();
            {
                if (RCSBuildAid.RCS.Count != 0)
                {
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Reference", MainWindow.style.readoutName);
                        MainWindow.ReferenceButton();
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Direction", MainWindow.style.readoutName);
                        MainWindow.TranslationButton();
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Torque", MainWindow.style.readoutName);
                        GUILayout.Label(comv.Torque().magnitude.ToString("0.### kNm"));
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Thrust", MainWindow.style.readoutName);
                        GUILayout.Label(comv.Thrust().magnitude.ToString("0.## kN"));
                    }
                    GUILayout.EndHorizontal();
                    if (DeltaV.sanity)
                    {
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label("Delta V", MainWindow.style.readoutName);
                            GUILayout.Label(DeltaV.dV.ToString("0.# m/s"));
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label("Burn time", MainWindow.style.readoutName);
                            GUILayout.Label(MainWindow.TimeFormat(DeltaV.burnTime));
                        }
                        GUILayout.EndHorizontal();
                    }
                }
                else
                {
                    GUILayout.Label("No RCS thrusters attached", MainWindow.style.centerText);
                }
            }
            GUILayout.EndVertical();
        }
Ejemplo n.º 4
0
        protected override void DrawContent()
        {
            MarkerForces comv = RCSBuildAid.VesselForces;

            GUILayout.BeginVertical();
            {
                if (RCSBuildAid.Engines.Count != 0)
                {
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Reference", MainWindow.style.readoutName);
                        MainWindow.ReferenceButton();
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Torque", MainWindow.style.readoutName);
                        GUILayout.Label(comv.Torque().magnitude.ToString("0.### kNm"));
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Thrust", MainWindow.style.readoutName, GUILayout.Width(40));
                        if (GUILayout.Button(Settings.engines_vac ? "Vac" : "ASL", MainWindow.style.clickLabel, GUILayout.Width(36)))
                        {
                            Settings.engines_vac = !Settings.engines_vac;
                        }
                        GUILayout.Label(comv.Thrust().magnitude.ToString("0.## kN"));
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Body", MainWindow.style.readoutName);
                        if (GUILayout.Button(Settings.selected_body.name, MainWindow.style.clickLabel))
                        {
                            MainWindow.cBodyListEnabled = !MainWindow.cBodyListEnabled;
                            MainWindow.cBodyListMode    = RCSBuildAid.Mode;
                        }
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("TWR", MainWindow.style.readoutName);
                        GUILayout.Label(comv.TWR.ToString("0.##"));
                    }
                    GUILayout.EndHorizontal();
                    gimbals.DrawContent();
                }
                else
                {
                    GUILayout.Label("No engines attached", MainWindow.style.centerText);
                }
            }
            GUILayout.EndVertical();
        }
Ejemplo n.º 5
0
        protected override void DrawContent()
        {
            MarkerForces vesselForces = RCSBuildAid.VesselForces;

            GUILayout.BeginVertical();
            {
                if (RCSBuildAid.HasRCS)
                {
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Reference", MainWindow.style.readoutName);
                        MainWindow.ReferenceButton();
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Direction", MainWindow.style.readoutName);
                        MainWindow.TranslationButton();
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Torque", MainWindow.style.readoutName);
                        GUILayout.Label(vesselForces.Torque().magnitude.ToString("0.### kNm"));
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label("Thrust", MainWindow.style.readoutName);
                        GUILayout.Label(vesselForces.Thrust().magnitude.ToString("0.## kN"));
                    }
                    GUILayout.EndHorizontal();
                    if (DeltaV.sanity)
                    {
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label("ΔV", MainWindow.style.readoutName);
                            GUILayout.Label(DeltaV.dV.ToString("0.# m/s"));
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label("Burn time", MainWindow.style.readoutName);
                            GUILayout.Label(MainWindow.TimeFormat(DeltaV.burnTime));
                        }
                        GUILayout.EndHorizontal();
                    }
                    if (Settings.show_rcs_twr)
                    {
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label("Body", MainWindow.style.readoutName);
                            if (GUILayout.Button(Settings.selected_body.name, MainWindow.style.clickLabel))
                            {
                                MainWindow.cBodyListEnabled = !MainWindow.cBodyListEnabled;
                                MainWindow.cBodyListMode    = RCSBuildAid.Mode;
                            }
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label("TWR", MainWindow.style.readoutName);
                            GUILayout.Label(!Settings.selected_body.atmosphere
                                ? vesselForces.TWR.ToString("0.##")
                                : "--");
                        }
                        GUILayout.EndHorizontal();
                    }
                }
                else
                {
                    GUILayout.Label("No RCS thrusters attached", MainWindow.style.centerText);
                }
            }
            GUILayout.EndVertical();
        }