Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = EntryDateTimeOffset.GetHashCode();
         hashCode = (hashCode * 397) ^ (Point != null ? Point.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Heading.GetHashCode();
         hashCode = (hashCode * 397) ^ Pitch.GetHashCode();
         hashCode = (hashCode * 397) ^ Roll.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 2
0
 public bool Equals(CompassLogEntry other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(EntryDateTimeOffset.Equals(other.EntryDateTimeOffset) &&
            Equals(Point, other.Point) &&
            Heading.Equals(other.Heading) &&
            Pitch.Equals(other.Pitch) &&
            Roll.Equals(other.Roll));
 }
Esempio n. 3
0
 public override string ToString()
 {
     return(string.Format(CultureInfo.InvariantCulture, "{0},{1},{2},{3},{4},{5}",
                          EntryDateTimeOffset.ToUnixTimeMilliseconds(), Point?.Latitude.ToDegrees(), Point?.Longitude.ToDegrees(), Heading, Pitch, Roll));
 }