+ SGVec2d p = project(pos);
+
+ glColor3f(0.0, 0.0, 0.5);
+ glLineWidth(2.0);
+ circleAt(p, 4, 6.0); // blue diamond (to differentiate from aircraft.
+
+// draw heading vector
+ int speedKts = static_cast<int>(model->getDoubleValue("velocities/speed-kts"));
+ if (speedKts > 1) {
+ glLineWidth(1.0);
+
+ const double dt = 15.0 / (3600.0); // 15 seconds look-ahead
+ double distanceM = speedKts * SG_NM_TO_METER * dt;
+
+ SGGeod advance;
+ double az2;
+ SGGeodesy::direct(pos, hdg, distanceM, advance, az2);
+
+ drawLine(p, project(advance));
+ }
+
+ // draw callsign / speed
+ char buffer[1024];
+ ::snprintf(buffer, 1024, "%s\n%dkts",
+ model->getStringValue("name", "<>"),
+ speedKts);