Repository navigation
fix(LOC): preserve thousandths of arcseconds in coordinates - #5035
Merged
TomOnTime merged 2 commits intoOct 25, 2026
Merged
Conversation
LOC records lose the third decimal place in latitude and longitude seconds. Format both seconds with three decimals before parsing so stored coordinates match the input. Restore the existing golden records.
TomOnTime
approved these changes
Oct 25, 2026
Collaborator
|
Thanks for fixing that! |
TomOnTime
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LOC()rounds the seconds of latitude and longitude to two decimals, although a LOC record holds thousandths of a second of arc and RFC 1876 writes them up to59.999.dnscontrol pushstores42 21 43.950 N 71 05 6.340 W -24.01m 1m 200m 10minstead of42 21 43.952 N 71 05 6.344 W -24.01m 1m 200m 10m, about 6 cm off. When the provider already holds the precise record,dnscontrol previewproposes to replace it with the rounded one.Cause:
MakeLOCformats both seconds with%.2fbefore it parses the record. This came in with the dnsv2 refactor.Fix: use
%.3ffor both seconds. The nine045-locgolden records go back to the values they had before that refactor.Test: the existing
045-loc.jscase fails without the fix and passes with it.go test -p 1 -count=1 ./pkg/js/ ./models/passes.