Skip to content

Commit

Permalink
SRTM: migrate to terrain.ardupilot.org
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 authored and meee1 committed Dec 14, 2022
1 parent fa0e386 commit 993ea97
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ExtLibs/Utilities/srtm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ static async Task get3secfile(object name)
List<string> list = new List<string>();

// load 1 arc seconds first
list.AddRange(await getListing(baseurl1sec).ConfigureAwait(false));
list.Add(baseurl1sec);
log.Info("srtm1sec " + list.Count);
// load 3 arc second
list.AddRange(await getListing(baseurl).ConfigureAwait(false));
Expand All @@ -623,18 +623,18 @@ static async Task get3secfile(object name)
}
}

// if there are no http exceptions, and the list is >= 20, then everything above is valid
// 15760 is all srtm3 and srtm1
if (list.Count >= 21 && checkednames > 15000 && !oceantile.Contains((string) name))
// if there are no http exceptions, and the list is >= 9, then everything above is valid
// 38581 is all srtm3 and srtm1
if (list.Count >= 9 && checkednames > 38000 && !oceantile.Contains((string) name))
{
// we must be an ocean tile - no matchs
oceantile.Add((string) name);
}
}

public static string baseurl1sec { get; set; }= "https://firmware.ardupilot.org/SRTM/USGS/SRTM1/version2_1/SRTM1/";
public static string baseurl1sec { get; set; }= "https://terrain.ardupilot.org/SRTM1/";

public static string baseurl { get; set; }= "https://firmware.ardupilot.org/SRTM/";
public static string baseurl { get; set; }= "https://terrain.ardupilot.org/SRTM3/";

static HttpClient client = new HttpClient();

Expand Down

0 comments on commit 993ea97

Please sign in to comment.