Пример #1
0
        /*
         * Returns the absolute difference of PA in interval from 0 to 180 degrees
         */
        public double AbsoluteDifferenceDeg(PositionAngle otherPositionAngle)
        {
            double differenceDeg = Math.Abs(m_positionAngleDeg - otherPositionAngle.m_positionAngleDeg);

            while (differenceDeg > 180)
            {
                differenceDeg = Math.Abs(differenceDeg - 360);
            }
            return(differenceDeg);
        }
Пример #2
0
 public SkyPosition GetTargetPosition(PositionAngle positionAngle, double distanceInDegrees)
 {
     m_positionAngle     = positionAngle;
     m_distanceInDegrees = distanceInDegrees;
     if ((distanceInDegrees < 0.1) && (m_cosDec > 0.1))
     {
         // for small distances and declination below 84, use the simple method
         // usable for most of the asteroids
         return(_GetSimpleTargetPosition());
     }
     else
     {
         return(_GetPreciseTargetPosition());
     }
 }
Пример #3
0
        public SkyPosition GetTargetPosition(PositionAngle positionAngle, double distanceInDegrees)
        {
            PositionExtrapolator positionExtrapolator = new PositionExtrapolator(this);

            return(positionExtrapolator.GetTargetPosition(positionAngle, distanceInDegrees));
        }
Пример #4
0
        public bool IsPositionAngleInTolerance(PositionAngle otherPositionAngle, double toleranceDeg)
        {
            double positionAngleDifference = AbsoluteDifferenceDeg(otherPositionAngle);

            return(positionAngleDifference < toleranceDeg);
        }