コード例 #1
0
	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> ();


	}
コード例 #2
0
    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());
    }
コード例 #3
0
	public void SetMoon(MoonModel moon){ this.moon = moon; }
コード例 #4
0
 public static string IsMoonOf(MarsModel mars, MoonModel moon) => $"{moon.Name} is a moon of {mars.Name}";
コード例 #5
0
 public static string IsMoonOf(MarsModel mars, MoonModel moon) => $"{moon.Name} is a moon of {mars.Name}";
コード例 #6
0
 void Awake()
 {
     sim  = SimController.INSTANCE;
     moon = sim.skyModel.GetMoon();
 }