Esempio n. 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;
        }
Esempio n. 2
0
        public void FromWeatherDataInfoConnectedTest()
        {
            var info = new WeatherDataInfo()
            {
                Connected   = true,
                Temperature = 15,
                Humidity    = 99.8f
            };

            var sut = new ImageMetaData();

            sut.FromWeatherDataInfo(info);

            Assert.AreEqual(15, sut.WeatherData.Temperature);
            Assert.AreEqual((double)99.8f, sut.WeatherData.Humidity);
        }