コード例 #1
0
ファイル: GCMoonData.cs プロジェクト: icfsoft/GCAL-NET-Core
        public GCEquatorialCoords getTopocentricEquatorial(GCEarthData obs, double jdate)
        {
            double             u, h, delta_alpha;
            double             rho_sin, rho_cos;
            const double       b_a = 0.99664719;
            GCEquatorialCoords tec = new GCEquatorialCoords();

            double altitude = 0;

            // geocentric position of observer on the earth surface
            // 10.1 - 10.3
            u       = GCMath.arcTanDeg(b_a * b_a * GCMath.tanDeg(obs.latitudeDeg));
            rho_sin = b_a * GCMath.sinDeg(u) + altitude / 6378140.0 * GCMath.sinDeg(obs.latitudeDeg);
            rho_cos = GCMath.cosDeg(u) + altitude / 6378140.0 * GCMath.cosDeg(obs.latitudeDeg);

            // equatorial horizontal paralax
            // 39.1
            double parallax = GCMath.arcSinDeg(GCMath.sinDeg(8.794 / 3600) / (radius / GCMath.AU));

            // geocentric hour angle of the body
            h = GCEarthData.SiderealTimeGreenwich(jdate) + obs.longitudeDeg - rightAscension;


            // 39.2
            delta_alpha = GCMath.arcTanDeg(
                (-rho_cos * GCMath.sinDeg(parallax) * GCMath.sinDeg(h)) /
                (GCMath.cosDeg(this.declination) - rho_cos * GCMath.sinDeg(parallax) * GCMath.cosDeg(h)));
            tec.rightAscension = rightAscension + delta_alpha;
            tec.declination    = declination + GCMath.arcTanDeg(
                ((GCMath.sinDeg(declination) - rho_sin * GCMath.sinDeg(parallax)) * GCMath.cosDeg(delta_alpha)) /
                (GCMath.cosDeg(declination) - rho_cos * GCMath.sinDeg(parallax) * GCMath.cosDeg(h)));

            return(tec);
        }
コード例 #2
0
ファイル: GCMoonData.cs プロジェクト: icfsoft/GCAL-NET-Core
        public void CorrectEqatorialWithParallax(double jdate, double latitude, double longitude, double height)
        {
            double       u, hourAngleBody, delta_alpha;
            double       rho_sin, rho_cos;
            const double b_a = 0.99664719;

            // calculate geocentric longitude and latitude of observer
            u       = GCMath.arcTanDeg(b_a * b_a * GCMath.tanDeg(latitude));
            rho_sin = b_a * GCMath.sinDeg(u) + height / 6378140.0 * GCMath.sinDeg(latitude);
            rho_cos = GCMath.cosDeg(u) + height / 6378140.0 * GCMath.cosDeg(latitude);

            // calculate paralax
            this.parallax = GCMath.arcSinDeg(GCMath.sinDeg(8.794 / 3600) / (MoonDistance(jdate) / GCMath.AU));

            // calculate correction of equatorial coordinates
            hourAngleBody = GCEarthData.SiderealTimeGreenwich(jdate) + longitude - this.rightAscension;
            delta_alpha   = GCMath.arcTan2Deg(-rho_cos * GCMath.sinDeg(this.parallax) * GCMath.sinDeg(hourAngleBody),
                                              GCMath.cosDeg(this.declination) - rho_cos * GCMath.sinDeg(this.parallax) * GCMath.cosDeg(hourAngleBody));
            this.rightAscension += delta_alpha;
            this.declination    += GCMath.arcTan2Deg(
                (GCMath.sinDeg(this.declination) - rho_sin * GCMath.sinDeg(this.parallax)) * GCMath.cosDeg(delta_alpha),
                GCMath.cosDeg(this.declination) - rho_cos * GCMath.sinDeg(this.parallax) * GCMath.cosDeg(hourAngleBody));
        }