public void Start() { DiscoverProtoVesselAntennas(protoVesselAntennaCache); iTechLevel = RACommNetScenario.GroundStationTechLevel; float fTSLvl = ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.TrackingStation); currentGroundStationTechLevel = Mathf.RoundToInt(RACommNetScenario.MaxTL * (HighLogic.CurrentGame.Mode == Game.Modes.CAREER ? fTSLvl : 1)); GameEvents.onEditorPodDeleted.Add(OnEditorRestart); GameEvents.onEditorRestart.Add(OnEditorRestart); windowStyle = new GUIStyle(HighLogic.Skin.window) { alignment = TextAnchor.UpperLeft }; boxStyle = new GUIStyle(HighLogic.Skin.box) { alignment = TextAnchor.UpperCenter }; // Terminology: peer antenna is on the left of the GUI, and will move around. // Fixed antenna is on the right of the GUI, and will be positioned at/near homeworld surface. fixedGO = new GameObject("Planning.Antenna.Fixed"); peerNearGO = new GameObject("Planning.Antenna.Near"); peerFarGO = new GameObject("Planning.Antenna.Far"); fixedNode = new RACommNode(fixedGO.transform); peerNearNode = new RACommNode(peerNearGO.transform); peerFarNode = new RACommNode(peerFarGO.transform); ConvertDistance(distanceMax, out double tMax, out dMaxMultIndex); ConvertDistance(distanceMin, out double tMin, out dMinMultIndex); dMin = $"{tMin:F3}"; dMax = $"{tMax:F3}"; }
public static double AllBodyTemps(RealAntenna rx, Vector3d rxPointing) { double temp = 0; if (rx.Shape != AntennaShape.Omni) { Profiler.BeginSample("RA Physics AllBodyTemps MainLoop"); RACommNode node = rx.ParentNode as RACommNode; // Note there are ~33 bodies in RSS. foreach (CelestialBody body in FlightGlobals.Bodies) { if (!node.isHome || !node.ParentBody.Equals(body)) { temp += BodyNoiseTemp(rx, body, rxPointing); } } Profiler.EndSample(); } return(temp); }