/// <summary>
        /// Returns the AltAzimuth coordinate for the equatorial using the values
        /// currently set in the passed Transform instance.
        /// </summary>
        /// <param name="transform"></param>
        /// <returns></returns>
        public AltAzCoordinate GetAltAzimuth(Transform transform)
        {
            transform.SetTopocentric(_Equatorial.RightAscension, _Equatorial.Declination);
            transform.Refresh();
            AltAzCoordinate coord = new AltAzCoordinate(transform.ElevationTopocentric, transform.AzimuthTopocentric);

            return(coord);
        }
 /// <summary>
 /// Initialise a mount coordinate with Ra/Dec strings and axis positions in radians.
 /// </summary>
 /// <param name="altAz">The AltAzimuth coordinate for the mount</param>
 /// <param name="suggested">The suggested position for the axes (e.g. via a star catalogue lookup)</param>
 /// <param name="localTime">The local time of the observation</param>
 public MountCoordinate(string ra, string dec, IntegerPair axisPosition, Transform transform, double localJulianTimeUTC) : this(new EquatorialCoordinate(ra, dec))
 {
     _Equatorial        = new EquatorialCoordinate(ra, dec);
     _AltAzimuth        = this.GetAltAzimuth(transform, localJulianTimeUTC);
     _AxesPosition      = axisPosition;
     _AxisJulianTimeUTC = localJulianTimeUTC;
     _MasterCoordinate  = MasterCoordinateEnum.Equatorial;
 }
Exemple #3
0
        public CarteseanCoordinate ToCartesean(Angle latitude, bool affineTaki = true)
        {
            CarteseanCoordinate cartCoord;

            if (affineTaki)
            {
                // Get Polar (or should than be get AltAzimuth) from Equatorial coordinate (formerly call to EQ_SphericalPolar)
                AltAzCoordinate polar = AstroConvert.GetAltAz(this, latitude);
                // Get  Cartesean from Polar (formerly call to EQ_Polar2Cartes)
                cartCoord = polar.ToCartesean();
            }
            else
            {
                cartCoord = new CarteseanCoordinate(this.RightAscension.Radians, this.Declination.Radians, 1.0);
            }
            return(cartCoord);
        }
 /// <summary>
 /// Initialisation with an equatorial coordinate, a transform instance and the local julian time (corrected)
 /// which then means that the AltAzimunth at the time is available.
 /// </summary>
 public MountCoordinate(AltAzCoordinate altAz, Transform transform, double localJulianTimeUTC) : this(altAz)
 {
     _LocalJulianTimeUTC = localJulianTimeUTC;
     _Equatorial         = this.GetEquatorial(transform, localJulianTimeUTC);
 }
 /// <summary>
 /// Initialisation with an equatorial coordinate, a transform instance and the local julian time (corrected)
 /// which then means that the AltAzimunth at the time is available.
 /// </summary>
 public MountCoordinate(EquatorialCoordinate equatorial, Transform transform, double localJulianTimeUTC) : this(equatorial)
 {
     _AltAzimuth         = this.GetAltAzimuth(transform, localJulianTimeUTC);
     _LocalJulianTimeUTC = localJulianTimeUTC;
 }
 /// <summary>
 /// Simple initialisation with an altAzimuth coordinate
 /// </summary>
 public MountCoordinate(AltAzCoordinate altAz)
 {
     _AltAzimuth       = altAz;
     _MasterCoordinate = MasterCoordinateEnum.AltAzimuth;
 }