Browse Source

SITL: removed terrain home correction

gps-1.3.1
Andrew Tridgell 3 years ago
parent
commit
fa4edc2ba1
  1. 4
      libraries/SITL/SIM_Aircraft.cpp
  2. 2
      libraries/SITL/SIM_Ship.cpp

4
libraries/SITL/SIM_Aircraft.cpp

@ -108,8 +108,8 @@ float Aircraft::ground_height_difference() const @@ -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;
}

2
libraries/SITL/SIM_Ship.cpp

@ -183,7 +183,7 @@ void ShipSim::send_report(void) @@ -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

Loading…
Cancel
Save