Exemple #1
0
        public double elevation, azimuth;          //          (* h, A *)



        public void Calculate(double jdate)
        {
            GCEclipticalCoords crd = CalculateEcliptical(jdate);
            GCEquatorialCoords eqc;

            eqc = GCEarthData.eclipticalToEquatorialCoords(ref crd, jdate);

            this.radius        = crd.distance;
            this.longitude_deg = crd.longitude;
            this.latitude_deg  = crd.latitude;

            // equaltorial coordinates
            this.rightAscension = eqc.rightAscension;
            this.declination    = eqc.declination;
        }
Exemple #2
0
        public static GCEquatorialCoords eclipticalToEquatorialCoords(ref GCEclipticalCoords ecc, double date)
        {
            //var
            GCEquatorialCoords eqc;

            double epsilon;
            double nutationLongitude;

            GCEarthData.CalculateNutations(date, out nutationLongitude, out epsilon);


            // formula from Chapter 21
            ecc.longitude = GCMath.putIn360(ecc.longitude + nutationLongitude);

            // formulas from Chapter 12
            eqc.rightAscension = GCMath.arcTan2Deg(GCMath.sinDeg(ecc.longitude) * GCMath.cosDeg(epsilon) - GCMath.tanDeg(ecc.latitude) * GCMath.sinDeg(epsilon),
                                                   GCMath.cosDeg(ecc.longitude));

            eqc.declination = GCMath.arcSinDeg(GCMath.sinDeg(ecc.latitude) * GCMath.cosDeg(epsilon) + GCMath.cosDeg(ecc.latitude) * GCMath.sinDeg(epsilon) * GCMath.sinDeg(ecc.longitude));

            return(eqc);
        }