void Log() { Debug.Log("------- SUN ------- "); Debug.Log(string.Format("JD: {0}", dt.JulianDay())); Debug.Log(string.Format("Time: {0}:{1}:{2}", dt.Hour(), dt.Minute(), dt.Second())); skyModel.GetSun().Log(); HourAngle H = new HourAngle(skyModel.GetSun().localHourAngle); Debug.Log(string.Format("H {0}", H.ToString())); AAS2DCoordinate local = AASCoordinateTransformation.Equatorial2Horizontal(skyModel.GetSun().localHourAngle, skyModel.GetSun().EquatorialCoords.Declination.Get(), location.Latitude); Debug.Log(string.Format("local X {0}", local.X)); Debug.Log(string.Format("local Y {0}", local.Y)); Debug.Log("------- VENUS ------- "); VenusModel venus = skyModel.GetPlanets() ["Venus"] as VenusModel; venus.Log(); Debug.Log("------- MOON ------- "); MoonModel moon = skyModel.GetMoon(); moon.Log(); Debug.Log("------- JUPITER ------- "); JupiterModel jup = skyModel.GetPlanets()["Jupiter"] as JupiterModel; Debug.Log("p " + jup.GetParallacticAngle()); }
void DisplayTimeSettings() { GUILayout.BeginVertical(); GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); string hourLabel = "Hour:"; string minLabel = "Minute:"; string secLabel = "Second:"; GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(90) }; GUIStyle myStyle = new GUIStyle(GUI.skin.textField); myStyle.alignment = TextAnchor.MiddleRight; var textDimensions = GUI.skin.label.CalcSize(new GUIContent(hourLabel)); EditorGUIUtility.labelWidth = textDimensions.x; options = new GUILayoutOption[] { GUILayout.Width(60) }; hour = EditorGUILayout.IntField(hourLabel, dt.Hour(), myStyle, options); GUILayout.FlexibleSpace(); textDimensions = GUI.skin.label.CalcSize(new GUIContent(minLabel)); EditorGUIUtility.labelWidth = textDimensions.x; options = new GUILayoutOption[] { GUILayout.Width(70) }; minute = EditorGUILayout.IntField(minLabel, dt.Minute(), myStyle, options); GUILayout.FlexibleSpace(); textDimensions = GUI.skin.label.CalcSize(new GUIContent(secLabel)); EditorGUIUtility.labelWidth = textDimensions.x; options = new GUILayoutOption[] { GUILayout.Width(100) }; string secondStr = dt.Second().ToString("##.###"); float.TryParse(secondStr, out second); second = EditorGUILayout.FloatField(secLabel, second, myStyle, options); EditorGUILayout.EndHorizontal( ); GUILayout.EndVertical(); }