Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Azimuth.GetHashCode() * 397) ^ Altitude.GetHashCode());
     }
 }
 public override int GetHashCode()
 {
     return(Duration.GetHashCode()
            ^ Altitude.GetHashCode()
            ^ Pitch.GetHashCode()
            ^ HeadingStep.GetHashCode());
 }
Example #3
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (header_ != null)
        {
            hash ^= Header.GetHashCode();
        }
        if (Latitude != 0D)
        {
            hash ^= Latitude.GetHashCode();
        }
        if (Longitude != 0D)
        {
            hash ^= Longitude.GetHashCode();
        }
        if (Altitude != 0D)
        {
            hash ^= Altitude.GetHashCode();
        }
        if (status_ != null)
        {
            hash ^= Status.GetHashCode();
        }
        return(hash);
    }
Example #4
0
        /* ---------- Public methods ----------------------------------------------------------/**/

        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data
        /// structures like a hash table.
        /// </returns>
        /// <remarks>
        /// The hash code generation process ignores properties <see cref="Checksum1" />,
        /// <see cref="Checksum2" /> and <see cref="NcomPacket.Checksum3" />, since they are not
        /// used when testing for equality.
        /// </remarks>
        public override int GetHashCode()
        {
            int hash = 13;
            int mul  = 7;

            hash = (hash * mul) + base.GetHashCode();

            hash = (hash * mul) + Time.GetHashCode();

            hash = (hash * mul) + AccelerationX.GetHashCode();
            hash = (hash * mul) + AccelerationY.GetHashCode();
            hash = (hash * mul) + AccelerationZ.GetHashCode();

            hash = (hash * mul) + AngularRateX.GetHashCode();
            hash = (hash * mul) + AngularRateY.GetHashCode();
            hash = (hash * mul) + AngularRateZ.GetHashCode();

            hash = (hash * mul) + Latitude.GetHashCode();
            hash = (hash * mul) + Longitude.GetHashCode();
            hash = (hash * mul) + Altitude.GetHashCode();

            hash = (hash * mul) + NorthVelocity.GetHashCode();
            hash = (hash * mul) + EastVelocity.GetHashCode();
            hash = (hash * mul) + DownVelocity.GetHashCode();

            hash = (hash * mul) + Heading.GetHashCode();
            hash = (hash * mul) + Pitch.GetHashCode();
            hash = (hash * mul) + Roll.GetHashCode();

            hash = (hash * mul) + (StatusChannel != null ? StatusChannel.GetHashCode() : 0);

            return(hash);
        }
Example #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Azimuth.GetHashCode();
         hashCode = (hashCode * 397) ^ Altitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Distance.GetHashCode();
         return((hashCode * 397) ^ ParallacticAngle.GetHashCode());
     }
 }
Example #6
0
        public override int GetHashCode()
        {
            var hashCode = -1575447554;

            hashCode = hashCode * -1521134295 + Latitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Longitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Altitude.GetHashCode();
            hashCode = hashCode * -1521134295 + AltitudeReference.GetHashCode();
            return(hashCode);
        }
Example #7
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + Azimuth.GetHashCode();
         hash = hash * 23 + Altitude.GetHashCode();
         return(hash);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Altitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Barometer.GetHashCode();
         hashCode = (hashCode * 397) ^ Temperature.GetHashCode();
         hashCode = (hashCode * 397) ^ RelativeHumidity.GetHashCode();
         return(hashCode);
     }
 }
Example #9
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Time != null)
         {
             hashCode = hashCode * 59 + Time.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (Latlng != null)
         {
             hashCode = hashCode * 59 + Latlng.GetHashCode();
         }
         if (Altitude != null)
         {
             hashCode = hashCode * 59 + Altitude.GetHashCode();
         }
         if (VelocitySmooth != null)
         {
             hashCode = hashCode * 59 + VelocitySmooth.GetHashCode();
         }
         if (Heartrate != null)
         {
             hashCode = hashCode * 59 + Heartrate.GetHashCode();
         }
         if (Cadence != null)
         {
             hashCode = hashCode * 59 + Cadence.GetHashCode();
         }
         if (Watts != null)
         {
             hashCode = hashCode * 59 + Watts.GetHashCode();
         }
         if (Temp != null)
         {
             hashCode = hashCode * 59 + Temp.GetHashCode();
         }
         if (Moving != null)
         {
             hashCode = hashCode * 59 + Moving.GetHashCode();
         }
         if (GradeSmooth != null)
         {
             hashCode = hashCode * 59 + GradeSmooth.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>Returns the hash code for this instance.</summary>
        /// <returns>A 32-bit signed integer hash code.</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 17 * Latitude.GetHashCode();
                hash = hash * 23 + Longitude.GetHashCode();

                if (Altitude != null)
                {
                    hash = hash * 23 + Altitude.GetHashCode();
                }
                return(hash);
            }
        }
