+void
+wxRadarBg::update_data(const SGPropertyNode *ac, double altitude, double heading,
+ double radius, double bearing, bool selected)
+{
+ osgText::Text *callsign = new osgText::Text;
+ callsign->setFont(_font.get());
+ callsign->setFontResolution(12, 12);
+ callsign->setCharacterSize(_font_size);
+ callsign->setColor(selected ? osg::Vec4(1, 1, 1, 1) : _font_color);
+ osg::Matrixf m(wxRotate(-bearing)
+ * osg::Matrixf::translate(0.0f, radius, 0.0f)
+ * wxRotate(bearing) * _centerTrans);
+
+ osg::Vec3 pos = m.preMult(osg::Vec3(16, 16, 0));
+ // cast to int's, otherwise text comes out ugly
+ callsign->setPosition(osg::Vec3((int)pos.x(), (int)pos.y(), 0));
+ 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 << identity << endl
+ << setprecision(0) << fixed
+ << setw(3) << setfill('0') << heading * SG_RADIANS_TO_DEGREES << "\xB0 "
+ << setw(0) << altitude << "ft" << endl
+ << ac->getDoubleValue("velocities/true-airspeed-kt") << "kts";
+
+ callsign->setText(text.str());
+ _textGeode->addDrawable(callsign);
+}
+
+