... | ... |
@@ -34,6 +34,7 @@ var TcasItemClass = { |
34 | 34 |
me._can.Alt |
35 | 35 |
.setText(sprintf("%+i", alt)) |
36 | 36 |
.set('fill', me._colors[level]) |
37 |
+ .setRotation(orientation) |
|
37 | 38 |
.setVisible(1); |
38 | 39 |
else |
39 | 40 |
me._can.Alt.setVisible(0); |
... | ... |
@@ -42,6 +43,7 @@ var TcasItemClass = { |
42 | 43 |
me._can.Arrow[vs < 0] |
43 | 44 |
.set('fill', me._colors[level]) |
44 | 45 |
.set('stroke', me._colors[level]) |
46 |
+ .setRotation(orientation) |
|
45 | 47 |
.setVisible(1); |
46 | 48 |
|
47 | 49 |
me._can.Arrow[vs > 0].setVisible(0); |
... | ... |
@@ -52,12 +54,14 @@ var TcasItemClass = { |
52 | 54 |
} |
53 | 55 |
|
54 | 56 |
for (var i = 0; i < 4; i += 1) |
55 |
- me._can.ThreadLevel[i].setVisible(level == i); |
|
57 |
+ me._can.ThreadLevel[i] |
|
58 |
+ .setRotation(orientation) |
|
59 |
+ .setVisible(level == i); |
|
56 | 60 |
|
57 | 61 |
me._can.Callsign |
58 | 62 |
.setText(callsign) |
59 | 63 |
.set('fill', me._colors[level]) |
60 |
- .setRotation(-orientation * D2R) |
|
64 |
+ .setRotation(orientation) |
|
61 | 65 |
.setVisible(1); |
62 | 66 |
}, |
63 | 67 |
}; |
... | ... |
@@ -91,12 +95,13 @@ var MapTcas = { |
91 | 95 |
me.group._node.getNode('ref-lon', 1).setDoubleValue(data.lon); |
92 | 96 |
me.group.setRange(me.device.data['range-nm']/2); |
93 | 97 |
me._itemIndex = 0; |
98 |
+ var normOrientation = -me.device.data.orientation.map * D2R; |
|
94 | 99 |
foreach (var ac; data.tcas) { |
95 | 100 |
if (me._itemIndex >= me._itemCount) { |
96 | 101 |
append(me._item, TcasItemClass.new(me.group, me._itemIndex)); |
97 | 102 |
me._itemCount += 1; |
98 | 103 |
} |
99 |
- me._item[me._itemIndex].setData(ac.lat, ac.lon, ac.alt, ac.vs, ac.level, ac.callsign, me.device.data.orientation.map); |
|
104 |
+ me._item[me._itemIndex].setData(ac.lat, ac.lon, ac.alt, ac.vs, ac.level, ac.callsign, normOrientation); |
|
100 | 105 |
me._itemIndex += 1; |
101 | 106 |
} |
102 | 107 |
|