From 16dd71a04457663b1ac7192bb122b2d4af673927 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sun, 22 Mar 2009 18:39:47 +0000 Subject: [PATCH] wxradar: display transponder-id by default, fall back to callsign --- src/Instrumentation/wxradar.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Instrumentation/wxradar.cxx b/src/Instrumentation/wxradar.cxx index d08a96812..968db833a 100644 --- a/src/Instrumentation/wxradar.cxx +++ b/src/Instrumentation/wxradar.cxx @@ -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 -- 2.39.5