Exemple #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";
    }
Exemple #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
                   ));
    }
Exemple #3
0
        public void EclipticLongitudeTest(double JD, bool bHighPrecision, double expectedLongitude)
        {
            double longitude = AASMars.EclipticLongitude(JD, bHighPrecision);

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

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

        return(ret);
    }