Exemplo n.º 1
0
    protected void CorrectForFK5SystemReduction()
    {
        double appGeoLon = GetGeocentricLongitude(vectorToEarthCorrected.x, vectorToEarthCorrected.y);
        double appGeoLat = GetGeocentricLatitude(vectorToEarthCorrected.x, vectorToEarthCorrected.y, vectorToEarthCorrected.z);

        double deltaLambdaFK5 = AASFK5.CorrectionInLongitude(appGeoLon, appGeoLat, jdeCorrected);
        double deltaBetaFK5   = AASFK5.CorrectionInLatitude(appGeoLon, jdeCorrected);

        lambdaFK5 = lambdaAberration + deltaLambdaFK5;
        betaFK5   = betaAberration + deltaBetaFK5;

        //correct for nutation
        double deltaPhi     = AASNutation.NutationInLongitude(jdeCorrected) / 3600;
        double deltaEpsilon = AASNutation.NutationInObliquity(jdeCorrected) / 3600;

        epsilon = AASNutation.TrueObliquityOfEcliptic(jdeCorrected);
        double lambdaNutation = lambdaFK5 + deltaPhi;
        double betaNutation   = betaFK5 + deltaEpsilon;

        //x=RA in decimal hours, y=dec in degrees
        AAS2DCoordinate equatorial = AASCoordinateTransformation.Ecliptic2Equatorial(lambdaNutation, betaNutation, epsilon);

        equatorialCoords.RA          = new HourAngle(equatorial.X);
        equatorialCoords.Declination = new DegreesAngle(equatorial.Y);
    }
        public void CorrectionInLatitudeTest(double JD, double longitude, double expectedCorrection)
        {
            double sunLatCorrection = AASFK5.CorrectionInLatitude(longitude, JD);

            Assert.Equal(expectedCorrection, sunLatCorrection);
        }