Beispiel #1
0
        public static void calc_geocentric(ref double longitude, ref double latitude, ref double rektaszension, ref double declination, double date)
        {
            //var
            double epsilon;      //: extended;
            double delta_phi;    //: extended;
            double alpha, delta; //: extended;

            calc_epsilon_phi(date, out delta_phi, out epsilon);
            longitude = GPMath.putIn360(longitude + delta_phi);

            alpha = GPMath.arctan2Deg(GPMath.sinDeg(longitude) * GPMath.cosDeg(epsilon) - GPMath.tanDeg(latitude) * GPMath.sinDeg(epsilon), GPMath.cosDeg(longitude));

            delta = GPMath.arcsinDeg(GPMath.sinDeg(latitude) * GPMath.cosDeg(epsilon) + GPMath.cosDeg(latitude) * GPMath.sinDeg(epsilon) * GPMath.sinDeg(longitude));

            rektaszension = alpha;
            declination   = delta;

            double xg, yg, zg;

            xg = GPMath.cosDeg(longitude) * GPMath.cosDeg(latitude);
            yg = GPMath.sinDeg(longitude) * GPMath.cosDeg(latitude);
            zg = GPMath.sinDeg(latitude);

            alpha = GPMath.arctan2Deg(yg * GPMath.cosDeg(epsilon) - zg * GPMath.sinDeg(epsilon), GPMath.cosDeg(longitude) * GPMath.cosDeg(latitude));
        }