public override PairA Scope2Horz(PairA scope, double equAngle)
        {
            ForceAlignment();
            double da = (equAngle - stars_[0].EquAngle) * equHorzDiff_ / equScopeDiff_;

            return((new Rotation3(-da, equAxis_) * rotationToStand_.Conj).Apply(scope.Offset(0, -altOffset_)));
        }
示例#2
0
 public override PairA Scope2Horz(PairA scope, double equAngle)
 {
     return((new Rotation3(-equAngle, equAxis_)).Apply(scope.Offset(-azmOffset_, -altOffset_)));
 }
示例#3
0
        public static void Align(Vect3 horz0, PairA scope0, Vect3 horz1, PairA scope1, Precisions precesions,
                                 out double altOffset, out Rotation3 rotationToStand, out double quality)
        {
            altOffset = CalcAltOffset(horz0, scope0, horz1, scope1);
            Vect3 s0 = new Vect3(scope0.Offset(0, -altOffset));
            Vect3 s1 = new Vect3(scope1.Offset(0, -altOffset));

            double abs;

            Vect3 n0 = horz0 - s0;

            abs = n0.Abs;
            if (abs < precesions.rotation_)
            {
                double angle = CalcRotationAngle(s0, horz1, s1);
                if (angle == 0 || angle == Math.PI)
                {
                    throw new ApplicationException("Error7");
                }

                quality         = -1;
                rotationToStand = new Rotation3(angle, s0);
                return;
            }
            n0 /= abs;

            Vect3 n1 = horz1 - s1;

            abs = n1.Abs;
            if (abs < precesions.rotation_)
            {
                double angle = CalcRotationAngle(s1, horz0, s0);
                if (angle == 0 || angle == Math.PI)
                {
                    throw new ApplicationException("Error8");
                }

                quality         = -2;
                rotationToStand = new Rotation3(angle, s1);
                return;
            }
            n1 /= abs;

            // axis
            Vect3 axis = Vect3.VMul(n0, n1);

            abs = axis.Abs;
            if (abs < precesions.axis_)
            {
                throw new ApplicationException("Error4");
            }
            axis /= abs;

            double angle0 = CalcRotationAngle(axis, horz0, s0);

            if (angle0 == 0 || angle0 == Math.PI)
            {
                throw new ApplicationException("Error5");
            }

            double angle1 = CalcRotationAngle(axis, horz1, s1);

            if (angle1 == 0 || angle1 == Math.PI)
            {
                throw new ApplicationException("Error6");
            }

            quality         = Math.Abs(angle0 - angle1);
            rotationToStand = new Rotation3((angle0 + angle1) / 2, axis);
        }
 public override PairA Scope2Horz(PairA scope, double equAngle)
 {
     return((new Rotation3(-equAngle * equAngleFactor_, equAxis_) * rotationToStand_.Conj).Apply(scope.Offset(0, -altOffset_)));
 }
示例#5
0
 public override PairA Scope2Horz(PairA scope, double equAngle)
 {
     ForceAlignment();
     return((new Rotation3(stars_[0].EquAngle - equAngle, equAxis_) * rotationToStand_.Conj).Apply(scope.Offset(0, -altOffset_)));
 }