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"; }
// Update is called once per frame void Update() { if (Input.GetKeyDown("p")) { Debug.Log("creating planets"); CreatePlanets(); lookAtSun(); Debug.Log("Earth: " + AASEarth.RadiusVector(JDNConv.getJulianDayNumberToday(), true)); Debug.Log("Mercury: " + AASMercury.RadiusVector(JDNConv.getJulianDayNumberToday(), true)); Debug.Log("Jupiter: " + AASJupiter.RadiusVector(JDNConv.getJulianDayNumberToday(), true)); Debug.Log("Distance between sun and pluto: " + Vector3.Distance(Sun.transform.position, Pluto.transform.position)); } }
public override double GetDistance() { return(AASMercury.RadiusVector(jdeCorrected)); }
protected override double GetRadiusVector(double JD) { return(AASMercury.RadiusVector(JD)); }
public override double GetEclipticLatitude(double JD) { return(AASMercury.EclipticLatitude(JD)); }
public void EclipticLongitudeTest(double JD, bool bHighPrecision, double expectedLongitude) { double longitude = AASMercury.EclipticLongitude(JD, bHighPrecision); Assert.Equal(expectedLongitude, longitude); }
public void RadiusVectorTest(double JD, bool bHighPrecision, double expectedRadiusVector) { double radiusVector = AASMercury.RadiusVector(JD, bHighPrecision); Assert.Equal(expectedRadiusVector, radiusVector); }
public float getDistMercury() { float ret = distanceFactor * (float)AASMercury.RadiusVector(JDNConv.getJulianDayNumberToday(), true); return(ret); }