예제 #1
0
        public WiseHAEncoder(string name, WiseDecEncoder decEncoder)
        {
            WiseName    = "HAEncoder";
            Novas31     = new Astrometry.NOVAS.NOVAS31();
            astroutils  = new Astrometry.AstroUtils.AstroUtils();
            _decEncoder = decEncoder;

            axisEncoder = new WiseEncoder("HAAxis",
                                          1 << 16,
                                          new List <WiseEncSpec>()
                    {
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.FourthPortA, mask = 0xff
                    },
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.FourthPortB, mask = 0xff
                    },
                }
                                          );

            wormEncoder = new WiseEncoder("HAWorm",
                                          1 << 12,
                                          new List <WiseEncSpec>()
                    {
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.FourthPortCL, mask = 0x0f
                    },
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.ThirdPortA, mask = 0xff
                    },
                }
                                          );

            WiseName = name;

            if (Simulated)
            {
                _angle = new Angle("00h00m00.0s");
            }
        }
예제 #2
0
        public WiseDecEncoder(string name)
        {
            WiseName   = "DecEncoder";
            Novas31    = new Astrometry.NOVAS.NOVAS31();
            astroutils = new Astrometry.AstroUtils.AstroUtils();

            axisEncoder = new WiseEncoder("DecAxis",
                                          1 << 16,
                                          new List <WiseEncSpec>()
                    {
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.SecondPortA, mask = 0xff
                    },                                                                                         // [0]
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.SecondPortB, mask = 0xff
                    },                                                                                         // [1]
                }
                                          );

            wormEncoder = new WiseEncoder("DecWorm",
                                          1 << 12,
                                          new List <WiseEncSpec>()
                    {
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.SecondPortCL, mask = 0x0f
                    },                                                                                          // [0]
                    new WiseEncSpec()
                    {
                        brd = hw.teleboard, port = DigitalPortType.FirstPortA, mask = 0xff
                    },                                                                                          // [1]
                }
                                          );

            WiseName = name;

            Angle = Simulated ?
                    Angle.FromDegrees(85, Angle.Type.Dec) :
                    Angle.FromRadians(Radians, Angle.Type.Dec);
        }
 public static double NowLST(LatLon location)
 {
     var nov = new Astrometry.NOVAS.NOVAS31();
     var ast = new Astrometry.AstroUtils.AstroUtils();
     var currJD = ast.JulianDateUT1(0);
     double lstNow = 0;
     var res = nov.SiderealTime(
         currJD, 0d, 0, GstType.GreenwichApparentSiderealTime, Method.EquinoxBased, Accuracy.Full, ref lstNow);
     if (res != 0) throw new InvalidValueException("Error getting Local Apparent Sidereal time");
     return lstNow;
 }
예제 #4
0
 public AxisMonitor(TelescopeAxes axis)
 {
     _axis      = axis;
     WiseName   = _axis.ToString() + "Monitor";
     astroutils = new Astrometry.AstroUtils.AstroUtils();
 }