Esempio n. 1
0
 public utmpos(utmpos pos)
 {
     this.x    = pos.x;
     this.y    = pos.y;
     this.zone = pos.zone;
     this.Tag  = null;
 }
Esempio n. 2
0
        // polar to rectangular
        static utmpos newpos(utmpos input, double bearing, double distance)
        {
            double degN = 90 - bearing;

            if (degN < 0)
            {
                degN += 360;
            }
            double x = input.x + distance * Math.Cos(degN * MathHelper.deg2rad);
            double y = input.y + distance * Math.Sin(degN * MathHelper.deg2rad);

            return(new utmpos(x, y, input.zone));
        }
Esempio n. 3
0
 public double GetDistance(utmpos b)
 {
     return(Math.Sqrt(Math.Pow(Math.Abs(x - b.x), 2) + Math.Pow(Math.Abs(y - b.y), 2)));
 }