Skip to content

Decoding compressed latitude and longitude#179

Merged
CBielstein merged 2 commits intoCBielstein:mainfrom
aschuhardt:compressed-latlong
Oct 5, 2025
Merged

Decoding compressed latitude and longitude#179
CBielstein merged 2 commits intoCBielstein:mainfrom
aschuhardt:compressed-latlong

Conversation

@aschuhardt
Copy link
Contributor

@aschuhardt aschuhardt commented Sep 15, 2025

Description

I want to be able to decode compressed position reports.

I did not add support for parsing the optional extra data (course/speed, altitude, etc.) from the compressed format, since this would likely involve refactoring some other part of the Position class. I'll add support for this sometime soon if nobody else does, assuming this PR is merged.

Changes

I added logic to Position which, if a set of coordinates doesn't look like uncompressed coordinates, will try to parse them as compressed coordinates instead. This logic leverages an additional regex pattern.

Validation

I added a test case to PositionUnitTests.Decode for a set of coordinates and expected values which I pulled from the APRS spec.

image

@CBielstein
Copy link
Owner

@aschuhardt Just commenting to acknowledge that I have seen this PR. Real life and day job have been extremely busy the last few weeks. I will get to a review soon. Thank you!

Copy link
Owner

@CBielstein CBielstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Clean code and follows the spec well. There are two little silly linter errors, but I'll fix those up as you did all the work here. Thanks much. :)

@CBielstein CBielstein merged commit 933d800 into CBielstein:main Oct 5, 2025
2 of 3 checks passed
@CBielstein CBielstein mentioned this pull request Oct 5, 2025
CBielstein added a commit that referenced this pull request Oct 5, 2025
## Description

#179 introduced a few minor static analysis violations. This is okay,
because it also brought great functionality. :) Not worth going through
another round of PR for minor fixes, and this is easier than playing
branch shenanigans.

## Changes

* Fixes for the linter

## Validation

* Build passes clean on my machine, we'll see it in the CI as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants