Пример #1
0
        private static void FillInPhenomenaDetails(ref AASGalileanMoonDetail detail)
        {
            double Y1 = 1.071374 * detail.ApparentRectangularCoordinates.Y;

            double r = Y1 * Y1 + detail.ApparentRectangularCoordinates.X * detail.ApparentRectangularCoordinates.X;

            if (r < 1)
            {
                if (detail.ApparentRectangularCoordinates.Z < 0)
                {
                    //Satellite nearer to Earth than Jupiter, so it must be a transit not an occultation
                    detail.bInTransit     = true;
                    detail.bInOccultation = false;
                }
                else
                {
                    detail.bInTransit     = false;
                    detail.bInOccultation = true;
                }
            }
            else
            {
                detail.bInTransit     = false;
                detail.bInOccultation = false;
            }
        }
Пример #2
0
 public AASGalileanMoonsDetails()
 {
     Satellite1 = new AASGalileanMoonDetail();
     Satellite2 = new AASGalileanMoonDetail();
     Satellite3 = new AASGalileanMoonDetail();
     Satellite4 = new AASGalileanMoonDetail();
 }
Пример #3
0
        public static AASGalileanMoonsDetails Calculate(double JD, bool bHighPrecision)
        {
            //Calculate the position of the Sun
            double sunlong    = AASSun.GeometricEclipticLongitude(JD, bHighPrecision);
            double sunlongrad = AASCoordinateTransformation.DegreesToRadians(sunlong);
            double beta       = AASSun.GeometricEclipticLatitude(JD, bHighPrecision);
            double betarad    = AASCoordinateTransformation.DegreesToRadians(beta);
            double R          = AASEarth.RadiusVector(JD, bHighPrecision);

            //Calculate the the light travel time from Jupiter to the Earth
            double DELTA = 5;
            double PreviousEarthLightTravelTime = 0;
            double EarthLightTravelTime         = AASElliptical.DistanceToLightTime(DELTA);
            double JD1      = JD - EarthLightTravelTime;
            bool   bIterate = true;
            double x;
            double y;
            double z;
            double l;
            double lrad;
            double b;
            double brad;
            double r;

            while (bIterate)
            {
                //Calculate the position of Jupiter
                l    = AASJupiter.EclipticLongitude(JD1, bHighPrecision);
                lrad = AASCoordinateTransformation.DegreesToRadians(l);
                b    = AASJupiter.EclipticLatitude(JD1, bHighPrecision);
                brad = AASCoordinateTransformation.DegreesToRadians(b);
                r    = AASJupiter.RadiusVector(JD1, bHighPrecision);

                x     = r * Math.Cos(brad) * Math.Cos(lrad) + R * Math.Cos(sunlongrad);
                y     = r * Math.Cos(brad) * Math.Sin(lrad) + R * Math.Sin(sunlongrad);
                z     = r * Math.Sin(brad) + R * Math.Sin(betarad);
                DELTA = Math.Sqrt(x * x + y * y + z * z);
                EarthLightTravelTime = AASElliptical.DistanceToLightTime(DELTA);

                //Prepare for the next loop around
                bIterate = (Math.Abs(EarthLightTravelTime - PreviousEarthLightTravelTime) > 2e-6); //2e-6 corresponds to 0.17 of a second
                if (bIterate)
                {
                    JD1 = JD - EarthLightTravelTime;
                    PreviousEarthLightTravelTime = EarthLightTravelTime;
                }
            }

            //Calculate the details as seen from the earth
            AASGalileanMoonsDetails details1           = CalculateHelper(JD, sunlongrad, betarad, R, bHighPrecision);
            AASGalileanMoonDetail   details1Satellite1 = details1.Satellite1;
            AASGalileanMoonDetail   details1Satellite2 = details1.Satellite2;
            AASGalileanMoonDetail   details1Satellite3 = details1.Satellite3;
            AASGalileanMoonDetail   details1Satellite4 = details1.Satellite4;

            FillInPhenomenaDetails(ref details1Satellite1);
            FillInPhenomenaDetails(ref details1Satellite2);
            FillInPhenomenaDetails(ref details1Satellite3);
            FillInPhenomenaDetails(ref details1Satellite4);

            //Calculate the the light travel time from Jupiter to the Sun
            JD1   = JD - EarthLightTravelTime;
            l     = AASJupiter.EclipticLongitude(JD1, bHighPrecision);
            lrad  = AASCoordinateTransformation.DegreesToRadians(l);
            b     = AASJupiter.EclipticLatitude(JD1, bHighPrecision);
            brad  = AASCoordinateTransformation.DegreesToRadians(b);
            r     = AASJupiter.RadiusVector(JD1, bHighPrecision);
            x     = r * Math.Cos(brad) * Math.Cos(lrad);
            y     = r * Math.Cos(brad) * Math.Sin(lrad);
            z     = r * Math.Sin(brad);
            DELTA = Math.Sqrt(x * x + y * y + z * z);
            double SunLightTravelTime = AASElliptical.DistanceToLightTime(DELTA);

            //Calculate the details as seen from the Sun
            AASGalileanMoonsDetails details2           = CalculateHelper(JD + SunLightTravelTime - EarthLightTravelTime, sunlongrad, betarad, 0, bHighPrecision);
            AASGalileanMoonDetail   details2Satellite1 = details2.Satellite1;
            AASGalileanMoonDetail   details2Satellite2 = details2.Satellite2;
            AASGalileanMoonDetail   details2Satellite3 = details2.Satellite3;
            AASGalileanMoonDetail   details2Satellite4 = details2.Satellite4;

            FillInPhenomenaDetails(ref details2Satellite1);
            FillInPhenomenaDetails(ref details2Satellite2);
            FillInPhenomenaDetails(ref details2Satellite3);
            FillInPhenomenaDetails(ref details2Satellite4);

            //Finally transfer the required values from details2 to details1
            details1.Satellite1.bInEclipse       = details2.Satellite1.bInOccultation;
            details1.Satellite2.bInEclipse       = details2.Satellite2.bInOccultation;
            details1.Satellite3.bInEclipse       = details2.Satellite3.bInOccultation;
            details1.Satellite4.bInEclipse       = details2.Satellite4.bInOccultation;
            details1.Satellite1.bInShadowTransit = details2.Satellite1.bInTransit;
            details1.Satellite2.bInShadowTransit = details2.Satellite2.bInTransit;
            details1.Satellite3.bInShadowTransit = details2.Satellite3.bInTransit;
            details1.Satellite4.bInShadowTransit = details2.Satellite4.bInTransit;

            return(details1);
        }
Пример #4
0
        private static void FillInPhenomenaDetails(ref AASGalileanMoonDetail detail)
        {
            double Y1 = 1.071374 * detail.ApparentRectangularCoordinates.Y;

            double r = Y1 * Y1 + detail.ApparentRectangularCoordinates.X * detail.ApparentRectangularCoordinates.X;

            if (r < 1)
            {
                if (detail.ApparentRectangularCoordinates.Z < 0)
                {
                    //Satellite nearer to Earth than Jupiter, so it must be a transit not an occultation
                    detail.bInTransit = true;
                    detail.bInOccultation = false;
                }
                else
                {
                    detail.bInTransit = false;
                    detail.bInOccultation = true;
                }
            }
            else
            {
                detail.bInTransit = false;
                detail.bInOccultation = false;
            }
        }