Moved all VOID_Data entries to a common VOID_Data class file, then organized and formatted it.
[VOID.git] / VOID_HUD.cs
blob:a/VOID_HUD.cs -> blob:b/VOID_HUD.cs
--- a/VOID_HUD.cs
+++ b/VOID_HUD.cs
@@ -271,57 +271,5 @@
 				GUILayout.ExpandWidth(false));
 		}
 	}
-
-	public static partial class VOID_Data
-	{
-		public static readonly VOID_StrValue expSituation = new VOID_StrValue(
-			"Situation",
-			new Func<string> (() => core.vessel.GetExperimentSituation().HumanString())
-		);
-
-		public static readonly VOID_DoubleValue vesselPitch = new VOID_DoubleValue(
-			"Pitch",
-			() => core.vessel.getSurfacePitch(),
-			"°"
-		);
-
-		public static readonly VOID_DoubleValue downrangeDistance = new VOID_DoubleValue(
-			"Downrange Distance",
-			delegate() {
-
-			if (core.vessel == null ||
-				Planetarium.fetch == null ||
-				core.vessel.mainBody != Planetarium.fetch.Home
-			)
-			{
-				return double.NaN;
-			}
-
-			double vesselLongitude = core.vessel.longitude * Math.PI / 180d;
-			double vesselLatitude = core.vessel.latitude * Math.PI / 180d;
-
-			const double kscLongitude = 285.442323427289 * Math.PI / 180d;
-			const double kscLatitude = -0.0972112860655246 * Math.PI / 180d;
-
-			double diffLon = vesselLongitude - kscLongitude;
-			double diffLat = vesselLatitude - kscLatitude;
-
-			double sinHalfDiffLat = Math.Sin(diffLat / 2d);
-			double sinHalfDiffLon = Math.Sin(diffLon / 2d);
-
-			double cosVesselLon = Math.Cos(vesselLongitude);
-			double cosKSCLon = Math.Cos(kscLongitude);
-
-			double haversine =
-				sinHalfDiffLat * sinHalfDiffLat +
-				cosVesselLon * cosKSCLon * sinHalfDiffLon * sinHalfDiffLon;
-
-			double arc = 2d * Math.Atan2(Math.Sqrt(haversine), Math.Sqrt(1d - haversine));
-
-			return core.vessel.mainBody.Radius * arc;
-		},
-			"m"
-		);
-	}
 }