@ -48,7 +48,7 @@ All constants defined in `src/test_utilities.h` — use those, do not redefine l
- **Always output SI units** (meters, m/s, seconds) — C++ tests use SI internally.
- **Always output SI units** (meters, m/s, seconds) — C++ tests use SI internally.
- Output C++-style comments with precalculated expected values for embedding in the test. Tolerances are chosen separately by the test writer using the Tolerance Reference table — the precalc script should not output tolerance values.
- Output C++-style comments with precalculated expected values for embedding in the test. Tolerances are chosen separately by the test writer using the Tolerance Reference table — the precalc script should not output tolerance values.
- Run with: `python3 scripts/precalc_<test_name>.py`
- Run with: `python3 scripts/precalc_<test_name>.py`
- If sim_engine.py lacks a feature, use analytical formulas instead (**but notify the user what feature was missing**)
- If sim_engine.py lacks a feature, **stop to notify the user what feature is missing**
## Refactoring Procedure
## Refactoring Procedure
@ -63,10 +63,9 @@ All constants defined in `src/test_utilities.h` — use those, do not redefine l
- Follow all rules in sections 1-4 above.
- Follow all rules in sections 1-4 above.
### Step 2: Tighten Tolerances
### Step 2: Tighten Tolerances
- Build and verify: `make test-build` then `./build/orbit_test '[tag]' -s`.
- Build and verify: `make test-build` then `./build/orbit_test -s '[tag]'`.
- Run full suite: `make test`.
- Run full suite: `./build/orbit_test | tail`.
- Review every tolerance against actual observed errors from `-s` output.
- Review every tolerance against actual observed errors from `-s` output.
- If a constant's margin is too loose (e.g., `1e-6` when error is `1e-10`), tighten to `1e-8`.
- **If a test fails due to a tolerance being too tight, report the observed error to the user and ask whether to loosen the constant or investigate the root cause. Never silently widen a tolerance.**
- **If a test fails due to a tolerance being too tight, report the observed error to the user and ask whether to loosen the constant or investigate the root cause. Never silently widen a tolerance.**
- Refer to the tolerance reference table in Section 3 for constant names.
- Refer to the tolerance reference table in Section 3 for constant names.
@ -95,6 +94,8 @@ All constants defined in `src/test_utilities.h` — use those, do not redefine l
### Sim Engine Capabilities
### Sim Engine Capabilities
#### Implemented
#### Implemented
- Maneuver trigger system (TIME and TRUE_ANOMALY triggers)