Version 0.10.0
--- a/Tools.cs
+++ b/Tools.cs
@@ -149,67 +149,17 @@
return string.Format("{0}° {1}", Math.Abs(v_lat).ToString(format), dir_lat);
}
- ///////////////////////////////////////////////////////////////////////////////
-
- //For MuMech_get_heading()
- public class MuMech_MovingAverage
- {
- private double[] store;
- private int storeSize;
- private int nextIndex = 0;
-
- public double value
- {
- get
- {
- double tmp = 0;
- foreach (double i in store)
- {
- tmp += i;
- }
- return tmp / storeSize;
- }
- set
- {
- store[nextIndex] = value;
- nextIndex = (nextIndex + 1) % storeSize;
- }
- }
-
- public MuMech_MovingAverage(int size = 10, double startingValue = 0)
- {
- storeSize = size;
- store = new double[size];
- force(startingValue);
- }
-
- public void force(double newValue)
- {
- for (int i = 0; i < storeSize; i++)
- {
- store[i] = newValue;
- }
- }
-
- public static implicit operator double(MuMech_MovingAverage v)
- {
- return v.value;
- }
-
- public override string ToString()
- {
- return value.ToString();
- }
-
- public string ToString(string format)
- {
- return value.ToString(format);
- }
- }
- //From http://svn.mumech.com/KSP/trunk/MuMechLib/VOID.vesselState.cs
- public static double MuMech_get_heading(Vessel vessel)
- {
- Vector3d CoM;
+ /*
+ * MuMechLib Methods
+ * The methods below are adapted from MuMechLib, © 2013-2014 r4m0n
+ * The following methods are a derivative work of the code from MuMechLib in the MechJeb project.
+ * Used under license.
+ * */
+
+ // Derived from MechJeb2/VesselState.cs
+ public static Quaternion getSurfaceRotation(this Vessel vessel)
+ {
+ Vector3 CoM;
try
{
@@ -217,25 +167,42 @@
}
catch
{
- return double.NaN;
- }
-
- Vector3d up = (CoM - vessel.mainBody.position).normalized;
- Vector3d north = Vector3d.Exclude(
- up,
- (vessel.mainBody.position +
- vessel.mainBody.transform.up * (float)vessel.mainBody.Radius
- ) - CoM).normalized;
-
- Quaternion rotationSurface = Quaternion.LookRotation(north, up);
- Quaternion rotationvesselSurface = Quaternion.Inverse(
- Quaternion.Euler(90, 0, 0) *
- Quaternion.Inverse(vessel.transform.rotation) *
- rotationSurface);
-
- return rotationvesselSurface.eulerAngles.y;
- }
- //From http://svn.mumech.com/KSP/trunk/MuMechLib/MuUtils.cs
+ return new Quaternion();
+ }
+
+ Vector3 bodyPosition = vessel.mainBody.position;
+ Vector3 bodyUp = vessel.mainBody.transform.up;
+
+ Vector3 surfaceUp = (CoM - vessel.mainBody.position).normalized;
+ Vector3 surfaceNorth = Vector3.Exclude(
+ surfaceUp,
+ (bodyPosition + bodyUp * (float)vessel.mainBody.Radius) - CoM
+ ).normalized;
+
+ Quaternion surfaceRotation = Quaternion.LookRotation(surfaceNorth, surfaceUp);
+
+ return Quaternion.Inverse(
+ Quaternion.Euler(90, 0, 0) * Quaternion.Inverse(vessel.GetTransform().rotation) * surfaceRotation
+ );
+ }
+
+ // Derived from MechJeb2/VesselState.cs
+ public static double getSurfaceHeading(this Vessel vessel)
+ {
+ return vessel.getSurfaceRotation().eulerAngles.y;
+ }
+
+ // Derived from MechJeb2/VesselState.cs
+ public static double getSurfacePitch(this Vessel vessel)
+ {
+ Quaternion vesselSurfaceRotation = vessel.getSurfaceRotation();
+
+ return (vesselSurfaceRotation.eulerAngles.x > 180f) ?
+ (360f - vesselSurfaceRotation.eulerAngles.x) :
+ -vesselSurfaceRotation.eulerAngles.x;
+ }
+
+ // Derived from MechJeb2/MuUtils.cs
public static string MuMech_ToSI(
double d, int digits = 3, int MinMagnitude = 0, int MaxMagnitude = int.MaxValue
)
@@ -325,6 +292,10 @@
}
}
+ /*
+ * END MuMecLib METHODS
+ * */
+
public static string ConvertInterval(double seconds)
{
string format_1 = "{0:D1}y {1:D1}d {2:D2}h {3:D2}m {4:D2}.{5:D1}s";
@@ -1015,16 +986,6 @@
return radius;
}
- public static double TryGetLastMass(this Engineer.VesselSimulator.SimManager simManager)
- {
- if (simManager.Stages == null || simManager.Stages.Length <= Staging.lastStage)
- {
- return double.NaN;
- }
-
- return simManager.Stages[Staging.lastStage].totalMass;
- }
-
public static string HumanString(this ExperimentSituations situation)
{
switch (situation)
--- a/VOIDEditorMaster.cs
+++ b/VOIDEditorMaster.cs
@@ -47,7 +47,6 @@
Tools.PostDebugMessage ("VOIDEditorMaster: Waking up.");
this.Core = VOID_EditorCore.Instance;
this.Core.ResetGUI ();
- SimManager.HardReset();
Tools.PostDebugMessage ("VOIDEditorMaster: Awake.");
}
--- a/VOIDFlightMaster.cs
+++ b/VOIDFlightMaster.cs
@@ -47,7 +47,6 @@
Tools.PostDebugMessage ("VOIDFlightMaster: Waking up.");
this.Core = (VOID_Core)VOID_Core.Instance;
this.Core.ResetGUI ();
- SimManager.HardReset();
Tools.PostDebugMessage ("VOIDFlightMaster: Awake.");
}
--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -69,7 +69,7 @@
* Fields
* */
protected string VoidName = "VOID";
- protected string VoidVersion = "0.9.20";
+ protected string VoidVersion = "0.10.0";
protected bool _factoryReset = false;
@@ -134,10 +134,13 @@
public float saveTimer = 0;
protected string defaultSkin = "KSP window 2";
+
[AVOID_SaveValue("defaultSkin")]
protected VOID_SaveValue<string> _skinName;
- protected Dictionary<string, GUISkin> skin_list;
- protected List<string> skinNames;
+ protected int _skinIdx;
+
+ protected Dictionary<string, GUISkin> validSkins;
+ protected string[] skinNames;
protected string[] forbiddenSkins =
{
"PlaqueDialogSkin",
@@ -180,11 +183,18 @@
{
get
{
- if (!this.skinsLoaded || this._skinName == null)
- {
- return AssetBase.GetGUISkin(this.defaultSkin);
- }
- return this.skin_list[this._skinName];
+ if (this.skinsLoaded)
+ {
+ try
+ {
+ return this.validSkins[this._skinName];
+ }
+ catch
+ {
+ }
+ }
+
+ return AssetBase.GetGUISkin(this.defaultSkin);
}
}
@@ -306,12 +316,10 @@
this.ToolbarButton.Destroy();
this.ToolbarButton = null;
}
- if (value == true && this.ToolbarButton == null)
+ if (value == true)
{
this.InitializeToolbarButton();
}
-
- this.SetIconTexture(this.powerState | this.activeState);
_UseToolbarManager.value = value;
}
@@ -457,9 +465,9 @@
if (this.vessel != null)
{
- SimManager.Instance.Gravity = VOID_Core.Instance.vessel.mainBody.gravParameter /
+ SimManager.Gravity = VOID_Core.Instance.vessel.mainBody.gravParameter /
Math.Pow(VOID_Core.Instance.vessel.Radius(), 2);
- SimManager.Instance.TryStartSimulation();
+ SimManager.TryStartSimulation();
}
if (!this.guiRunning)
@@ -594,8 +602,6 @@
public override void DrawConfigurables()
{
- int skinIdx;
-
GUIContent _content;
if (HighLogic.LoadedSceneIsFlight)
@@ -612,33 +618,18 @@
GUILayout.Label("Skin:", GUILayout.ExpandWidth(false));
_content = new GUIContent();
-
- if (skinNames.Contains(this._skinName))
- {
- skinIdx = skinNames.IndexOf(this._skinName);
- }
- else if (skinNames.Contains(this.defaultSkin))
- {
- skinIdx = skinNames.IndexOf(this.defaultSkin);
- }
- else
- {
- skinIdx = 0;
- }
_content.text = "◄";
_content.tooltip = "Select previous skin";
if (GUILayout.Button(_content, GUILayout.ExpandWidth(true)))
{
this.GUIStylesLoaded = false;
- skinIdx--;
- if (skinIdx < 0)
- skinIdx = skinNames.Count - 1;
+ this._skinIdx--;
Tools.PostDebugMessage(string.Format(
"{0}: new this._skinIdx = {1} :: skin_list.Count = {2}",
this.GetType().Name,
this._skinName,
- this.skin_list.Count
+ this.validSkins.Count
));
}
@@ -651,20 +642,24 @@
if (GUILayout.Button(_content, GUILayout.ExpandWidth(true)))
{
this.GUIStylesLoaded = false;
- skinIdx++;
- if (skinIdx >= skinNames.Count)
- skinIdx = 0;
+ this._skinIdx++;
Tools.PostDebugMessage(string.Format(
"{0}: new this._skinIdx = {1} :: skin_list.Count = {2}",
this.GetType().Name,
this._skinName,
- this.skin_list.Count
+ this.validSkins.Count
));
}
- if (this._skinName != skinNames[skinIdx])
- {
- this._skinName = skinNames[skinIdx];
+ this._skinIdx %= this.skinNames.Length;
+ if (this._skinIdx < 0)
+ {
+ this._skinIdx += this.skinNames.Length;
+ }
+
+ if (this._skinName != skinNames[this._skinIdx])
+ {
+ this._skinName.value = skinNames[this._skinIdx];
}
GUILayout.EndHorizontal();
@@ -767,7 +762,7 @@
)
);
- this.skin_list = Resources.FindObjectsOfTypeAll(typeof(GUISkin))
+ this.validSkins = Resources.FindObjectsOfTypeAll(typeof(GUISkin))
.Where(s => !this.forbiddenSkins.Contains(s.name))
.Select(s => s as GUISkin)
.GroupBy(s => s.name)
@@ -777,19 +772,33 @@
Tools.PostDebugMessage(string.Format(
"{0}: loaded {1} GUISkins.",
this.GetType().Name,
- this.skin_list.Count
+ this.validSkins.Count
));
- this.skinNames = this.skin_list.Keys.ToList();
- this.skinNames.Sort();
-
- if (this._skinName == null || !this.skinNames.Contains(this._skinName))
- {
- this._skinName = this.defaultSkin;
- Tools.PostDebugMessage(string.Format(
- "{0}: resetting _skinIdx to default.",
- this.GetType().Name
- ));
+ this.skinNames = this.validSkins.Keys.ToArray();
+ Array.Sort(this.skinNames);
+
+ int defaultIdx = int.MinValue;
+
+ for (int i = 0; i < this.skinNames.Length; i++)
+ {
+ if (this.skinNames[i] == this._skinName)
+ {
+ this._skinIdx = i;
+ }
+ if (this.skinNames[i] == this.defaultSkin)
+ {
+ defaultIdx = i;
+ }
+ if (this._skinIdx != int.MinValue && defaultIdx != int.MinValue)
+ {
+ break;
+ }
+ }
+
+ if (this._skinIdx == int.MinValue)
+ {
+ this._skinIdx = defaultIdx;
}
Tools.PostDebugMessage(string.Format(
@@ -860,6 +869,8 @@
{
this.ToggleMainWindow();
};
+
+ Tools.PostDebugMessage(string.Format("{0}: Toolbar Button initialized.", this.GetType().Name));
}
protected void ToggleMainWindow()
@@ -891,14 +902,12 @@
protected void SetIconTexture(string texturePath)
{
- if (this.UseToolbarManager && this.ToolbarButton != null)
+ if (this.ToolbarButton != null)
{
this.ToolbarButton.TexturePath = texturePath;
}
- else
- {
- this.VOIDIconTexture = GameDatabase.Instance.GetTexture(texturePath, false);
- }
+
+ this.VOIDIconTexture = GameDatabase.Instance.GetTexture(texturePath, false);
}
protected void CheckAndSave()
@@ -957,11 +966,12 @@
this._Active.value = true;
this._skinName = this.defaultSkin;
-
- this.VOIDIconOnActivePath = "VOID/Textures/void_icon_light_glow";
- this.VOIDIconOnInactivePath = "VOID/Textures/void_icon_dark_glow";
- this.VOIDIconOffActivePath = "VOID/Textures/void_icon_light";
- this.VOIDIconOffInactivePath = "VOID/Textures/void_icon_dark";
+ this._skinIdx = int.MinValue;
+
+ this.VOIDIconOnInactivePath = "VOID/Textures/void_icon_light_glow";
+ this.VOIDIconOnActivePath = "VOID/Textures/void_icon_dark_glow";
+ this.VOIDIconOffInactivePath = "VOID/Textures/void_icon_light";
+ this.VOIDIconOffActivePath = "VOID/Textures/void_icon_dark";
this.UseToolbarManager = false;
@@ -978,6 +988,25 @@
Active = 8
}
}
+
+ public static partial class VOID_Data
+ {
+ public static VOID_Core core
+ {
+ get
+ {
+ return VOID_Core.Instance;
+ }
+ }
+
+ public static double KerbinGee
+ {
+ get
+ {
+ return core.Kerbin.gravParameter / Math.Pow(core.Kerbin.Radius, 2);
+ }
+ }
+ }
}
--- a/VOID_DataValue.cs
+++ b/VOID_DataValue.cs
@@ -235,19 +235,26 @@
public virtual int DoGUIHorizontalPrec(int digits)
{
- float magnitude;
- float magLimit;
-
- magnitude = (float)Math.Log10(Math.Abs(this));
-
- magLimit = Mathf.Max(magnitude, 6f);
- magLimit = Mathf.Round((float)Math.Ceiling(magLimit / 3f) * 3f);
+ double magnitude;
+ double magLimit;
+
+ magnitude = Math.Log10(Math.Abs((double)this));
+
+ magLimit = Math.Max(Math.Abs(magnitude), 3d) + 3d;
+ magLimit = Math.Round(Math.Ceiling(magLimit / 3f)) * 3d;
GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
GUILayout.Label(this.Label + "ⁱ:", GUILayout.ExpandWidth(true));
GUILayout.FlexibleSpace();
- GUILayout.Label(this.ValueUnitString(3, int.MinValue, (int)magnitude - digits), GUILayout.ExpandWidth(false));
+ if (magnitude >= 0)
+ {
+ GUILayout.Label(this.ValueUnitString(3, int.MinValue, (int)magnitude - digits), GUILayout.ExpandWidth(false));
+ }
+ else
+ {
+ GUILayout.Label(this.ValueUnitString(3, (int)magnitude + digits, int.MaxValue), GUILayout.ExpandWidth(false));
+ }
GUILayout.EndHorizontal();
if (Event.current.type == EventType.mouseUp)
@@ -255,6 +262,11 @@
Rect lastRect = GUILayoutUtility.GetLastRect();
if (lastRect.Contains(Event.current.mousePosition))
{
+ Tools.PostDebugMessage(string.Format("{0}: Changing digits from {1} within magLimit {2}.",
+ this.GetType().Name,
+ digits,
+ magLimit));
+
if (Event.current.button == 0)
{
digits = (digits + 3) % (int)magLimit;
@@ -262,11 +274,22 @@
else if (Event.current.button == 1)
{
digits = (digits - 3) % (int)magLimit;
- if (digits < 0)
- {
- digits = (int)magLimit - 3;
- }
}
+
+ if (digits < 0)
+ {
+ digits += (int)magLimit;
+ }
+
+ Tools.PostDebugMessage(string.Format("{0}: Changed digits to {1}." +
+ "\n\tNew minMagnitude: {2}, maxMagnitude: {3}" +
+ "\n\tMagnitude: {4}",
+ this.GetType().Name,
+ digits,
+ magnitude >= 0 ? int.MinValue : (int)magnitude - 4 + digits,
+ magnitude >= 0 ? (int)magnitude - digits : int.MaxValue,
+ magnitude
+ ));
}
}
@@ -278,6 +301,7 @@
{
public VOID_DoubleValue(string Label, Func<double> ValueFunc, string Units) : base(Label, ValueFunc, Units) {}
}
+
public class VOID_FloatValue : VOID_NumValue<float>
{
public VOID_FloatValue(string Label, Func<float> ValueFunc, string Units) : base(Label, ValueFunc, Units) {}
--- a/VOID_EditorCore.cs
+++ b/VOID_EditorCore.cs
@@ -122,9 +122,8 @@
if (EditorLogic.SortedShipList.Count > 0)
{
- SimManager.Instance.Gravity = this.Kerbin.gravParameter /
- Math.Pow(this.Kerbin.Radius, 2);
- SimManager.Instance.TryStartSimulation();
+ SimManager.Gravity = VOID_Data.KerbinGee;
+ SimManager.TryStartSimulation();
}
this.CheckAndSave ();
--- a/VOID_EditorHUD.cs
+++ b/VOID_EditorHUD.cs
@@ -134,9 +134,9 @@
public override void DrawGUI()
{
- SimManager.Instance.RequestSimulation();
-
- if (SimManager.Instance.LastStage == null)
+ SimManager.RequestSimulation();
+
+ if (SimManager.LastStage == null)
{
return;
}
@@ -166,7 +166,7 @@
labelStyle.normal.textColor = textColors [ColorIndex];
hudString.Append("Total Mass: ");
- hudString.Append(SimManager.Instance.LastStage.totalMass.ToString("F3"));
+ hudString.Append(SimManager.LastStage.totalMass.ToString("F3"));
hudString.Append('t');
hudString.Append(' ');
@@ -177,19 +177,19 @@
hudString.Append('\n');
hudString.Append("Total Delta-V: ");
- hudString.Append(Tools.MuMech_ToSI(SimManager.Instance.LastStage.totalDeltaV));
+ hudString.Append(Tools.MuMech_ToSI(SimManager.LastStage.totalDeltaV));
hudString.Append("m/s");
hudString.Append('\n');
hudString.Append("Bottom Stage Delta-V");
- hudString.Append(Tools.MuMech_ToSI(SimManager.Instance.LastStage.deltaV));
+ hudString.Append(Tools.MuMech_ToSI(SimManager.LastStage.deltaV));
hudString.Append("m/s");
hudString.Append('\n');
hudString.Append("Bottom Stage T/W Ratio: ");
- hudString.Append(SimManager.Instance.LastStage.thrustToWeight.ToString("F3"));
+ hudString.Append(SimManager.LastStage.thrustToWeight.ToString("F3"));
if (this.CoMmarker.gameObject.activeInHierarchy && this.CoTmarker.gameObject.activeInHierarchy)
{
--- a/VOID_HUD.cs
+++ b/VOID_HUD.cs
@@ -20,10 +20,12 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
+using Engineer.VesselSimulator;
using KSP;
using UnityEngine;
using System;
using System.Collections.Generic;
+using System.Text;
namespace VOID
{
@@ -33,9 +35,20 @@
* Fields
* */
[AVOID_SaveValue("colorIndex")]
- protected VOID_SaveValue<int> _colorIndex = 0;
-
- protected List<Color> textColors = new List<Color>();
+ protected VOID_SaveValue<int> _colorIndex;
+
+ protected List<Color> textColors;
+
+ protected Rect leftHUDdefaultPos;
+ protected Rect rightHUDdefaultPos;
+
+ [AVOID_SaveValue("leftHUDPos")]
+ protected VOID_SaveValue<Rect> leftHUDPos;
+ [AVOID_SaveValue("rightHUDPos")]
+ protected VOID_SaveValue<Rect> rightHUDPos;
+
+ [AVOID_SaveValue("positionsLocked")]
+ protected VOID_SaveValue<bool> positionsLocked;
/*
* Properties
@@ -66,6 +79,10 @@
this._Name = "Heads-Up Display";
this._Active.value = true;
+
+ this._colorIndex = 0;
+
+ this.textColors = new List<Color>();
this.textColors.Add(Color.green);
this.textColors.Add(Color.black);
@@ -77,60 +94,229 @@
this.textColors.Add(Color.cyan);
this.textColors.Add(Color.magenta);
- VOID_Core.Instance.LabelStyles["hud"] = new GUIStyle();
- VOID_Core.Instance.LabelStyles["hud"].normal.textColor = this.textColors [this.ColorIndex];
+ this.leftHUDdefaultPos = new Rect(Screen.width * .375f - 300f, 0f, 300f, 90f);
+ this.leftHUDPos = new Rect(this.leftHUDdefaultPos);
+
+ this.rightHUDdefaultPos = new Rect(Screen.width * .625f, 0f, 300f, 90f);
+ this.rightHUDPos = new Rect(this.rightHUDdefaultPos);
+
+ this.positionsLocked = true;
Tools.PostDebugMessage ("VOID_HUD: Constructed.");
}
+ protected void leftHUDWindow(int id)
+ {
+ StringBuilder leftHUD;
+
+ leftHUD = new StringBuilder();
+
+ VOID_Core.Instance.LabelStyles["hud"].alignment = TextAnchor.UpperRight;
+
+ if (VOID_Core.Instance.powerAvailable)
+ {
+ leftHUD.AppendFormat("Primary: {0} Inc: {1}",
+ VOID_Data.primaryName.ValueUnitString(),
+ VOID_Data.orbitInclination.ValueUnitString("F3")
+ );
+ leftHUD.AppendFormat("\nObt Alt: {0} Obt Vel: {1}",
+ VOID_Data.orbitAltitude.ToSIString(),
+ VOID_Data.orbitVelocity.ToSIString()
+ );
+ leftHUD.AppendFormat("\nAp: {0} ETA {1}",
+ VOID_Data.orbitApoAlt.ToSIString(),
+ VOID_Data.timeToApo.ValueUnitString()
+ );
+ leftHUD.AppendFormat("\nPe: {0} ETA {1}",
+ VOID_Data.oribtPeriAlt.ToSIString(),
+ VOID_Data.timeToPeri.ValueUnitString()
+ );
+ leftHUD.AppendFormat("\nTot Δv: {0} Stg Δv: {1}",
+ VOID_Data.totalDeltaV.ToSIString(2),
+ VOID_Data.stageDeltaV.ToSIString(2)
+ );
+ }
+ else
+ {
+ VOID_Core.Instance.LabelStyles["hud"].normal.textColor = Color.red;
+ leftHUD.Append(string.Intern("-- POWER LOST --"));
+ }
+
+ GUILayout.Label(leftHUD.ToString(), VOID_Core.Instance.LabelStyles["hud"], GUILayout.ExpandWidth(true));
+
+ if (!this.positionsLocked)
+ {
+ GUI.DragWindow();
+ }
+
+ GUI.BringWindowToBack(id);
+ }
+
+ protected void rightHUDWindow(int id)
+ {
+ StringBuilder rightHUD;
+
+ rightHUD = new StringBuilder();
+
+ VOID_Core.Instance.LabelStyles["hud"].alignment = TextAnchor.UpperLeft;
+
+ if (VOID_Core.Instance.powerAvailable)
+ {
+ rightHUD.AppendFormat("Biome: {0} Sit: {1}",
+ VOID_Data.currBiome.ValueUnitString(),
+ VOID_Data.expSituation.ValueUnitString()
+ );
+ rightHUD.AppendFormat("\nSrf Alt: {0} Srf Vel: {1}",
+ VOID_Data.trueAltitude.ToSIString(),
+ VOID_Data.surfVelocity.ToSIString()
+ );
+ rightHUD.AppendFormat("\nVer: {0} Hor: {1}",
+ VOID_Data.vertVelocity.ToSIString(),
+ VOID_Data.horzVelocity.ToSIString()
+ );
+ rightHUD.AppendFormat("\nLat: {0} Lon: {1}",
+ VOID_Data.surfLatitude.ValueUnitString(),
+ VOID_Data.surfLongitude.ValueUnitString()
+ );
+ rightHUD.AppendFormat("\nHdg: {0} Pit: {1}",
+ VOID_Data.vesselHeading.ValueUnitString(),
+ VOID_Data.vesselPitch.ToSIString(2)
+ );
+ }
+ else
+ {
+ VOID_Core.Instance.LabelStyles["hud"].normal.textColor = Color.red;
+ rightHUD.Append(string.Intern("-- POWER LOST --"));
+ }
+
+
+ GUILayout.Label(rightHUD.ToString(), VOID_Core.Instance.LabelStyles["hud"], GUILayout.ExpandWidth(true));
+
+ if (!this.positionsLocked)
+ {
+ GUI.DragWindow();
+ }
+
+ GUI.BringWindowToBack(id);
+ }
+
public override void DrawGUI()
{
- GUI.skin = VOID_Core.Instance.Skin;
-
- if (VOID_Core.Instance.powerAvailable)
- {
- VOID_Core.Instance.LabelStyles["hud"].normal.textColor = textColors [ColorIndex];
-
- GUI.Label (
- new Rect ((Screen.width * .2083f), 0, 300f, 70f),
- "Obt Alt: " + Tools.MuMech_ToSI (vessel.orbit.altitude) + "m" +
- " Obt Vel: " + Tools.MuMech_ToSI (vessel.orbit.vel.magnitude) + "m/s" +
- "\nAp: " + Tools.MuMech_ToSI (vessel.orbit.ApA) + "m" +
- " ETA " + Tools.ConvertInterval (vessel.orbit.timeToAp) +
- "\nPe: " + Tools.MuMech_ToSI (vessel.orbit.PeA) + "m" +
- " ETA " + Tools.ConvertInterval (vessel.orbit.timeToPe) +
- "\nInc: " + vessel.orbit.inclination.ToString ("F3") + "°" +
- "\nPrimary: " + vessel.mainBody.bodyName,
- VOID_Core.Instance.LabelStyles["hud"]);
- // Toadicus edit: Added "Biome: " line to surf/atmo HUD
- GUI.Label (
- new Rect ((Screen.width * .625f), 0, 300f, 90f),
- "Srf Alt: " + Tools.MuMech_ToSI (Tools.TrueAltitude (vessel)) + "m" +
- " Srf Vel: " + Tools.MuMech_ToSI (vessel.srf_velocity.magnitude) + "m/s" +
- "\nVer: " + Tools.MuMech_ToSI (vessel.verticalSpeed) + "m/s" +
- " Hor: " + Tools.MuMech_ToSI (vessel.horizontalSrfSpeed) + "m/s" +
- "\nLat: " + Tools.GetLatitudeString (vessel, "F3") +
- " Lon: " + Tools.GetLongitudeString (vessel, "F3") +
- "\nHdg: " + Tools.MuMech_get_heading (vessel).ToString ("F2") + "° " +
- Tools.get_heading_text (Tools.MuMech_get_heading (vessel)) +
- "\nBiome: " + Tools.Toadicus_GetAtt (vessel).name +
- " Sit: " + vessel.GetExperimentSituation().HumanString(),
- VOID_Core.Instance.LabelStyles["hud"]);
- }
- else
- {
- VOID_Core.Instance.LabelStyles["hud"].normal.textColor = Color.red;
- GUI.Label (new Rect ((Screen.width * .2083f), 0, 300f, 70f), "-- POWER LOST --", VOID_Core.Instance.LabelStyles["hud"]);
- GUI.Label (new Rect ((Screen.width * .625f), 0, 300f, 70f), "-- POWER LOST --", VOID_Core.Instance.LabelStyles["hud"]);
- }
+ if (!VOID_Core.Instance.LabelStyles.ContainsKey("hud"))
+ {
+ VOID_Core.Instance.LabelStyles["hud"] = new GUIStyle(GUI.skin.label);
+ }
+
+ VOID_Core.Instance.LabelStyles["hud"].normal.textColor = textColors [ColorIndex];
+
+ if ((TimeWarp.WarpMode == TimeWarp.Modes.LOW) || (TimeWarp.CurrentRate <= TimeWarp.MaxPhysicsRate))
+ {
+ SimManager.RequestSimulation();
+ }
+
+ this.leftHUDPos.value = GUI.Window(
+ VOID_Core.Instance.windowID,
+ this.leftHUDPos,
+ this.leftHUDWindow,
+ GUIContent.none,
+ GUIStyle.none
+ );
+
+ this.rightHUDPos.value = GUI.Window(
+ VOID_Core.Instance.windowID,
+ this.rightHUDPos,
+ this.rightHUDWindow,
+ GUIContent.none,
+ GUIStyle.none
+ );
}
public override void DrawConfigurables()
{
- if (GUILayout.Button ("Change HUD color", GUILayout.ExpandWidth (false)))
+ if (GUILayout.Button (string.Intern("Change HUD color"), GUILayout.ExpandWidth (false)))
{
++this.ColorIndex;
}
+
+ if (GUILayout.Button(string.Intern("Reset HUD Positions"), GUILayout.ExpandWidth(false)))
+ {
+ this.leftHUDPos = new Rect(this.leftHUDdefaultPos);
+ this.rightHUDPos = new Rect(this.rightHUDdefaultPos);
+ }
+
+ this.positionsLocked = GUILayout.Toggle(this.positionsLocked,
+ string.Intern("Lock HUD Positions"),
+ GUILayout.ExpandWidth(false));
+ }
+ }
+
+ public static partial class VOID_Data
+ {
+ public static readonly VOID_StrValue expSituation = new VOID_StrValue(
+ "Situation",
+ new Func<string> (() => VOID_Core.Instance.vessel.GetExperimentSituation().HumanString())
+ );
+
+ public static readonly VOID_DoubleValue vesselPitch = new VOID_DoubleValue(
+ "Pitch",
+ () => core.vessel.getSurfacePitch(),
+ "°"
+ );
+
+ public static readonly VOID_DoubleValue stageMassFlow = new VOID_DoubleValue(
+ "Stage Mass Flow",
+ delegate()
+ {
+ if (SimManager.LastStage == null)
+ {
+ return double.NaN;
+ }
+
+ double stageIsp = SimManager.LastStage.isp;
+ double stageThrust = SimManager.LastStage.actualThrust;
+
+ return stageThrust / (stageIsp * KerbinGee);
+ },
+ "Mg/s"
+ );
+
+ public static readonly VOID_DoubleValue burnTimeCompleteAtNode = new VOID_DoubleValue(
+ "Full burn time to complete at node",
+ delegate()
+ {
+ if (SimManager.LastStage == null)
+ {
+ return double.NaN;
+ }
+
+ double nextManeuverDV = core.vessel.patchedConicSolver.maneuverNodes[0].DeltaV.magnitude;
+ double stageThrust = SimManager.LastStage.actualThrust;
+
+ return burnTime(nextManeuverDV, totalMass, stageMassFlow, stageThrust);
+ },
+ "s"
+ );
+
+ public static readonly VOID_DoubleValue burnTimeHalfDoneAtNode = new VOID_DoubleValue(
+ "Full burn time to be half done at node",
+ delegate()
+ {
+ if (SimManager.LastStage == null)
+ {
+ return double.NaN;
+ }
+
+ double nextManeuverDV = core.vessel.patchedConicSolver.maneuverNodes[0].DeltaV.magnitude / 2d;
+ double stageThrust = SimManager.LastStage.actualThrust;
+
+ return burnTime(nextManeuverDV, totalMass, stageMassFlow, stageThrust);
+ },
+ "s"
+ );
+
+ private static double burnTime(double deltaV, double initialMass, double massFlow, double thrust)
+ {
+ return initialMass / massFlow * (Math.Exp(deltaV * massFlow / thrust) - 1d);
}
}
}
--- a/VOID_Orbital.cs
+++ b/VOID_Orbital.cs
@@ -118,52 +118,52 @@
public static partial class VOID_Data
{
- public static VOID_StrValue primaryName = new VOID_StrValue (
+ public static readonly VOID_StrValue primaryName = new VOID_StrValue (
VOIDLabels.void_primary,
new Func<string> (() => VOID_Core.Instance.vessel.mainBody.name)
);
- public static VOID_DoubleValue orbitAltitude = new VOID_DoubleValue (
+ public static readonly VOID_DoubleValue orbitAltitude = new VOID_DoubleValue (
"Altitude (ASL)",
new Func<double> (() => VOID_Core.Instance.vessel.orbit.altitude),
"m"
);
- public static VOID_DoubleValue orbitVelocity = new VOID_DoubleValue (
+ public static readonly VOID_DoubleValue orbitVelocity = new VOID_DoubleValue (
VOIDLabels.void_velocity,
new Func<double> (() => VOID_Core.Instance.vessel.orbit.vel.magnitude),
"m/s"
);
- public static VOID_DoubleValue orbitApoAlt = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue orbitApoAlt = new VOID_DoubleValue(
VOIDLabels.void_apoapsis,
new Func<double>(() => VOID_Core.Instance.vessel.orbit.ApA),
"m"
);
- public static VOID_DoubleValue oribtPeriAlt = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue oribtPeriAlt = new VOID_DoubleValue(
VOIDLabels.void_periapsis,
new Func<double>(() => VOID_Core.Instance.vessel.orbit.PeA),
"m"
);
- public static VOID_StrValue timeToApo = new VOID_StrValue(
+ public static readonly VOID_StrValue timeToApo = new VOID_StrValue(
"Time to Apoapsis",
new Func<string>(() => Tools.ConvertInterval(VOID_Core.Instance.vessel.orbit.timeToAp))
);
- public static VOID_StrValue timeToPeri = new VOID_StrValue(
+ public static readonly VOID_StrValue timeToPeri = new VOID_StrValue(
"Time to Periapsis",
new Func<string>(() => Tools.ConvertInterval(VOID_Core.Instance.vessel.orbit.timeToPe))
);
- public static VOID_DoubleValue orbitInclination = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue orbitInclination = new VOID_DoubleValue(
"Inclination",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.inclination),
"°"
);
- public static VOID_DoubleValue gravityAccel = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue gravityAccel = new VOID_DoubleValue(
"Gravity",
delegate()
{
@@ -175,54 +175,54 @@
"m/s²"
);
- public static VOID_StrValue orbitPeriod = new VOID_StrValue(
+ public static readonly VOID_StrValue orbitPeriod = new VOID_StrValue(
"Period",
new Func<string>(() => Tools.ConvertInterval(VOID_Core.Instance.vessel.orbit.period))
);
- public static VOID_DoubleValue semiMajorAxis = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue semiMajorAxis = new VOID_DoubleValue(
"Semi-Major Axis",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.semiMajorAxis),
"m"
);
- public static VOID_DoubleValue eccentricity = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue eccentricity = new VOID_DoubleValue(
"Eccentricity",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.eccentricity),
""
);
- public static VOID_DoubleValue meanAnomaly = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue meanAnomaly = new VOID_DoubleValue(
"Mean Anomaly",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.meanAnomaly * 180d / Math.PI),
"°"
);
- public static VOID_DoubleValue trueAnomaly = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue trueAnomaly = new VOID_DoubleValue(
"True Anomaly",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.trueAnomaly),
"°"
);
- public static VOID_DoubleValue eccAnomaly = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue eccAnomaly = new VOID_DoubleValue(
"Eccentric Anomaly",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.eccentricAnomaly * 180d / Math.PI),
"°"
);
- public static VOID_DoubleValue longitudeAscNode = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue longitudeAscNode = new VOID_DoubleValue(
"Long. Ascending Node",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.LAN),
"°"
);
- public static VOID_DoubleValue argumentPeriapsis = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue argumentPeriapsis = new VOID_DoubleValue(
"Argument of Periapsis",
new Func<double>(() => VOID_Core.Instance.vessel.orbit.argumentOfPeriapsis),
"°"
);
- public static VOID_DoubleValue localSiderealLongitude = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue localSiderealLongitude = new VOID_DoubleValue(
"Local Sidereal Longitude",
new Func<double>(() => Tools.FixDegreeDomain(
VOID_Core.Instance.vessel.longitude + VOID_Core.Instance.vessel.orbit.referenceBody.rotationAngle)),
--- a/VOID_Rendezvous.cs
+++ b/VOID_Rendezvous.cs
@@ -59,13 +59,13 @@
if (FlightGlobals.fetch.VesselTarget != null)
{
//a KSP Target (body or vessel) is selected
- if (FlightGlobals.fetch.vesselTargetMode == FlightGlobals.VesselTargetModes.Direction)
+ if (FlightGlobals.fetch.vesselTargetMode == VesselTargetModes.Direction)
{
//a Body is selected
rendezbody = vessel.patchedConicSolver.targetBody;
display_rendezvous_info(null, rendezbody);
}
- else if (FlightGlobals.fetch.vesselTargetMode == FlightGlobals.VesselTargetModes.DirectionAndVelocity)
+ else if (FlightGlobals.fetch.vesselTargetMode == VesselTargetModes.DirectionAndVelocity)
{
//a Vessel is selected
rendezvessel = FlightGlobals.fetch.VesselTarget.GetVessel();
--- a/VOID_SurfAtmo.cs
+++ b/VOID_SurfAtmo.cs
@@ -100,7 +100,7 @@
public static partial class VOID_Data
{
- public static VOID_DoubleValue trueAltitude = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue trueAltitude = new VOID_DoubleValue(
"Altitude (true)",
delegate()
{
@@ -114,21 +114,21 @@
"m"
);
- public static VOID_StrValue surfLatitude = new VOID_StrValue(
+ public static readonly VOID_StrValue surfLatitude = new VOID_StrValue(
"Latitude",
new Func<string> (() => Tools.GetLatitudeString(VOID_Core.Instance.vessel))
);
- public static VOID_StrValue surfLongitude = new VOID_StrValue(
+ public static readonly VOID_StrValue surfLongitude = new VOID_StrValue(
"Longitude",
new Func<string> (() => Tools.GetLongitudeString(VOID_Core.Instance.vessel))
);
- public static VOID_StrValue vesselHeading = new VOID_StrValue(
+ public static readonly VOID_StrValue vesselHeading = new VOID_StrValue(
"Heading",
delegate()
{
- double heading = Tools.MuMech_get_heading(VOID_Core.Instance.vessel);
+ double heading = core.vessel.getSurfaceHeading();
string cardinal = Tools.get_heading_text(heading);
return string.Format(
@@ -139,55 +139,55 @@
}
);
- public static VOID_DoubleValue terrainElevation = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue terrainElevation = new VOID_DoubleValue(
"Terrain elevation",
new Func<double> (() => VOID_Core.Instance.vessel.terrainAltitude),
"m"
);
- public static VOID_DoubleValue surfVelocity = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue surfVelocity = new VOID_DoubleValue(
"Surface velocity",
new Func<double> (() => VOID_Core.Instance.vessel.srf_velocity.magnitude),
"m/s"
);
- public static VOID_DoubleValue vertVelocity = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue vertVelocity = new VOID_DoubleValue(
"Vertical speed",
new Func<double> (() => VOID_Core.Instance.vessel.verticalSpeed),
"m/s"
);
- public static VOID_DoubleValue horzVelocity = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue horzVelocity = new VOID_DoubleValue(
"Horizontal speed",
new Func<double> (() => VOID_Core.Instance.vessel.horizontalSrfSpeed),
"m/s"
);
- public static VOID_FloatValue temperature = new VOID_FloatValue(
+ public static readonly VOID_FloatValue temperature = new VOID_FloatValue(
"Temperature",
new Func<float> (() => VOID_Core.Instance.vessel.flightIntegrator.getExternalTemperature()),
"°C"
);
- public static VOID_DoubleValue atmDensity = new VOID_DoubleValue (
+ public static readonly VOID_DoubleValue atmDensity = new VOID_DoubleValue (
"Atmosphere Density",
new Func<double> (() => VOID_Core.Instance.vessel.atmDensity * 1000f),
"g/m³"
);
- public static VOID_DoubleValue atmPressure = new VOID_DoubleValue (
+ public static readonly VOID_DoubleValue atmPressure = new VOID_DoubleValue (
"Pressure",
new Func<double> (() => VOID_Core.Instance.vessel.staticPressure),
"atm"
);
- public static VOID_FloatValue atmLimit = new VOID_FloatValue(
+ public static readonly VOID_FloatValue atmLimit = new VOID_FloatValue(
"Atmosphere Limit",
new Func<float> (() => VOID_Core.Instance.vessel.mainBody.maxAtmosphereAltitude),
"m"
);
- public static VOID_StrValue currBiome = new VOID_StrValue(
+ public static readonly VOID_StrValue currBiome = new VOID_StrValue(
"Biome",
new Func<string> (() => Tools.Toadicus_GetAtt(VOID_Core.Instance.vessel).name)
);
--- a/VOID_VesselInfo.cs
+++ b/VOID_VesselInfo.cs
@@ -43,7 +43,7 @@
if ((TimeWarp.WarpMode == TimeWarp.Modes.LOW) || (TimeWarp.CurrentRate <= TimeWarp.MaxPhysicsRate))
{
- SimManager.Instance.RequestSimulation();
+ SimManager.RequestSimulation();
}
GUILayout.BeginVertical();
@@ -53,55 +53,29 @@
VOID_Core.Instance.LabelStyles["center_bold"],
GUILayout.ExpandWidth(true));
- Tools.PostDebugMessage("Starting VesselInfo window.");
-
VOID_Data.geeForce.DoGUIHorizontal ("F2");
- Tools.PostDebugMessage("GeeForce done.");
-
VOID_Data.partCount.DoGUIHorizontal ();
- Tools.PostDebugMessage("PartCount done.");
-
VOID_Data.totalMass.DoGUIHorizontal ("F1");
- Tools.PostDebugMessage("TotalMass done.");
-
VOID_Data.resourceMass.DoGUIHorizontal ("F1");
- Tools.PostDebugMessage("ResourceMass done.");
-
VOID_Data.stageDeltaV.DoGUIHorizontal (3, false);
- Tools.PostDebugMessage("Stage deltaV done.");
-
VOID_Data.totalDeltaV.DoGUIHorizontal (3, false);
- Tools.PostDebugMessage("Total deltaV done.");
-
VOID_Data.mainThrottle.DoGUIHorizontal ("F0");
- Tools.PostDebugMessage("MainThrottle done.");
-
VOID_Data.currmaxThrust.DoGUIHorizontal ();
- Tools.PostDebugMessage("CurrMaxThrust done.");
-
VOID_Data.currmaxThrustWeight.DoGUIHorizontal ();
- Tools.PostDebugMessage("CurrMaxTWR done.");
-
VOID_Data.surfaceThrustWeight.DoGUIHorizontal ("F2");
- Tools.PostDebugMessage("surfaceTWR done.");
-
VOID_Data.intakeAirStatus.DoGUIHorizontal();
- Tools.PostDebugMessage("intakeAirStatus done.");
-
GUILayout.EndVertical();
-
- Tools.PostDebugMessage("VesselInfo window done.");
GUI.DragWindow();
}
@@ -109,25 +83,33 @@
public static partial class VOID_Data
{
- public static VOID_DoubleValue geeForce = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue geeForce = new VOID_DoubleValue(
"G-force",
new Func<double>(() => VOID_Core.Instance.vessel.geeForce),
"gees"
);
- public static VOID_IntValue partCount = new VOID_IntValue(
+ public static readonly VOID_IntValue partCount = new VOID_IntValue(
"Parts",
new Func<int>(() => VOID_Core.Instance.vessel.Parts.Count),
""
);
- public static VOID_DoubleValue totalMass = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue totalMass = new VOID_DoubleValue(
"Total Mass",
- new Func<double> (() => SimManager.Instance.TryGetLastMass()),
+ delegate()
+ {
+ if (SimManager.LastStage == null)
+ {
+ return double.NaN;
+ }
+
+ return SimManager.LastStage.totalMass;
+ },
"tons"
);
- public static VOID_DoubleValue resourceMass = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue resourceMass = new VOID_DoubleValue(
"Resource Mass",
delegate()
{
@@ -141,45 +123,45 @@
"tons"
);
- public static VOID_DoubleValue stageDeltaV = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue stageDeltaV = new VOID_DoubleValue(
"DeltaV (Current Stage)",
delegate()
{
- if (SimManager.Instance.Stages == null ||
- SimManager.Instance.Stages.Length <= Staging.lastStage
+ if (SimManager.Stages == null ||
+ SimManager.Stages.Length <= Staging.lastStage
)
return double.NaN;
- return SimManager.Instance.Stages[Staging.lastStage].deltaV;
+ return SimManager.Stages[Staging.lastStage].deltaV;
},
"m/s"
);
- public static VOID_DoubleValue totalDeltaV = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue totalDeltaV = new VOID_DoubleValue(
"DeltaV (Total)",
delegate()
{
- if (SimManager.Instance.Stages == null)
+ if (SimManager.Stages == null)
return double.NaN;
- return SimManager.Instance.LastStage.totalDeltaV;
+ return SimManager.LastStage.totalDeltaV;
},
"m/s"
);
- public static VOID_FloatValue mainThrottle = new VOID_FloatValue(
+ public static readonly VOID_FloatValue mainThrottle = new VOID_FloatValue(
"Throttle",
new Func<float>(() => VOID_Core.Instance.vessel.ctrlState.mainThrottle * 100f),
"%"
);
- public static VOID_StrValue currmaxThrust = new VOID_StrValue(
+ public static readonly VOID_StrValue currmaxThrust = new VOID_StrValue(
"Thrust (curr/max)",
delegate()
{
- if (SimManager.Instance.Stages == null)
+ if (SimManager.Stages == null)
return "N/A";
- double currThrust = SimManager.Instance.LastStage.actualThrust;
- double maxThrust = SimManager.Instance.LastStage.thrust;
+ double currThrust = SimManager.LastStage.actualThrust;
+ double maxThrust = SimManager.LastStage.thrust;
return string.Format(
"{0} / {1}",
@@ -189,16 +171,16 @@
}
);
- public static VOID_StrValue currmaxThrustWeight = new VOID_StrValue(
+ public static readonly VOID_StrValue currmaxThrustWeight = new VOID_StrValue(
"T:W (curr/max)",
delegate()
{
- if (SimManager.Instance.Stages == null)
+ if (SimManager.Stages == null || SimManager.LastStage == null)
return "N/A";
- double currThrust = SimManager.Instance.LastStage.actualThrust;
- double maxThrust = SimManager.Instance.LastStage.thrust;
- double mass = SimManager.Instance.TryGetLastMass();
+ double currThrust = SimManager.LastStage.actualThrust;
+ double maxThrust = SimManager.LastStage.thrust;
+ double mass = SimManager.LastStage.totalMass;
double gravity = VOID_Core.Instance.vessel.mainBody.gravParameter /
Math.Pow(
VOID_Core.Instance.vessel.mainBody.Radius + VOID_Core.Instance.vessel.altitude,
@@ -214,15 +196,15 @@
}
);
- public static VOID_DoubleValue surfaceThrustWeight = new VOID_DoubleValue(
+ public static readonly VOID_DoubleValue surfaceThrustWeight = new VOID_DoubleValue(
"Max T:W @ surface",
delegate()
{
- if (SimManager.Instance.Stages == null)
+ if (SimManager.Stages == null || SimManager.LastStage == null)
return double.NaN;
- double maxThrust = SimManager.Instance.LastStage.thrust;
- double mass = SimManager.Instance.TryGetLastMass();
+ double maxThrust = SimManager.LastStage.thrust;
+ double mass = SimManager.LastStage.totalMass;
double gravity = (VOID_Core.Constant_G * VOID_Core.Instance.vessel.mainBody.Mass) /
Math.Pow(VOID_Core.Instance.vessel.mainBody.Radius, 2);
double weight = mass * gravity;
@@ -232,7 +214,7 @@
""
);
- public static VOID_StrValue intakeAirStatus = new VOID_StrValue(
+ public static readonly VOID_StrValue intakeAirStatus = new VOID_StrValue(
"Intake Air (Curr / Req)",
delegate()
{