Ejemplo n.º 1
0
        public GpsCoordinate(GpsCoordinate.LongitudeRef longitudeRef, double degrees, double minutes)
        {
            this.latOrLon = LatOrLons.Longitude;
            this.SetCoordinate(degrees, minutes, 0);

            this.Numeric = longitudeRef == LongitudeRef.East ? this.Numeric : -this.Numeric;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        public GpsCoordinate(GpsCoordinate.LongitudeRef longitudeRef, double numeric)
        {
            if (Math.Abs(numeric) != numeric)
            {
                throw new Exception("Numeric should only be positive, use reference to specific direction");
            }

            this.latOrLon = LatOrLons.Longitude;
            this.Numeric  = longitudeRef == LongitudeRef.East ? numeric : -numeric;
        }
Ejemplo n.º 4
0
 public GpsCoordinate(GpsCoordinate.LatOrLons latOrLon, double numeric)
 {
     this.Numeric  = numeric;
     this.latOrLon = latOrLon;
 }
Ejemplo n.º 5
0
 public GpsCoordinate(GpsCoordinate.LatOrLons latOrLon)
 {
     this.Numeric  = double.NaN;
     this.latOrLon = latOrLon;
 }
Ejemplo n.º 6
0
 public GpsCoordinate()
 {
     this.Numeric  = double.NaN;
     this.latOrLon = LatOrLons.NotSpecified;
 }