Ejemplo n.º 1
0
        /// <summary>
        /// Returns the current instance adjusted to the specified orientation and
        /// origin.
        /// </summary>
        public PolarCoordinate ToOrientation(Azimuth origin, PolarCoordinateOrientation orientation)
        {
            if (_Orientation.Equals(orientation) && _Origin.Equals(origin))
            {
                return(this);
            }
            // Make a copy of the angle
            double NewAngle = Theta.DecimalDegrees;

            // Has the CW/CCW orientation changed?
            if (Orientation != orientation)
            {
                // Yes.  Subtract the angle from 360
                NewAngle = 360 - NewAngle;
            }
            if (Origin != origin)
            {
                // Add the offset to the angle and normalize
                NewAngle -= 360 - origin.DecimalDegrees - Origin.DecimalDegrees;
            }
            // And return the new coordinate
            return(new PolarCoordinate(_R, new Angle(NewAngle), origin, orientation));
        }
Ejemplo n.º 2
0
 /// <inheritdoc />
 protected bool Equals(TopocentricObservation other)
 {
     return(Azimuth.Equals(other.Azimuth) && Elevation.Equals(other.Elevation) && Range.Equals(other.Range) &&
            RangeRate.Equals(other.RangeRate));
 }
Ejemplo n.º 3
0
 protected bool Equals(HorizontalCs other)
 {
     return(Azimuth.Equals(other.Azimuth) && Altitude.Equals(other.Altitude));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Compares the current instance to the specified velocity.
 /// </summary>
 /// <param name="other">A <strong>Velocity</strong> object to compare with.</param>
 /// <returns>A <strong>Boolean</strong>, <strong>True</strong> if the values are identical.</returns>
 public bool Equals(Velocity other)
 {
     return(_speed.Equals(other.Speed) &&
            _bearing.Equals(other.Bearing));
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Test another curve for equality
 /// </summary>
 /// <param name="other">The other geodetic curve</param>
 /// <returns>True if they are the same</returns>
 public bool Equals(GeodeticCurve other)
 {
     return(EllipsoidalDistance.IsApproximatelyEqual(other.EllipsoidalDistance) && Azimuth.Equals(other.Azimuth) &&
            Calculator.Equals(other.Calculator));
 }