private SkyPosition _GetPreciseTargetPosition() { SkyPosition targetPoint = new SkyPosition(m_initialPosition); double sinDec = Math.Sin(m_initialPosition.Dec); double distanceInRad = m_distanceInDegrees * DegreeUtils.DToR; double sinDistance = Math.Sin(distanceInRad); double cosDistance = Math.Cos(distanceInRad); double sinDistanceCosPa = sinDistance * m_positionAngle.CosPa; double x = m_cosDec * cosDistance - sinDec * sinDistanceCosPa; double y = sinDistance * m_positionAngle.SinPa; double z = sinDec * cosDistance + m_cosDec * sinDistanceCosPa; if (x != 0 || y != 0) { targetPoint.Ra += Math.Atan2(y, x); } if (Math.Abs(z) < 0.7) { targetPoint.Dec = Math.Asin(z); } else { targetPoint.Dec = Math.Acos(Math.Sqrt(x * x + y * y)); if (z < 0) { targetPoint.Dec = -targetPoint.Dec; } } targetPoint.CorrectCoordinates(); return(targetPoint); }
private SkyPosition _GetSimpleTargetPosition() { SkyPosition targetPoint = new SkyPosition(m_initialPosition); targetPoint.RaDeg += m_distanceInDegrees * m_positionAngle.SinPa / m_cosDec; targetPoint.DecDeg += m_distanceInDegrees * m_positionAngle.CosPa; targetPoint.CorrectCoordinates(); return(targetPoint); }