More WIP on the webmap, mostly fixing up track history.
This commit is contained in:
parent
1f06abf67d
commit
e8a62293c2
3 changed files with 79 additions and 47 deletions
|
|
@ -25,7 +25,6 @@ function fetchData() {
|
|||
SpecialSquawk = false;
|
||||
|
||||
// Loop through all the planes in the data packet
|
||||
console.log("I was called\n");
|
||||
var now = data.now;
|
||||
var acs = data.aircraft;
|
||||
for (var j=0; j < acs.length; j++) {
|
||||
|
|
@ -370,8 +369,8 @@ function refreshSelected() {
|
|||
}
|
||||
|
||||
function trackShortName(track) {
|
||||
var trackIndex = Math.floor((track+22.5) / 45);
|
||||
if ((trackIndex < 0) || (trackIndex >= 8))
|
||||
var trackIndex = Math.floor((track+22.5) / 45) % 8;
|
||||
if (trackIndex < 0)
|
||||
return "n/a";
|
||||
return ["N","NE","E","SE","S","SW","W","NW"][trackIndex];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue