]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/wxradar.cxx
Merge branch 'durk/traffic'
[flightgear.git] / src / Instrumentation / wxradar.cxx
index d08a96812b82d37a50ae9cbe52393ebef6a35102..6c2187ae7136869ba210c201aee796b8a9ee679c 100644 (file)
@@ -463,7 +463,7 @@ wxRadarBg::update_weather()
 
     // pretend we have a scan angle bigger then the FOV
     // TODO:check real fov, enlarge if < nn, and do clipping if > mm
-    const float fovFactor = 1.45f;
+//    const float fovFactor = 1.45f;
     _Instrument->setStringValue("status", modeButton.c_str());
 
     list_of_SGWxRadarEcho *radarEcho = &_radarEchoBuffer;
@@ -567,8 +567,12 @@ wxRadarBg::update_data(const SGPropertyNode *ac, double altitude, double heading
     callsign->setAlignment(osgText::Text::LEFT_BOTTOM_BASE_LINE);
     callsign->setLineSpacing(_font_spacing);
 
+    const char *identity = ac->getStringValue("transponder-id");
+    if (!identity[0])
+        identity = ac->getStringValue("callsign");
+
     stringstream text;
-    text << ac->getStringValue("callsign") << endl
+    text << identity << endl
             << setprecision(0) << fixed
             << setw(3) << setfill('0') << heading * SG_RADIANS_TO_DEGREES << "\xB0 "
             << setw(0) << altitude << "ft" << endl