@e04/ft8ts 0.0.10 → 0.0.11
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/cli.js +16 -2
- package/dist/cli.js.map +1 -1
- package/dist/ft8ts.cjs +16 -2
- package/dist/ft8ts.cjs.map +1 -1
- package/dist/ft8ts.mjs +16 -2
- package/dist/ft8ts.mjs.map +1 -1
- package/package.json +1 -1
- package/src/util/pack_jt77.ts +14 -2
package/dist/cli.js
CHANGED
|
@@ -1906,7 +1906,6 @@ function parseCallsign(raw) {
|
|
|
1906
1906
|
iarea <= 2 && // Fortran: iarea (1-indexed) must be 2 or 3 → 0-indexed: 1 or 2
|
|
1907
1907
|
nplet >= 1 && // at least one letter before area digit
|
|
1908
1908
|
npdig < iarea && // not all digits before area
|
|
1909
|
-
nslet >= 1 && // must have at least one letter after area digit
|
|
1910
1909
|
nslet <= 3; // at most 3 suffix letters
|
|
1911
1910
|
return { basecall: call, isStandard: standard, suffix };
|
|
1912
1911
|
}
|
|
@@ -1950,7 +1949,22 @@ function pack28(token) {
|
|
|
1950
1949
|
// Standard callsign
|
|
1951
1950
|
const { basecall, isStandard } = parseCallsign(t);
|
|
1952
1951
|
if (isStandard) {
|
|
1953
|
-
|
|
1952
|
+
// Fortran pack28 layout:
|
|
1953
|
+
// iarea==2 (0-based 1): callsign=' '//c13(1:5)
|
|
1954
|
+
// iarea==3 (0-based 2): callsign= c13(1:6)
|
|
1955
|
+
let iareaD = -1;
|
|
1956
|
+
for (let ii = basecall.length - 1; ii >= 1; ii--) {
|
|
1957
|
+
const c = basecall[ii] ?? "";
|
|
1958
|
+
if (c >= "0" && c <= "9") {
|
|
1959
|
+
iareaD = ii;
|
|
1960
|
+
break;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
let cs = basecall;
|
|
1964
|
+
if (iareaD === 1)
|
|
1965
|
+
cs = ` ${basecall.slice(0, 5)}`;
|
|
1966
|
+
if (iareaD === 2)
|
|
1967
|
+
cs = basecall.slice(0, 6);
|
|
1954
1968
|
const i1 = A1.indexOf(cs[0] ?? " ");
|
|
1955
1969
|
const i2 = A2.indexOf(cs[1] ?? "0");
|
|
1956
1970
|
const i3 = A3.indexOf(cs[2] ?? "0");
|