More bugfixes in comment offsets

This commit is contained in:
2026-03-18 19:17:53 +01:00
parent 46e7694ec6
commit 34240dfbd8
2 changed files with 19 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ describe("APRS extras test vectors", () => {
expect(payload!.position.phg!.power).toBe(25);
expect(payload!.position.phg!.height).toBeCloseTo(3.048, 3);
expect(payload!.position.phg!.gain).toBe(0);
expect(payload!.position!.comment).toBe("73 de NOCALL");
});
it("parses PHG token with hyphen separators (spec vector 2)", () => {
@@ -55,6 +56,8 @@ describe("APRS extras test vectors", () => {
const res = frame.decode(true) as { payload: PositionPayload | null; structure: Dissected };
const { payload, structure } = res;
// console.log(structure[structure.length - 1]); // Log the last segment for debugging
expect(payload).not.toBeNull();
// Use a spec PHG example: PHG0210 -> p=0 -> power 0 W, h=2 -> 40 ft
expect(payload!.position.phg).toBeDefined();