public GpsCoordinate(GpsCoordinate.LatitudeRef latitudeRef, double degrees, double minutes) { this.latOrLon = LatOrLons.Latitude; this.SetCoordinate(degrees, minutes, 0); this.Numeric = latitudeRef == LatitudeRef.North ? this.Numeric : -this.Numeric; }
public GpsCoordinate(GpsCoordinate.LatitudeRef latitudeRef, double degrees, double minutes, double seconds) { this.latOrLon = LatOrLons.Latitude; int roundTo = 0; this.SetCoordinate(Math.Round(degrees, roundTo), Math.Round(minutes, roundTo), Math.Round(seconds, roundTo)); this.Numeric = latitudeRef == LatitudeRef.North ? this.Numeric : -this.Numeric; }
public GpsCoordinate(GpsCoordinate.LatitudeRef latitudeRef, double numeric) { if (Math.Abs(numeric) != numeric) { throw new Exception("Numeric should only be positive, use reference to specific direction"); } this.latOrLon = LatOrLons.Latitude; this.Numeric = latitudeRef == LatitudeRef.North ? numeric : -numeric; }