Ejemplo n.º 1
0
        internal IsolatedTelescope(string progId)
        {
            m_TelescopeCapabilities = null;

            m_Telescope = new global::ASCOM.DriverAccess.Telescope(progId);
            SetIsolatedDevice(m_Telescope, progId);
        }
Ejemplo n.º 2
0
 private void OnTelescopeCapabilitiesKnown(TelescopeCapabilities capabilities)
 {
     EventHelper.RaiseEvent(TelescopeCapabilitiesKnown, capabilities);
 }
Ejemplo n.º 3
0
        private TelescopeCapabilities GetTelescopeCapabilitiesInternal()
        {
            var rv = new TelescopeCapabilities();
            var sw = new Stopwatch();

            try
            {
                rv.CanFindHome = m_Telescope.CanFindHome;
                rv.CanPark = m_Telescope.CanPark;
                rv.CanPulseGuide = m_Telescope.CanPulseGuide;
                rv.CanSetDeclinationRate = m_Telescope.CanSetDeclinationRate;
                rv.CanSetRightAscensionRate = m_Telescope.CanSetRightAscensionRate;
                rv.CanSetGuideRates = m_Telescope.CanSetGuideRates;
                rv.CanSync = m_Telescope.CanSync;
                rv.DoesRefraction = m_Telescope.DoesRefraction;
                rv.DefaultGuideRateRightAscension = m_Telescope.GuideRateRightAscension;
                rv.DefaultGuideRateDeclination = m_Telescope.GuideRateDeclination;
                rv.FocalLengthMeters = m_Telescope.FocalLength;
                rv.ApertureMeters = m_Telescope.ApertureDiameter;
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.GetFullStackTrace());
            }
            finally
            {
                sw.Stop();
                Trace.WriteLine(string.Format("Telescope.GetTelescopeCapabilitiesInternal() took {0} ms", (int)sw.ElapsedMilliseconds));
            }

            return rv;
        }
Ejemplo n.º 4
0
 protected override void OnConnected()
 {
     m_TelescopeCapabilities = GetTelescopeCapabilities();
 }
Ejemplo n.º 5
0
        public TelescopeCapabilities GetTelescopeCapabilities()
        {
            if (m_TelescopeCapabilities == null)
                m_TelescopeCapabilities = GetTelescopeCapabilitiesInternal();

            return m_TelescopeCapabilities;
        }
Ejemplo n.º 6
0
 private void GetTelescopeCapabilities(bool force)
 {
     if (force || !m_CapabilitiesKnown)
     {
         m_TelescopeCapabilities = m_IsolatedTelescope.GetTelescopeCapabilities();
         if (m_TelescopeCapabilities != null)
         {
             Trace.WriteLine(m_TelescopeCapabilities.AsSerialized().OuterXml);
             m_DefaultGuideRateRightAscension = m_TelescopeCapabilities.DefaultGuideRateRightAscension;
             m_DefaultGuideRateDeclination = m_TelescopeCapabilities.DefaultGuideRateDeclination;
             m_FocalLengthMeters = m_TelescopeCapabilities.FocalLengthMeters;
             m_ApertureDiameterMeters = m_TelescopeCapabilities.ApertureMeters;
             m_CapabilitiesKnown = true;
         }
     }
 }
Ejemplo n.º 7
0
        void observatoryController_TelescopeCapabilitiesKnown(TelescopeCapabilities capabilities)
        {
            m_FocalLengthMillimeters = capabilities.FocalLengthMeters / 1000.0;
            if (Settings.Default.FocalReducerUsed) m_FocalLengthMillimeters /= Settings.Default.FocalReducerValue;

            m_BaseLimitingMagnitde = 3 /* from video integration */ + 5 /* sky limiting mag */ + 5 * Math.Log10(capabilities.ApertureMeters / 10.0);

            m_TelescopeIsConnected = true;
            m_FOVKnown = false;
        }