Beispiel #1
0
        private void AddMetaData(
            ImageMetaData metaData,
            CaptureSequence sequence,
            DateTime start,
            RMS rms,
            string targetName)
        {
            metaData.Image.ExposureStart  = start;
            metaData.Image.Binning        = sequence.Binning.Name;
            metaData.Image.ExposureNumber = sequence.ProgressExposureCount;
            metaData.Image.ExposureTime   = sequence.ExposureTime;
            metaData.Image.ImageType      = sequence.ImageType;
            metaData.Image.RecordedRMS    = rms;
            metaData.Target.Name          = targetName;

            // Fill all available info from profile
            metaData.FromProfile(profileService.ActiveProfile);
            metaData.FromTelescopeInfo(telescopeInfo);
            metaData.FromFilterWheelInfo(filterWheelInfo);
            metaData.FromRotatorInfo(rotatorInfo);
            metaData.FromFocuserInfo(focuserInfo);
            metaData.FromWeatherDataInfo(weatherDataInfo);

            metaData.FilterWheel.Filter = sequence.FilterType?.Name ?? metaData.FilterWheel.Filter;
        }
Beispiel #2
0
        public void FromRotatorInfoConnectedTest()
        {
            var info = new RotatorInfo()
            {
                Connected = true,
                Name      = "TestRotator",
                Position  = 123,
                StepSize  = 3.8f
            };

            var sut = new ImageMetaData();

            sut.FromRotatorInfo(info);

            Assert.AreEqual("TestRotator", sut.Rotator.Name);
            Assert.AreEqual(123, sut.Rotator.Position);
            Assert.AreEqual((double)3.8f, sut.Rotator.StepSize);
        }
Beispiel #3
0
        public void FromRotatorInfoNotConnectedTest()
        {
            var info = new RotatorInfo()
            {
                Connected = false,
                Name      = "TestRotator",
                Position  = 123,
                StepSize  = 3.8f
            };

            var sut = new ImageMetaData();

            sut.FromRotatorInfo(info);

            Assert.AreEqual(string.Empty, sut.Rotator.Name);
            Assert.AreEqual(double.NaN, sut.Rotator.Position);
            Assert.AreEqual(double.NaN, sut.Rotator.StepSize);
        }