Repository navigation
Define gram-force by its conversion to the newton - #143
Merged
Merged
Conversation
NISTu196 gram-force had a single root_units entry of kilo x NISTu196, i.e. 1 gf = 1000 gf, a self-reference with no conversion path, so gram-force and every unit defined through it (kilogram-force, kilopond and their compounds) could not be converted. The self-reference is removed and gram-force gets a canonical_conversion to NISTu11 (newton) with factor 0.00980665, the same form bar (NISTu91) uses for its conversion to the pascal. 1 gf = 9.80665 mN exactly (standard gravity, CGPM 1901; NPL "What is the SI unit of force?"; NIST SP 811 Appendix B.9: kgf and kp = 9.80665 N). The record stays root: false. No identifiers, names or symbols change.
Contributor
|
Thanks @suleman-uzair ! |
ronaldtse
pushed a commit
to suleman-uzair/unitsdb-ts
that referenced
this pull request
Nov 13, 2026
Projected from the public immutable commit b210137 (gram-force canonical conversion on top of main 035665f, which carries the cwt (US) and kilopond fixes from #142) with the current projector. Every record table (units, prefixes, dimensions, quantities, currencies, scales) is byte-identical to the previous local candidate projection of the same data tree; only provenance changes (data commit, script and helper digests). The commit is untagged until UnitsDB releases it.
ronaldtse
pushed a commit
to unitsml/unitsdb-ts
that referenced
this pull request
Nov 13, 2026
Projected from the public immutable commit b210137 (gram-force canonical conversion on top of main 035665f, which carries the cwt (US) and kilopond fixes from #142) with the current projector. Every record table (units, prefixes, dimensions, quantities, currencies, scales) is byte-identical to the previous local candidate projection of the same data tree; only provenance changes (data commit, script and helper digests). The commit is untagged until UnitsDB releases it.
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.
Follow-up to #142. While checking the kilopond fix there, we found that the gram-force entry has the same kind of problem in a more severe form.
Its only
root_unitsentry is kilo times gram-force itself, which says one gram-force equals a thousand gram-force and leaves no way to reach the newton. Every unit defined through it, including the kilogram-force, the kilopond and the pressure units based on them, cannot be converted at all: the Rust engine refuses them and the Ruby engine recurses until it runs out of stack.This change removes that self-reference and gives gram-force a
canonical_conversionto the newton (NISTu11) with factor 0.00980665, the same form bar (NISTu91) uses for its conversion to the pascal. So 1 gf = 9.80665 mN and 1 kp = 1 kgf = 9.80665 N exactly (NPL, "What is the SI unit of force?"; NIST SP 811, Appendix B.9). The record staysroot: false, and no identifiers, names or symbols change.Verification
bundle exec ruby validate_schemas.rbpasses for all data files, and the identifier and reference validators pass too.