Skip to content

fix(usc): base acre and section on the international foot - #940

Open
jay23606 wants to merge 1 commit into
mpusz:masterfrom
jay23606:pr-go/938-good-first-issue-base-usc-acre-on-the-in
Open

jay23606 wants to merge 1 commit into
mpusz:masterfrom
jay23606:pr-go/938-good-first-issue-base-usc-acre-on-the-in

Conversation

@jay23606

@jay23606 jay23606 commented Dec 5, 2026

Copy link
Copy Markdown

The bug

usc::acre was defined from the US survey chain, so 1 * usc::acre was about 4 ppm larger than the acre NIST defines (43,560 ft² = 10 ch² = 160 rd², 4046.856 422 4 m²). NIST advises against survey-foot definitions after December 31, 2022 except for historic and legacy applications.

The change

  • usc::acre is now mag<10> * square(chain) on the international chain; usc::section stays 640 acres.
  • usc::survey1893::acre and usc::survey1893::section keep the old values for land records made before 2023.
  • test/static/usc_test.cpp: the area block checks the international relations, and the survey ones for survey1893.
  • docs/users_guide/systems/yard_pound.md and CHANGELOG.md updated.
  • docs/.index.md and docs/.index-pages.md updated.

NIST check of the rest of usc_test.cpp

The NIST revised unit conversion factors page was read and compared with every relation in the file. Foot, rod, chain, link, mile, fathom, acre, square rod, square mile, cable, furlong, league and acre-foot agree with it. The acre-foot volume assertion was changed from acre * survey1893::us_survey_foot to acre * foot. The page does not list inch, yard, nautical mile, fluid, dry, mass, pressure or temperature units, so those relations are not checked against NIST here; they were left as they were.

Testing

  • g++ -std=c++20 -fsyntax-only -Isrc/core/include -Isrc/systems/include -Isrc/utility/include -Isrc/integrations/include -Itest/static -Itest/runtime test/static/usc_test.cpp exits 0 on the fix.
  • The same command with the base usc.h placed first on the include path fails with 'acre' is not a member of 'mp_units::usc::survey1893'.

Not run: the Conan/CMake build, the module build, the other compilers, and pre-commit.

Regression test: fails on base twice (/no match for .operator==. .*usc::acre>/), passes on fix twice (g++ -std=c++20 -fsyntax-only -Isrc/core/include -Isrc/systems/include -Isrc/utility/include -Isrc/integrations/include -Itest/static -Itest/runtime test/static/usc_test.cpp)

Fixes #938

This branch has not been deployed

No deployments
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.

Good First Issue: Base usc::acre on the international foot

1 participant