X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fgroundradar.cxx;h=c604cc43c224121088d3f1ef53125fd5adc85c6e;hb=ed434d9967b0b23e4abb172d699ef956246f4bf9;hp=937fa2614b4858758c068307b31055a4185c5d81;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Instrumentation/groundradar.cxx b/src/Instrumentation/groundradar.cxx index 937fa2614..c604cc43c 100644 --- a/src/Instrumentation/groundradar.cxx +++ b/src/Instrumentation/groundradar.cxx @@ -20,6 +20,8 @@ # include "config.h" #endif +#include + #include #include #include @@ -45,7 +47,7 @@ #include "groundradar.hxx" static const char* airport_source_node_name = "airport-id-source"; -static const char* default_airport_node_name = "/sim/tower/airport-id"; +static const char* default_airport_node_name = "/sim/airport/closest-airport-id"; static const char* texture_node_name = "texture-name"; static const char* default_texture_name = "Aircraft/Instruments/Textures/od_groundradar.rgb"; static const char* range_source_node_name = "range-source"; @@ -197,7 +199,7 @@ osg::Geometry *GroundRadar::addPavementGeometry(const FGPavement* aPavement, dou geo_inverse_wgs_84(aTowerLat, aTowerLon, (*loopBegin)->mPos.getLatitudeDeg(), (*loopBegin)->mPos.getLongitudeDeg(), &az1, &az2, &dist_m); osg::Vec3 p1 = fromPolar(az1, dist_m * aScale) + osg::Vec3(TextureHalfSize, TextureHalfSize, 0); pts->push_back( p1 ); - polygon->setVertexArray( pts ); + polygon->setVertexArray( pts.get() ); polygon->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::POLYGON, 0, pts->size() ) );