Пример #1
0
        public void CoordinatesTest_SetCoordinates_RaDecPartialsEqualCoordinates()
        {
            var l           = new CaptureSequenceList();
            var coordinates = new NINA.Utility.Astrometry.Coordinates(10, 10, NINA.Utility.Astrometry.Epoch.J2000, NINA.Utility.Astrometry.Coordinates.RAType.Hours);

            l.Coordinates = coordinates.Transform(NINA.Utility.Astrometry.Epoch.J2000);

            Assert.AreEqual(coordinates.RA, l.RAHours + l.RAMinutes + l.RASeconds);
            Assert.AreEqual(coordinates.Dec, l.DecDegrees + l.DecMinutes + l.DecSeconds);
        }
Пример #2
0
        [TestCase(-89, 59, 59, -89.99972222222222)] //high bound
        //[TestCase(90, 0, 1, 90)] //overflow
        //[TestCase(-90, 0, 1, 90)] //overflow
        public void CoordinatesTest_ManualInput_DecCheck(int decDegrees, int decMinutes, int decSeconds, double expected)
        {
            var l           = new CaptureSequenceList();
            var coordinates = new NINA.Utility.Astrometry.Coordinates(0, 0, NINA.Utility.Astrometry.Epoch.J2000, NINA.Utility.Astrometry.Coordinates.RAType.Hours);

            l.DecDegrees = decDegrees;
            l.DecMinutes = decMinutes;
            l.DecSeconds = decSeconds;

            Assert.AreEqual(expected, l.Coordinates.Dec, 0.000001, "Coordinates failed");
            Assert.AreEqual(decDegrees, l.DecDegrees, 0.000001, "Degrees failed");
            Assert.AreEqual(Math.Abs(decMinutes), l.DecMinutes, 0.000001, "Minutes failed");
            Assert.AreEqual(Math.Abs(decSeconds), l.DecSeconds, 0.000001, "Seconds failed");
        }
Пример #3
0
        [TestCase(0, 0, 0, 0)]                    //Lowest bound
        //[TestCase(24, 0, 0, 0)] //Overflow
        //[TestCase(0, 0, -1, 0)] //Overflow
        public void CoordinatesTest_ManualInput_RACheck(int raHours, int raMinutes, int raSeconds, double expected)
        {
            var l           = new CaptureSequenceList();
            var coordinates = new NINA.Utility.Astrometry.Coordinates(0, 0, NINA.Utility.Astrometry.Epoch.J2000, NINA.Utility.Astrometry.Coordinates.RAType.Hours);

            l.RAHours   = raHours;
            l.RAMinutes = raMinutes;
            l.RASeconds = raSeconds;

            Assert.AreEqual(expected, l.Coordinates.RA, 0.000001, "Coordinates failed");
            Assert.AreEqual(raHours, l.RAHours, 0.000001, "Hours failed");
            Assert.AreEqual(raMinutes, l.RAMinutes, 0.000001, "Minutes failed");
            Assert.AreEqual(raSeconds, l.RASeconds, 0.000001, "Seconds failed");
        }