From c49168d8156deb366304d90bfd62012e558dc6dd Mon Sep 17 00:00:00 2001 From: Norman Princen <63923352+NPrincen@users.noreply.github.com> Date: Fri, 1 May 2020 04:59:43 -0700 Subject: [PATCH] Improved accuracy of HandleGetT terrain probe and requested changes --- xpcPlugin/MessageHandlers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xpcPlugin/MessageHandlers.cpp b/xpcPlugin/MessageHandlers.cpp index c8de4fd..43e90af 100644 --- a/xpcPlugin/MessageHandlers.cpp +++ b/xpcPlugin/MessageHandlers.cpp @@ -685,6 +685,7 @@ namespace XPC { Log::FormatLine(LOG_ERROR, "TERR", "Probe failed. Return Value %u", rc); XPLMDestroyProbe(Terrain_probe); + Terrain_probe = nullptr; return; } @@ -694,7 +695,7 @@ namespace XPC Log::FormatLine(LOG_TRACE, "TERR", "Conv LLA=%f, %f, %f", lat, lon, alt); // transform probe location to local coordinates - // Step 4. NOW convert your origina lat/lon with the elevation from step 3 to XYZ + // Step 4. NOW convert your original lat/lon with the elevation from step 3 to XYZ XPLMWorldToLocal(pos[0], pos[1], alt, &X, &Y, &Z); // query probe