SITL: removed terrain home correction

This commit is contained in:
Andrew Tridgell 2022-01-31 15:35:06 +11:00
parent 5d3a0a78cb
commit 07b78ab9a6
2 changed files with 3 additions and 3 deletions

View File

@ -108,8 +108,8 @@ float Aircraft::ground_height_difference() const
if (sitl &&
terrain != nullptr &&
sitl->terrain_enable &&
terrain->height_amsl(home, h1, false) &&
terrain->height_amsl(location, h2, false)) {
terrain->height_amsl(home, h1) &&
terrain->height_amsl(location, h2)) {
h2 += local_ground_level;
return h2 - h1;
}

View File

@ -183,7 +183,7 @@ void ShipSim::send_report(void)
#if AP_TERRAIN_AVAILABLE
auto terrain = AP::terrain();
float height;
if (terrain != nullptr && terrain->enabled() && terrain->height_amsl(loc, height, true)) {
if (terrain != nullptr && terrain->enabled() && terrain->height_amsl(loc, height)) {
alt_mm = height * 1000;
}
#endif