Пример #1
0
        private static void TestCoordinateNorthPole2()
        {
            var northpole = new EquatorialCoordinate((Angle)13.7, Angle.FromDegrees(90.0));
            var moment    = new DateTimeOffset(2012, 5, 7, 23, 20, 12, TimeSpan.FromHours(2));

            var result = northpole.GetHorizontalCoordinate(moment, maassluisLon, maassluisLat);

            AssertEqual(result.Altitude, maassluisLat);
            AssertEqual(result.Azimuth, 0.0);
        }
Пример #2
0
        private static void TestCoordinateNorthPole1()
        {
            var northpole = new EquatorialCoordinate((Angle)13.7, Angle.FromDegrees(90.0));

            var moment = new DateTimeOffset(2012, 5, 7, 23, 20, 12, TimeSpan.FromHours(2));
            // If we're on the Earth's pole, Polaris is straight up
            var result = northpole.GetHorizontalCoordinate(moment, (Angle)34.2, Angle.FromDegrees(90));

            AssertEqual(result.Altitude.Degrees, 90.0);
        }
Пример #3
0
        private static void TestCoordinateVega()
        {
            var vega   = new EquatorialCoordinate(Angle.FromTime(new TimeSpan(18, 36, 56)), Angle.FromDegrees(38, 47, 3));
            var moment = new DateTimeOffset(2012, 5, 7, 23, 20, 12, TimeSpan.FromHours(2));
            // 23:56:04
            var result = vega.GetHorizontalCoordinate(moment, maassluisLon, maassluisLat);

            // expected values from Stellarium
            AssertEqual(result.Azimuth, Angle.FromDegrees(64, 19, 06));
            AssertEqual(result.Altitude, Angle.FromDegrees(30, 09, 21));
        }
Пример #4
0
        private static void TestCoordinateVegaOnEpoch()
        {
            var vega   = new EquatorialCoordinate(Angle.FromTime(new TimeSpan(18, 36, 56)), Angle.FromDegrees(38, 47, 3));
            var moment = Constants.J2000Epoch;
            // 17:05:30
            HorizontalCoordinate result;

            result = vega.GetHorizontalCoordinate(moment, maassluisLon, maassluisLat);
            // expected values from Stellarium
            AssertEqual(result.Azimuth, Angle.FromDegrees(197, 29, 13));
            AssertEqual(result.Altitude, Angle.FromDegrees(76, 22, 16));
        }