From a876ff93e158c444b4585efd73c248b45c56336c Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Thu, 12 Jul 2012 00:10:00 +0200 Subject: [PATCH] NasalPositioned: Expose actual postion of parkings --- src/Scripting/NasalPositioned.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Scripting/NasalPositioned.cxx b/src/Scripting/NasalPositioned.cxx index 8f54c14df..d2bcd625b 100644 --- a/src/Scripting/NasalPositioned.cxx +++ b/src/Scripting/NasalPositioned.cxx @@ -1291,8 +1291,13 @@ static naRef f_airport_parking(naContext c, naRef me, int argc, naRef* args) continue; } - naRef nm = stringToNasal(c, park->getName()); - naVec_append(r, nm); + const SGGeod& parkLoc = park->getGeod(); + naRef ph = naNewHash(c); + hashset(c, ph, "name", stringToNasal(c, park->getName())); + hashset(c, ph, "lat", naNum(parkLoc.getLatitudeDeg())); + hashset(c, ph, "lon", naNum(parkLoc.getLongitudeDeg())); + hashset(c, ph, "elevation", naNum(parkLoc.getElevationM())); + naVec_append(r, ph); } return r;