Exemple #1
0
        internal void AddDitherIndicator()
        {
            lock (lockObj) {
                var dither = HistoryStep.GenerateDitherStep();
                overallGuideSteps.AddLast(dither);

                GuideSteps.Add(dither);
            }
        }
Exemple #2
0
 public void Clear()
 {
     lock (lockObj) {
         overallGuideSteps.Clear();
         GuideSteps.Clear();
         RMS.Clear();
         MaxDurationY = 1;
         HistoryStep.ResetIdProvider();
     }
 }
Exemple #3
0
        /// <summary>
        /// This method will be called by the Guide client and this will show the first Step popup in the list
        /// </summary>
        internal void Play()
        {
            if (GuideSteps.Any())
            {
                Step firstStep = GuideSteps.FirstOrDefault();
                CurrentStep = firstStep;

                firstStep.Show(GuideFlow.FORWARD);
            }
        }
Exemple #4
0
        public void AddGuideStep(IGuideStep step)
        {
            lock (lockObj) {
                var historyStep = HistoryStep.FromGuideStep(step, Scale == GuiderScaleEnum.PIXELS ? 1 : PixelScale);
                overallGuideSteps.AddLast(historyStep);

                if (GuideSteps.Count == HistorySize)
                {
                    var elementIdx = overallGuideSteps.Count - HistorySize;
                    if (elementIdx >= 0)
                    {
                        var stepToRemove = overallGuideSteps.ElementAt(elementIdx);
                        RMS.RemoveDataPoint(stepToRemove.RADistanceRaw, stepToRemove.DECDistanceRaw);
                    }
                }

                RMS.AddDataPoint(step.RADistanceRaw, step.DECDistanceRaw);

                GuideSteps.Add(historyStep);
                CalculateMaximumDurationY();
            }
        }
Exemple #5
0
 private void CalculateMaximumDurationY()
 {
     MaxDurationY = Math.Abs(GuideSteps.Max((x) => Math.Max(Math.Abs(x.RADuration), Math.Abs(x.DECDuration))));
 }