For those brave enough to tamper with the Java script I have finally cracked a bit of code to show which ACARS ground station the aircraft is 'talking' to.
Here in NZ we only have a handful of stations all with a unique code. These are identified in the decoded ACARS message string by the field 'Mode'. In acarsdeco2 this is on the second line under RX_ID. There's two identifiers, the decoded string character and in brackets the raw integer value.
If you know the ground station from the decoded string character or the integer value you can compose some Java script like this to put a more descriptive meaning in the list of fields. This code goes in the apps.js script located in static/js/ folder:
This is what my http server data looks like:
acarsdeco2.jpg
Enjoy!
Here in NZ we only have a handful of stations all with a unique code. These are identified in the decoded ACARS message string by the field 'Mode'. In acarsdeco2 this is on the second line under RX_ID. There's two identifiers, the decoded string character and in brackets the raw integer value.
If you know the ground station from the decoded string character or the integer value you can compose some Java script like this to put a more descriptive meaning in the list of fields. This code goes in the apps.js script located in static/js/ folder:
Code:
if (parseInt(msg.mode) == 87) { s += "\r\nStation ID: " + "Wellington (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 67) { s += "\r\nStation ID: " + "Christchurch (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 80) { s += "\r\nStation ID: " + "Palmerston North (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 65) { s += "\r\nStation ID: " + "Auckland (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 50) { s += "\r\nStation ID: " + "Any Station (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 72) { s += "\r\nStation ID: " + "Hamilton (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 112) { s += "\r\nStation ID: " + "Palmerston North Uplink (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else if (parseInt(msg.mode) == 68) { s += "\r\nStation ID: " + "Dunedin (" + String.fromCharCode(parseInt(msg.mode)) + ")"; } else { s += "\r\nStation ID: " + "Unknown (" + String.fromCharCode(parseInt(msg.mode)) + ")"; }
acarsdeco2.jpg
Enjoy!
Comment