Made things less verbose.
Made things less verbose.

--- a/ARFlightController.cs
+++ b/ARFlightController.cs
@@ -46,6 +46,9 @@
 		protected IButton toolbarButton;
 
 		protected ApplicationLauncherButton appLauncherButton;
+		protected Tools.DebugLogger log;
+
+		protected System.Diagnostics.Stopwatch updateTimer;
 		#endregion
 
 		#region Properties
@@ -116,6 +119,10 @@
 		protected void Awake()
 		{
 			this.lockID = "ARConnectionRequired";
+
+			this.log = Tools.DebugLogger.New(this);
+
+			this.updateTimer = new System.Diagnostics.Stopwatch();
 
 			this.connectionTextures = new Dictionary<ConnectionStatus, string>();
 
@@ -161,7 +168,7 @@
 				);
 			}
 
-			Tools.DebugLogger log = Tools.DebugLogger.New(this);
+			this.log.Clear();
 
 			VesselCommand availableCommand;
 
@@ -209,7 +216,23 @@
 				// ...unlock the controls.
 				InputLockManager.RemoveControlLock(this.lockID);
 			}
-				
+
+			log.Print();
+		}
+
+		protected void Update()
+		{
+			if (!this.updateTimer.IsRunning || this.updateTimer.ElapsedMilliseconds > 125L)
+			{
+				this.updateTimer.Reset();
+			}
+			else
+			{
+				return;
+			}
+
+			this.log.Clear();
+
 			if (
 				(this.toolbarButton != null || this.appLauncherButton != null) &&
 				HighLogic.LoadedSceneIsFlight &&
@@ -218,62 +241,7 @@
 			{
 				log.Append("Checking vessel relay status.\n");
 
-				List<ModuleLimitedDataTransmitter> relays =
-					FlightGlobals.ActiveVessel.getModulesOfType<ModuleLimitedDataTransmitter>();
-
-				log.AppendFormat("\t...found {0} relays\n", relays.Count);
-
-				bool vesselCanTransmit = false;
-				bool vesselHasOptimalRelay = false;
-
-				foreach (ModuleLimitedDataTransmitter relay in relays)
-				{
-					log.AppendFormat("\tvesselCanTransmit: {0}, vesselHasOptimalRelay: {1}\n",
-						vesselCanTransmit, vesselHasOptimalRelay);
-
-					log.AppendFormat("\tChecking relay {0}\n" +
-						"\t\tCanTransmit: {1}, transmitDistance: {2}, nominalRange: {3}\n",
-						relay,
-						relay.CanTransmit(),
-						relay.transmitDistance,
-						relay.nominalRange
-					);
-
-					bool relayCanTransmit = relay.CanTransmit();
-
-					if (!vesselCanTransmit && relayCanTransmit)
-					{
-						vesselCanTransmit = true;
-					}
-
-					if (!vesselHasOptimalRelay &&
-						relayCanTransmit &&
-						relay.transmitDistance <= (double)relay.nominalRange)
-					{
-						vesselHasOptimalRelay = true;
-					}
-
-					if (vesselCanTransmit && vesselHasOptimalRelay)
-					{
-						break;
-					}
-				}
-
-				log.AppendFormat("Done checking.  vesselCanTransmit: {0}, vesselHasOptimalRelay: {1}\n",
-					vesselCanTransmit, vesselHasOptimalRelay);
-
-				if (vesselHasOptimalRelay)
-				{
-					this.currentConnectionStatus = ConnectionStatus.Optimal;
-				}
-				else if (vesselCanTransmit)
-				{
-					this.currentConnectionStatus = ConnectionStatus.Suboptimal;
-				}
-				else
-				{
-					this.currentConnectionStatus = ConnectionStatus.None;
-				}
+				this.currentConnectionStatus = FlightGlobals.ActiveVessel.GetConnectionStatus();
 
 				log.AppendFormat("currentConnectionStatus: {0}, setting texture to {1}",
 					this.currentConnectionStatus, this.currentConnectionTexture);
@@ -339,13 +307,6 @@
 			InputLockManager.RemoveControlLock(this.lockID);
 		}
 		#endregion
-
-		public enum ConnectionStatus
-		{
-			None,
-			Suboptimal,
-			Optimal
-		}
 	}
 }
 

--- a/ARMapRenderer.cs
+++ b/ARMapRenderer.cs
@@ -38,7 +38,6 @@
 	{
 		#region Fields
 		private Dictionary<Guid, LineRenderer> vesselLineRenderers;
-		private Dictionary<Guid, bool> vesselFrameCache;
 		#endregion
 
 		#region Properties
@@ -59,7 +58,7 @@
 					LineRenderer lr = obj.AddComponent<LineRenderer>();
 
 					lr.SetColors(Color.green, Color.green);
-					lr.material = new Material(Shader.Find("Particles/Additive"));
+					lr.material = MapView.OrbitLinesMaterial;
 					lr.SetVertexCount(2);
 
 					this.vesselLineRenderers[idx] = lr;
@@ -76,7 +75,6 @@
 			if (ARConfiguration.PrettyLines)
 			{
 				this.vesselLineRenderers = new Dictionary<Guid, LineRenderer>();
-				this.vesselFrameCache = new Dictionary<Guid, bool>();
 			}
 		}
 
@@ -102,8 +100,6 @@
 					MapView.MapCamera.camera.fieldOfView,
 					MapView.MapCamera.Distance
 				);
-
-				this.vesselFrameCache.Clear();
 
 				log.AppendLine("vesselFrameCache cleared.");
 
@@ -239,11 +235,11 @@
 
 			if (MapView.Draw3DLines)
 			{
-				lineWidth = 0.004f * MapView.MapCamera.Distance;
+				lineWidth = 0.005859375f * MapView.MapCamera.Distance;
 			}
 			else
 			{
-				lineWidth = 1f;
+				lineWidth = 2f;
 
 				start = MapView.MapCamera.camera.WorldToScreenPoint(start);
 				end = MapView.MapCamera.camera.WorldToScreenPoint(end);
@@ -270,11 +266,6 @@
 				}
 				this.vesselLineRenderers.Clear();
 			}
-
-			if (this.vesselFrameCache != null && this.vesselFrameCache.Count > 0)
-			{
-				this.vesselFrameCache.Clear();
-			}
 		}
 	}
 }

--- a/AntennaRelay.cs
+++ b/AntennaRelay.cs
@@ -191,7 +191,7 @@
 
 			if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 			{
-				Tools.PostLogMessage(string.Format(
+				Tools.PostDebugMessage(string.Format(
 					"{0}: finding nearest relay for {1}",
 					this.GetType().Name,
 					this.ToString()
@@ -255,7 +255,7 @@
 
 					if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 					{
-						Tools.PostLogMessage("{6}: Vessel {0} discarded because we do not have line of sight." +
+						Tools.PostDebugMessage("{6}: Vessel {0} discarded because we do not have line of sight." +
 							"\npotentialSqrDistance: {1}, bestOccludedSqrDistance: {2}, maxTransmitSqrDistance: {3}" +
 							"\npotentialSqrDistance < bestOccludedSqrDistance: {4}" +
 							"\npotentialSqrDistance < (this.maxTransmitDistance * this.maxTransmitDistance): {5}",
@@ -274,7 +274,7 @@
 					{
 						if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 						{
-							Tools.PostLogMessage("{0}: Checking {1} relays on {2}.",
+							Tools.PostDebugMessage("{0}: Checking {1} relays on {2}.",
 								this.ToString(),
 								potentialVessel.GetAntennaRelays().Count(),
 								potentialVessel
@@ -285,7 +285,7 @@
 						{
 							if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 							{
-								Tools.PostLogMessage(this.ToString() +  " Checking candidate for bestOccludedRelay: {0}" +
+								Tools.PostDebugMessage(this.ToString() +  " Checking candidate for bestOccludedRelay: {0}" +
 									"\n\tCanTransmit: {1}", occludedRelay, occludedRelay.CanTransmit());
 							}
 
@@ -297,7 +297,7 @@
 
 								if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 								{
-									Tools.PostLogMessage(this.ToString() + " Found new bestOccludedRelay: {0}" +
+									Tools.PostDebugMessage(this.ToString() + " Found new bestOccludedRelay: {0}" +
 										"\nfirstOccludingBody: {1}" +
 										"\nbestOccludedSqrDistance: {2}",
 										occludedRelay,
@@ -320,7 +320,7 @@
 				{
 					if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 					{
-						Tools.PostLogMessage("{0}: Vessel {1} discarded because it is out of range, or farther than another relay.",
+						Tools.PostDebugMessage("{0}: Vessel {1} discarded because it is out of range, or farther than another relay.",
 							this.ToString(),
 							potentialVessel.vesselName
 						);
@@ -338,7 +338,7 @@
 
 						if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 						{
-							Tools.PostLogMessage(string.Format("{0}: found new best relay {1} ({2})",
+							Tools.PostDebugMessage(string.Format("{0}: found new best relay {1} ({2})",
 								this.ToString(),
 								this.nearestRelay.ToString(),
 								this.nearestRelay.vessel.id
@@ -354,7 +354,7 @@
 			double kerbinSqrDistance = this.vessel.DistanceTo(Kerbin) - Kerbin.Radius;
 			kerbinSqrDistance *= kerbinSqrDistance;
 
-			System.Text.StringBuilder log = new System.Text.StringBuilder();
+			Tools.DebugLogger log = Tools.DebugLogger.New(this);
 
 			log.AppendFormat("{0} ({1}): Search done, figuring status.", this.ToString(), this.GetType().Name);
 
@@ -497,7 +497,7 @@
 
 			log.AppendFormat("\n{0}: Status determination complete.", this.ToString());
 
-			Tools.PostLogMessage(log.ToString());
+			log.Print();
 
 			// Now that we're done with our recursive CanTransmit checks, flag this relay as not checked so it can be
 			// used next time.
@@ -522,7 +522,7 @@
 			this.moduleRef = module;
 
 			this.searchTimer = new System.Diagnostics.Stopwatch();
-			this.millisecondsBetweenSearches = 125;
+			this.millisecondsBetweenSearches = 125L;
 		}
 	}
 }

--- a/RelayExtensions.cs
+++ b/RelayExtensions.cs
@@ -109,6 +109,39 @@
 
 			return false;
 		}
+
+		public static ConnectionStatus GetConnectionStatus(this Vessel vessel)
+		{
+			bool canTransmit = false;
+
+			foreach (IAntennaRelay relay in RelayDatabase.Instance[vessel].Values)
+			{
+				if (relay.CanTransmit())
+				{
+					canTransmit = true;
+					if (relay.transmitDistance <= relay.nominalTransmitDistance)
+					{
+						return ConnectionStatus.Optimal;
+					}
+				}
+			}
+
+			if (canTransmit)
+			{
+				return ConnectionStatus.Suboptimal;
+			}
+			else
+			{
+				return ConnectionStatus.None;
+			}
+		}
+	}
+
+	public enum ConnectionStatus
+	{
+		None,
+		Suboptimal,
+		Optimal
 	}
 }