Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all articles
Browse latest Browse all 45723

Problem with Absolute Altitude near the meridian of Greenwich

$
0
0

@SergeB wrote:

Waypoint created with MissionPlanner near the meridien Greenwich never have the absolute altitude. Exactly beetwen the longitude 0 degree and 1 degree EST.
Files as N48E000, N49E000 ... are not loaded in the srtm directory of MissionPlanner

I looked to the code and I think that le problem comes from the srtm.cs file,
in the :
"public static altresponce getAltitude(double lat, double lng, double zoom = 16)" function,
at the line 83 of srtm.cs
The code :
string ew;
if (x > 0)
ew = "E";
else
ew = "W";

would be :
string ew;
if (x >= 0) // Change is here.
ew = "E";
else
ew = "W";

I compiled and the code works correctly.

The same problem comes with Latitude, near Equateur. Line 77 of srtm.cs
The code :
string ns;
if (y > 0)
ns = "N";
else
ns = "S";

would be :
string ns;
if (y >= 0) // Change is here
ns = "N";
else
ns = "S";

I hope to have helped little.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 45723

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>