Ejemplo n.º 1
0
    public void CreateEarth()
    {
        float   x       = Mathf.Cos((float)AASEarth.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASEarth.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        float   y       = Mathf.Sin((float)AASEarth.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASEarth.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        float   z       = Mathf.Sin((float)AASEarth.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true));
        Vector3 forward = new Vector3(x, y, z) * getDistEarth();

        Earth = Instantiate(sphere, forward, Sun.transform.rotation);
        Earth.transform.localScale = Vector3.one * .012742f;
        Earth.name = "Earth";
    }
Ejemplo n.º 2
0
    protected void CalculateGeometricPositions()
    {
        eclipticLongitude = GetEclipticLongitude(jd);
        eclipticLatitude  = GetEclipticLatitude(jd);
        double planetSunDistance = GetRadiusVector(jd);

        eclipticLongitudeEarth = AASEarth.EclipticLongitude(jd);
        eclipticLatitudeEarth  = AASEarth.EclipticLatitude(jd);
        double earthSunDistance = AASEarth.RadiusVector(jd);

        vectorToEarth = VectorToEarth(eclipticLongitude, eclipticLatitude, planetSunDistance, eclipticLongitudeEarth, eclipticLatitudeEarth, earthSunDistance);
    }
 public void EclipticLatitudeTest(double JD, bool bHighPrecision, double expectedEclipticLatitude)
 {
     double eclipticLatitude = AASEarth.EclipticLatitude(JD, bHighPrecision);
     Assert.Equal(expectedEclipticLatitude, eclipticLatitude);
 }