// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "HUD.hxx"
-
+#include "HUD_private.hxx"
HUD::TurnBankIndicator::TurnBankIndicator(HUD *hud, const SGPropertyNode *n, float x, float y) :
Item(hud, n, x, y),
int dir = bank > 0 ? 1 : -1;
- if (fabsf(bank) > 25) {
+ if (fabs(bank) > 25) {
draw_tick(45, r, minor, dir);
draw_tick(60, r, major, dir);
}
- if (fabsf(bank) > 55) {
+ if (fabs(bank) > 55) {
draw_tick(90, r, major, dir);
draw_tick(135, r, major, dir);
}
// bank marker
- float a, rr = r + r * 2.0 / 70.0;
+ float a;
+ float rr = r + r * 0.5 / 70.0; // little gap for the arrow peak
a = (bank + 270.0) * SGD_DEGREES_TO_RADIANS;
float x1 = cx + rr * cos(a);
// sideslip marker
- rr = r + r * 2.0 / 70.0;
+ rr = r + r * 0.5 / 70.0;
a = (bank + sideslip + 270.0) * SGD_DEGREES_TO_RADIANS;
x1 = cx + rr * cos(a);
y1 = cy + rr * sin(a);