mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
[xswiftbus] log message when terrain probe fails to find ground elevation
This commit is contained in:
@@ -509,7 +509,7 @@ namespace XSwiftBus
|
||||
|
||||
const double latDeg = plane->position.lat;
|
||||
const double lonDeg = plane->position.lon;
|
||||
double groundElevation = plane->terrainProbe.getElevation(latDeg, lonDeg, plane->position.elevation);
|
||||
double groundElevation = plane->terrainProbe.getElevation(latDeg, lonDeg, plane->position.elevation, requestedCallsign);
|
||||
if (std::isnan(groundElevation)) { groundElevation = 0.0; }
|
||||
double fudgeFactor = 3.0;
|
||||
bool hasOffset = XPMPGetVerticalOffset(plane->id, &fudgeFactor);
|
||||
@@ -528,11 +528,11 @@ namespace XSwiftBus
|
||||
if (planeIt != m_planesByCallsign.end())
|
||||
{
|
||||
const Plane *plane = planeIt->second;
|
||||
return plane->terrainProbe.getElevation(latitudeDeg, longitudeDeg, altitudeMeters);
|
||||
return plane->terrainProbe.getElevation(latitudeDeg, longitudeDeg, altitudeMeters, callsign);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_terrainProbe.getElevation(latitudeDeg, longitudeDeg, altitudeMeters);
|
||||
return m_terrainProbe.getElevation(latitudeDeg, longitudeDeg, altitudeMeters, callsign + " (plane not found)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user