Example #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Latitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Longitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Accuracy.GetHashCode();
         hashCode = (hashCode * 397) ^ Altitude.GetHashCode();
         hashCode = (hashCode * 397) ^ VerticalAccuracy.GetHashCode();
         hashCode = (hashCode * 397) ^ Bearing.GetHashCode();
         hashCode = (hashCode * 397) ^ Speed.GetHashCode();
         return(hashCode);
     }
 }
Example #12
0
        public override int GetHashCode()
        {
            var hashCode = -681162261;

            hashCode = hashCode * -1521134295 + Latitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Longitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Accuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + Speed.GetHashCode();
            hashCode = hashCode * -1521134295 + Course.GetHashCode();
            hashCode = hashCode * -1521134295 + Altitude.GetHashCode();
            hashCode = hashCode * -1521134295 + VerticalAccuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <DateTimeOffset> .Default.GetHashCode(Timestamp);

            return(hashCode);
        }
Example #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (StatusCode != 0)
            {
                hash ^= StatusCode.GetHashCode();
            }
            if (RequestId != 0UL)
            {
                hash ^= RequestId.GetHashCode();
            }
            hash ^= requests_.GetHashCode();
            if (unknown6_ != null)
            {
                hash ^= Unknown6.GetHashCode();
            }
            if (Latitude != 0D)
            {
                hash ^= Latitude.GetHashCode();
            }
            if (Longitude != 0D)
            {
                hash ^= Longitude.GetHashCode();
            }
            if (Altitude != 0D)
            {
                hash ^= Altitude.GetHashCode();
            }
            if (authInfo_ != null)
            {
                hash ^= AuthInfo.GetHashCode();
            }
            if (authTicket_ != null)
            {
                hash ^= AuthTicket.GetHashCode();
            }
            if (MsSinceLastLocationfix != 0L)
            {
                hash ^= MsSinceLastLocationfix.GetHashCode();
            }
            return(hash);
        }
Example #14
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)Flags;
         hashCode = (hashCode * 397) ^ (Pips != null ? Pips.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FireGroup.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)GuiFocus;
         hashCode = (hashCode * 397) ^ (Fuel != null ? Fuel.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)LegalState;
         hashCode = (hashCode * 397) ^ Cargo.GetHashCode();
         hashCode = (hashCode * 397) ^ Latitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Altitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Longitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Heading.GetHashCode();
         hashCode = (hashCode * 397) ^ (BodyName != null ? BodyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ PlanetRadius.GetHashCode();
         return(hashCode);
     }
 }
Example #15
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (StatusCode != 0)
            {
                hash ^= StatusCode.GetHashCode();
            }
            if (RequestId != 0UL)
            {
                hash ^= RequestId.GetHashCode();
            }
            hash ^= requests_.GetHashCode();
            hash ^= unknown6_.GetHashCode();
            if (Latitude != 0D)
            {
                hash ^= Latitude.GetHashCode();
            }
            if (Longitude != 0D)
            {
                hash ^= Longitude.GetHashCode();
            }
            if (Altitude != 0D)
            {
                hash ^= Altitude.GetHashCode();
            }
            if (authInfo_ != null)
            {
                hash ^= AuthInfo.GetHashCode();
            }
            if (authTicket_ != null)
            {
                hash ^= AuthTicket.GetHashCode();
            }
            if (Unknown12 != 0L)
            {
                hash ^= Unknown12.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Vno.Length != 0)
            {
                hash ^= Vno.GetHashCode();
            }
            if (VColor != 0)
            {
                hash ^= VColor.GetHashCode();
            }
            if (FromChannel.Length != 0)
            {
                hash ^= FromChannel.GetHashCode();
            }
            if (Encrypt != 0)
            {
                hash ^= Encrypt.GetHashCode();
            }
            if (GpsTime != 0L)
            {
                hash ^= GpsTime.GetHashCode();
            }
            if (Lon != 0L)
            {
                hash ^= Lon.GetHashCode();
            }
            if (Lat != 0L)
            {
                hash ^= Lat.GetHashCode();
            }
            if (Vec1 != 0)
            {
                hash ^= Vec1.GetHashCode();
            }
            if (Vec2 != 0)
            {
                hash ^= Vec2.GetHashCode();
            }
            if (Vec3 != 0)
            {
                hash ^= Vec3.GetHashCode();
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (Altitude != 0)
            {
                hash ^= Altitude.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (Alarm != 0)
            {
                hash ^= Alarm.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #17
0
 public override int GetHashCode() => Latitude.GetHashCode() ^ Longitude.GetHashCode() ^ Altitude.GetHashCode() ^ AltitudeReference.GetHashCode();
Example #18
0
 /// <summary>
 /// The hash code is used for putting objects into dictionaries.
 /// </summary>
 /// <returns>A hash code</returns>
 public override int GetHashCode()
 {
     return(Latitude.GetHashCode()
            ^ Longitude.GetHashCode()
            ^ Altitude.GetHashCode());
 }