From a1169e4f7596194580306e98b1b8eaac0c0da133 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 21 Dec 2014 09:53:32 +0300 Subject: [PATCH] Expose waypoint heading/course to Nasal. --- src/Scripting/NasalPositioned.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Scripting/NasalPositioned.cxx b/src/Scripting/NasalPositioned.cxx index 9d1260bd3..b8e4e62df 100644 --- a/src/Scripting/NasalPositioned.cxx +++ b/src/Scripting/NasalPositioned.cxx @@ -443,6 +443,8 @@ static const char* waypointCommonGetMember(naContext c, Waypt* wpt, const char* } else { *out = stringToNasal(c, wpt->flag(WPT_OVERFLIGHT) ? "flyOver" : "flyBy"); } + } else if (!strcmp(fieldName, "heading_course")) { + *out = naNum(wpt->headingRadialDeg()); } else { return NULL; // member not found }