Example #1
0
        private string GetSextantLocation()
        {
            if (TargetMap == null)
            {
                return("Unknown");
            }

            int x = Target.X;
            int y = Target.Y;

            int  xLong = 0, yLat = 0;
            int  xMins = 0, yMins = 0;
            bool xEast = false, ySouth = false;

            if (Sextant.Format(new Point3D(x, y, TargetMap.GetAverageZ(x, y)), TargetMap, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth))
            {
                return(String.Format("{0}° {1}'{2}, {3}° {4}'{5}", yLat, yMins, ySouth ? "S" : "N", xLong, xMins, xEast ? "E" : "W"));
            }

            return("Unknown");
        }