@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.mjs
CHANGED
|
@@ -1809,10 +1809,18 @@ var Label_16_TOD = class extends DecoderPlugin {
|
|
|
1809
1809
|
ResultFormatter.unknown(decodeResult, fields[3]);
|
|
1810
1810
|
const temp = fields[4].split("/");
|
|
1811
1811
|
const posFields = temp[0].split(" ");
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1812
|
+
if (posFields.length === 4) {
|
|
1813
|
+
ResultFormatter.position(decodeResult, {
|
|
1814
|
+
latitude: CoordinateUtils.getDirection(posFields[0]) * Number(posFields[1]),
|
|
1815
|
+
longitude: CoordinateUtils.getDirection(posFields[2]) * Number(posFields[3])
|
|
1816
|
+
});
|
|
1817
|
+
} else if (posFields.length === 2) {
|
|
1818
|
+
ResultFormatter.position(decodeResult, {
|
|
1819
|
+
latitude: CoordinateUtils.getDirection(posFields[0][0]) * Number(posFields[0].slice(1)) / 100,
|
|
1820
|
+
longitude: CoordinateUtils.getDirection(posFields[1][0]) * Number(posFields[1].slice(1)) / 100
|
|
1821
|
+
});
|
|
1822
|
+
} else {
|
|
1823
|
+
}
|
|
1816
1824
|
if (temp.length > 1) {
|
|
1817
1825
|
ResultFormatter.flightNumber(decodeResult, temp[1]);
|
|
1818
1826
|
}
|