示例#1
0
    public void CreateUranus()
    {
        float   x       = Mathf.Cos((float)AASUranus.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASUranus.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        float   y       = Mathf.Sin((float)AASUranus.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASUranus.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        float   z       = Mathf.Sin((float)AASUranus.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        Vector3 forward = new Vector3(x, y, z) * getDistUranus();

        Uranus = Instantiate(sphere, forward, Sun.transform.rotation);
        Uranus.transform.localScale = Vector3.one * .050724f;
        Uranus.name = "Uranus";
    }
示例#2
0
 public override double GetEclipticLongitude(double JD)
 {
     return(AASUranus.EclipticLongitude(JD));
 }
        public void EclipticLongitudeTest(double JD, bool bHighPrecision, double expectedLongitude)
        {
            double longitude = AASUranus.EclipticLongitude(JD, bHighPrecision);

            Assert.Equal(expectedLongitude, longitude);
        }