MissionPlanner.srtm.srtm C# (CSharp) Method

srtm() static private method

static private srtm ( ) : System
return System
        static srtm()
        {
            // running tostring at a high rate was costing cpu
            for (int y = -90; y <= 90; y++)
            {
                var sy = Math.Abs(y).ToString("00");

                for (int x = -180; x <= 180; x++)
                {
                    var sx = Math.Abs(x).ToString("000");

                    filenameDictionary[y*1000 + x] = string.Format("{0}{1}{2}{3}{4}", y >= 0 ? "N" : "S", sy,
                        x >= 0 ? "E" : "W", sx, ".hgt");
                }
            }
        }