Example #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";
    }
Example #2
0
    public double Magnitude()
    {
        double phaseAngle = AASIlluminatedFraction.PhaseAngle(
            GetRadiusVector(jdeCorrected),
            AASEarth.RadiusVector(jd),
            vectorToEarthCorrected.Length());

        return(AASIlluminatedFraction.MarsMagnitudeMuller(
                   AASMars.RadiusVector(jdeCorrected),
                   vectorToEarthCorrected.Length(),
                   phaseAngle
                   ));
    }
Example #3
0
        public void EclipticLongitudeTest(double JD, bool bHighPrecision, double expectedLongitude)
        {
            double longitude = AASMars.EclipticLongitude(JD, bHighPrecision);

            Assert.Equal(expectedLongitude, longitude);
        }
Example #4
0
        public void RadiusVectorTest(double JD, bool bHighPrecision, double expectedRadiusVector)
        {
            double radiusVector = AASMars.RadiusVector(JD, bHighPrecision);

            Assert.Equal(expectedRadiusVector, radiusVector);
        }
Example #5
0
 public override double GetDistance()
 {
     return(AASMars.RadiusVector(jdeCorrected));
 }
Example #6
0
 protected override double GetRadiusVector(double JD)
 {
     return(AASMars.RadiusVector(JD));
 }
Example #7
0
 public override double GetEclipticLatitude(double JD)
 {
     return(AASMars.EclipticLatitude(JD));
 }
Example #8
0
    public float getDistMars()
    {
        float ret = distanceFactor * (float)AASMars.RadiusVector(JDNConv.getJulianDayNumberToday(), true);

        return(ret);
    }