Exemplo n.º 1
0
        public TelescopeEquatorialPosition GetEquatorialPosition()
        {
            var rv = new TelescopeEquatorialPosition();
            var sw = new Stopwatch();

            try
            {
                sw.Start();

                rv.RightAscension = m_Telescope.RightAscension;
                rv.Declination = m_Telescope.Declination;
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.GetFullStackTrace());
            }
            finally
            {
                sw.Stop();
                Trace.WriteLine(string.Format("Telescope.GetEquatorialPosition() took {0} ms", (int)sw.ElapsedMilliseconds));
            }

            return rv;
        }
Exemplo n.º 2
0
        private void OnTelescopePosition(TelescopeEquatorialPosition position)
        {
            m_CurrentTelescopePosition = position;

            try
            {
                NativeHelpers.CurrentTelescopePosition = string.Format("{0};{1}", AstroConvert.ToStringValue(position.RightAscension, "HHh MMm SSs"), AstroConvert.ToStringValue(position.Declination, "+DDo MM' SS.T\""));
            }
            catch
            { }

            EventHelper.RaiseEvent(TelescopePositionChanged, position);
        }
Exemplo n.º 3
0
 void TelescopePositionChanged(TelescopeEquatorialPosition position)
 {
     tssRA.Text = AstroConvert.ToStringValue(position.RightAscension, "HHh MMm SSs");
     tssDE.Text = AstroConvert.ToStringValue(position.Declination, "+DD° MM' SS\"");
 }