VOID_Orbital: Added time to asc/desc nodes.
VOID_Orbital: Added time to asc/desc nodes.

--- a/Tools/VOID_DataValue.cs
+++ b/Tools/VOID_DataValue.cs
@@ -145,9 +145,11 @@
 		}
 	}
 
-	public abstract class VOID_NumValue<T> : VOID_DataValue<T>
+	public abstract class VOID_NumValue<T> : VOID_DataValue<T>, IFormattable
 		where T : IFormattable, IConvertible, IComparable
 	{
+		public static IFormatProvider formatProvider = Tools.SIFormatter;
+
 		public static implicit operator Double(VOID_NumValue<T> v)
 		{
 			return v.ToDouble();
@@ -158,17 +160,14 @@
 			return v.ToInt32();
 		}
 
-
 		public static implicit operator Single(VOID_NumValue<T> v)
 		{
 			return v.ToSingle();
 		}
 
-		protected IFormatProvider formatProvider;
-
 		public VOID_NumValue(string Label, Func<T> ValueFunc, string Units = "") : base(Label, ValueFunc, Units)
 		{
-			this.formatProvider = System.Globalization.CultureInfo.CurrentUICulture;
+
 		}
 
 		public virtual double ToDouble(IFormatProvider provider)
@@ -178,7 +177,7 @@
 
 		public virtual double ToDouble()
 		{
-			return this.ToDouble(this.formatProvider);
+			return this.ToDouble(formatProvider);
 		}
 
 		public virtual int ToInt32(IFormatProvider provider)
@@ -188,7 +187,7 @@
 
 		public virtual int ToInt32()
 		{
-			return this.ToInt32(this.formatProvider);
+			return this.ToInt32(formatProvider);
 		}
 
 		public virtual float ToSingle(IFormatProvider provider)
@@ -198,15 +197,19 @@
 
 		public virtual float ToSingle()
 		{
-			return this.ToSingle(this.formatProvider);
-		}
-
-		public virtual string ToString(string Format)
+			return this.ToSingle(formatProvider);
+		}
+
+		public virtual string ToString(string format)
+		{
+			return this.ToString(format, formatProvider);
+		}
+
+		public virtual string ToString(string format, IFormatProvider provider)
 		{
 			return string.Format (
-				"{0}: {1}{2}",
-				this.Label,
-				this.Value.ToString(Format, this.formatProvider),
+				"{0}{1}",
+				this.Value.ToString(format, provider),
 				this.Units
 			);
 		}
@@ -222,7 +225,7 @@
 
 		public virtual string ValueUnitString(string format)
 		{
-			return this.Value.ToString(format, this.formatProvider) + this.Units;
+			return this.Value.ToString(format, formatProvider) + this.Units;
 		}
 		
 		public virtual string ValueUnitString(int digits) {

--- a/VOID_CareerStatus.cs
+++ b/VOID_CareerStatus.cs
@@ -48,11 +48,11 @@
 		{
 			if (delta > 0)
 			{
-				return string.Format("<color='lime'>{0}↑</color>", delta.ToString(numberFormat, Tools.mySIFormatter));
+				return string.Format("<color='lime'>{0}↑</color>", delta.ToString(numberFormat, Tools.SIFormatter));
 			}
 			else if (delta < 0)
 			{
-				return string.Format("<color='red'>{0}↓</color>", delta.ToString(numberFormat, Tools.mySIFormatter));
+				return string.Format("<color='red'>{0}↓</color>", delta.ToString(numberFormat, Tools.SIFormatter));
 			}
 			else
 			{

--- a/VOID_Data.cs
+++ b/VOID_Data.cs
@@ -283,7 +283,7 @@
 						return double.NaN;
 					}
 
-					return Core.LastStage.resourceMass;
+					return Core.LastStage.totalResourceMass;
 				},
 				"tons"
 			);
@@ -1150,6 +1150,50 @@
 				"°"
 			);
 
+		public static readonly VOID_StrValue timeToAscendingNode =
+			new VOID_StrValue(
+				"Time to Ascending Node",
+				delegate()
+				{
+					double trueAnomalyAscNode = 360d - argumentPeriapsis;
+					double dTAscNode = Core.vessel.orbit.GetDTforTrueAnomaly(
+						trueAnomalyAscNode * Mathf.Deg2Rad,
+						Core.vessel.orbit.period
+					);
+
+					dTAscNode %= Core.vessel.orbit.period;
+
+					if (dTAscNode < 0d)
+					{
+						dTAscNode += Core.vessel.orbit.period;
+					}
+
+					return VOID_Tools.FormatInterval(dTAscNode);
+				}
+			);
+
+		public static readonly VOID_StrValue timeToDescendingNode =
+			new VOID_StrValue(
+				"Time to Descending Node",
+				delegate()
+				{
+					double trueAnomalyAscNode = 180d - argumentPeriapsis;
+					double dTDescNode = Core.vessel.orbit.GetDTforTrueAnomaly(
+						trueAnomalyAscNode * Mathf.Deg2Rad,
+						Core.vessel.orbit.period
+					);
+
+					dTDescNode %= Core.vessel.orbit.period;
+
+					if (dTDescNode < 0d)
+					{
+						dTDescNode += Core.vessel.orbit.period;
+					}
+
+					return VOID_Tools.FormatInterval(dTDescNode);
+				}
+			);
+
 		public static readonly VOID_DoubleValue localSiderealLongitude =
 			new VOID_DoubleValue(
 				"Local Sidereal Longitude",

--- a/VOID_Orbital.cs
+++ b/VOID_Orbital.cs
@@ -98,6 +98,10 @@
 
 				VOID_Data.longitudeAscNode.DoGUIHorizontal("F3");
 
+				VOID_Data.timeToAscendingNode.DoGUIHorizontal();
+
+				VOID_Data.timeToDescendingNode.DoGUIHorizontal();
+
 				VOID_Data.argumentPeriapsis.DoGUIHorizontal("F3");
 
 				VOID_Data.localSiderealLongitude.DoGUIHorizontal("F3");