@airframes/acars-decoder 1.8.9 → 1.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1846,10 +1846,18 @@ var Label_16_TOD = class extends DecoderPlugin {
|
|
|
1846
1846
|
ResultFormatter.unknown(decodeResult, fields[3]);
|
|
1847
1847
|
const temp = fields[4].split("/");
|
|
1848
1848
|
const posFields = temp[0].split(" ");
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1849
|
+
if (posFields.length === 4) {
|
|
1850
|
+
ResultFormatter.position(decodeResult, {
|
|
1851
|
+
latitude: CoordinateUtils.getDirection(posFields[0]) * Number(posFields[1]),
|
|
1852
|
+
longitude: CoordinateUtils.getDirection(posFields[2]) * Number(posFields[3])
|
|
1853
|
+
});
|
|
1854
|
+
} else if (posFields.length === 2) {
|
|
1855
|
+
ResultFormatter.position(decodeResult, {
|
|
1856
|
+
latitude: CoordinateUtils.getDirection(posFields[0][0]) * Number(posFields[0].slice(1)) / 100,
|
|
1857
|
+
longitude: CoordinateUtils.getDirection(posFields[1][0]) * Number(posFields[1].slice(1)) / 100
|
|
1858
|
+
});
|
|
1859
|
+
} else {
|
|
1860
|
+
}
|
|
1853
1861
|
if (temp.length > 1) {
|
|
1854
1862
|
ResultFormatter.flightNumber(decodeResult, temp[1]);
|
|
1855
1863
|
}
|