Exemplo n.º 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");
            }
        }
Exemplo n.º 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);
        }