public SkyModel(double julianDay, LocationData location){ if (INSTANCE == null) { INSTANCE = this; } this.location = location; this.jd = julianDay; sun = new SunModel (jd, location); moon = new MoonModel (jd, location); MercuryModel mercuryModel = new MercuryModel (jd, location); VenusModel venusModel = new VenusModel(jd, location); MarsModel marsModel = new MarsModel (jd, location); JupiterModel jupiterModel = new JupiterModel (jd, location); SaturnModel saturnModel = new SaturnModel (jd, location); UranusModel uranusModel = new UranusModel(jd, location); NeptuneModel neptuneModel = new NeptuneModel(jd, location); planets = new Dictionary<string, PlanetModel> (); planets["Mercury"] = mercuryModel; planets["Venus"] = venusModel; planets["Mars"] = marsModel; planets["Jupiter"] = jupiterModel; planets["Saturn"] = saturnModel; planets["Uranus"] = uranusModel; planets["Neptune"] = neptuneModel; starPositionsDictionary = new Dictionary<EquatorialCoords, int> (); planetPositionsDictionary = new Dictionary<EquatorialCoords, PlanetModel> (); }
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()); }
public void SetMoon(MoonModel moon){ this.moon = moon; }
public static string IsMoonOf(MarsModel mars, MoonModel moon) => $"{moon.Name} is a moon of {mars.Name}";
void Awake() { sim = SimController.INSTANCE; moon = sim.skyModel.GetMoon(); }