コード例 #1
0
    public void CreateMars()
    {
        float   x       = Mathf.Cos((float)AASMars.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASMars.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        float   y       = Mathf.Sin((float)AASMars.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASMars.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        float   z       = Mathf.Sin((float)AASMars.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        Vector3 forward = new Vector3(x, y, z) * getDistMars();

        Mars = Instantiate(sphere, forward, Sun.transform.rotation);
        Mars.transform.localScale = Vector3.one * .006779f;
        Mars.name = "Mars";
    }
コード例 #2
0
        public void EclipticLatitudeTest(double JD, bool bHighPrecision, double expectedEclipticLatitude)
        {
            double eclipticLatitude = AASMars.EclipticLatitude(JD, bHighPrecision);

            Assert.Equal(expectedEclipticLatitude, eclipticLatitude);
        }
コード例 #3
0
ファイル: MarsModel.cs プロジェクト: mymess/Planetarium
 public override double GetEclipticLatitude(double JD)
 {
     return(AASMars.EclipticLatitude(JD));
 }