FA-66108 / Aviation weight and balance / Member archive
CG divided from the reduced moment · case 03
The loaded CG is reported near zero inches.
Case contract
Input [[quantity, 'kg'|'lb', arm, 'in'|'cm'|'mm']]. Convert to lb (1 kg = 2.20462 lb) and inches (2.54 cm, 25.4 mm per inch); other units -> 'ERR_UNIT'; total weight <= 0 -> 'ERR_WEIGHT'. Return [weight lb r1, reduced moment (lb-in/1000) r2, CG in r2 computed from the unreduced moment].
Why this case matters
Imported aircraft documentation mixes metric and imperial units; reduced moments (moment/1000) are a charting convenience and must not feed the CG division.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mixed kg and cm | [353.0, 13.13, 0.04] | [353.0, 13.13, 37.21] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