More groundwork for improved network resolution.
More groundwork for improved network resolution.

--- a/AntennaRelay.cs
+++ b/AntennaRelay.cs
@@ -158,6 +158,42 @@
 		}
 
 		/// <summary>
+		/// Gets the current link resource rate in EC/MiT.
+		/// </summary>
+		/// <value>The current link resource rate in EC/MiT.</value>
+		public virtual double CurrentLinkResourceRate
+		{
+			get
+			{
+				return this.DataResourceCost;
+			}
+		}
+
+		public virtual double CurrentNetworkResourceRate
+		{
+			get
+			{
+				double totalRate = 0;
+
+				IAntennaRelay nextLink = this.moduleRef;
+
+				while (nextLink != null)
+				{
+					totalRate += nextLink.DataResourceCost;
+
+					if (nextLink.KerbinDirect)
+					{
+						break;
+					}
+
+					nextLink = nextLink.targetRelay;
+				}
+
+				return totalRate;
+			}
+		}
+
+		/// <summary>
 		/// Gets or sets the link status.
 		/// </summary>
 		public virtual ConnectionStatus LinkStatus
@@ -214,7 +250,7 @@
 		/// Override ModuleDataTransmitter.DataRate to just return packetSize, because we want antennas to be scored in
 		/// terms of joules/byte
 		/// </summary>
-		public new float DataRate
+		public virtual float DataRate
 		{
 			get
 			{
@@ -235,7 +271,7 @@
 		/// Override ModuleDataTransmitter.DataResourceCost to just return packetResourceCost, because we want antennas
 		/// to be scored in terms of joules/byte
 		/// </summary>
-		public new double DataResourceCost
+		public virtual double DataResourceCost
 		{
 			get
 			{

--- a/IAntennaRelay.cs
+++ b/IAntennaRelay.cs
@@ -57,6 +57,18 @@
 		float PacketThrottle { get; }
 
 		float MaxDataFactor { get; }
+
+		/// <summary>
+		/// Gets the data resource cost in EC/MiT.
+		/// </summary>
+		/// <value>The data resource cost in EC/MiT.</value>
+		double DataResourceCost { get; }
+
+		/// <summary>
+		/// Gets the current network resource rate in EC/MiT.
+		/// </summary>
+		/// <value>The current network resource rate in EC/MiT.</value>
+		double CurrentNetworkResourceRate { get; }
 
 		/// <summary>
 		/// Gets a value indicating whether this <see cref="AntennaRange.IAntennaRelay"/> Relay is communicating

--- a/ModuleLimitedDataTransmitter.cs
+++ b/ModuleLimitedDataTransmitter.cs
@@ -56,12 +56,6 @@
 		private static GUIStyle partTooltipBodyStyle;
 		private static GUIStyle partTooltipHeaderStyle;
 
-		// Stores the packetResourceCost as defined in the .cfg file.
-		private float _basepacketResourceCost;
-
-		// Stores the packetSize as defined in the .cfg file.
-		private float _basepacketSize;
-
 		// Every antenna is a relay.
 		private AntennaRelay relay;
 
@@ -206,10 +200,8 @@
 
 		public float BasePacketSize
 		{
-			get
-			{
-				return this._basepacketSize;
-			}
+			get;
+			private set;
 		}
 
 		public float PacketResourceCost
@@ -226,10 +218,8 @@
 
 		public float BasePacketResourceCost
 		{
-			get
-			{
-				return this._basepacketResourceCost;
-			}
+			get;
+			private set;
 		}
 
 		public float PacketThrottle
@@ -326,6 +316,23 @@
 				}
 
 				return this.relay.CurrentLinkSqrDistance;
+			}
+		}
+
+		/// <summary>
+		/// Gets the current link resource rate in EC/MiT.
+		/// </summary>
+		/// <value>The current link resource rate in EC/MiT.</value>
+		public double CurrentLinkResourceRate
+		{
+			get
+			{
+				if (this.relay == null)
+				{
+					return double.PositiveInfinity;
+				}
+
+				return this.relay.CurrentLinkResourceRate;
 			}
 		}
 
@@ -417,19 +424,12 @@
 		{
 			get
 			{
-				if (this.relay != null)
-				{
-					this.relay.RecalculateTransmissionRates();
-				}
-
-				if (this.CanTransmit())
-				{
-					return this.packetSize;
-				}
-				else
-				{
-					return float.Epsilon;
-				}
+				if (this.relay == null)
+				{
+					return float.PositiveInfinity;
+				}
+
+				return this.relay.DataRate;
 			}
 		}
 
@@ -441,16 +441,25 @@
 		{
 			get
 			{
-				this.relay.RecalculateTransmissionRates();
-
-				if (this.CanTransmit())
-				{
-					return this.packetResourceCost;
-				}
-				else
-				{
-					return float.PositiveInfinity;
-				}
+				if (this.relay == null)
+				{
+					return double.PositiveInfinity;
+				}
+
+				return this.relay.DataResourceCost;
+			}
+		}
+
+		public double CurrentNetworkResourceRate
+		{
+			get
+			{
+				if (this.relay == null)
+				{
+					return double.PositiveInfinity;
+				}
+
+				return this.relay.CurrentNetworkResourceRate;
 			}
 		}
 
@@ -487,8 +496,8 @@
 		{
 			base.OnAwake();
 
-			this._basepacketSize = base.packetSize;
-			this._basepacketResourceCost = base.packetResourceCost;
+			this.BasePacketSize = base.packetSize;
+			this.BasePacketResourceCost = base.packetResourceCost;
 			this.moduleInfoContent = new GUIContent();
 
 			this.LogDebug("{0} loaded:\n" +
@@ -499,7 +508,7 @@
 				"maxDataFactor: {5}\n",
 				this,
 				base.packetSize,
-				this._basepacketResourceCost,
+				this.BasePacketResourceCost,
 				this.nominalTransmitDistance,
 				this.maxPowerFactor,
 				this.maxDataFactor