public void CreateMercury() { float x = Mathf.Cos((float)AASMercury.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASMercury.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true)); float y = Mathf.Sin((float)AASMercury.EclipticLatitude(JDNConv.getJulianDayNumberToday(), true)) * Mathf.Cos((float)AASMercury.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true)); float z = Mathf.Sin((float)AASMercury.EclipticLongitude(JDNConv.getJulianDayNumberToday(), true)); Vector3 forward = new Vector3(x, y, z) * getDistMercury(); Mercury = Instantiate(sphere, forward, Sun.transform.rotation); Mercury.transform.localScale = Vector3.one * .0048794f; Mercury.name = "Mercury"; }
public override double GetEclipticLatitude(double JD) { return(AASMercury.EclipticLatitude(JD)); }
public void EclipticLatitudeTest(double JD, bool bHighPrecision, double expectedEclipticLatitude) { double eclipticLatitude = AASMercury.EclipticLatitude(JD, bHighPrecision); Assert.Equal(expectedEclipticLatitude, eclipticLatitude); }