Commit 8b01b34
ENH: Resolve pressure_ISA discretization bounds TODO (#1056)
* ENH: Resolve pressure_ISA discretization bounds TODO (#1056)
* TST: Fix test_flight and environment interpolation due to new ISA bounds
* MNT: self-document pressure_ISA bounds and strengthen discretization test
Derive the pressure_ISA discretization bounds from the standard-atmosphere
layer table (geopotential_height[0]/[-1]) instead of hardcoding -2000/80000,
and document why the grid is split around sea level. Strengthen the
discretization test with physical-sanity assertions (strictly increasing
altitude, strictly decreasing pressure, sea level sampled). No change in
numeric output.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* TST: update density doctest for new pressure_ISA discretization
The finer spline knots shift density at 1000 m by ~1e-4 (density at sea
level is unchanged since 0 m is still sampled exactly). Update the
calculate_density_profile doctest expected value accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* TST: relax noisy stream_velocity_z apogee tolerance
stream_velocity_z at apogee is a residual of the apogee-time estimation:
it is physically ~0 but swings by ~1e-4 m/s across platforms/NumPy
versions and atmosphere discretizations (e.g. -8.9e-8 on py3.10 with the
new ISA grid, -2.0e-4 with the old grid, +2.6e-4 on py3.14). The previous
atol=1e-5 was tighter than this numerical noise, making the assertion
flaky. Use atol=1e-3, which is physically negligible (vertical speed
peaks above 200 m/s) while still catching real regressions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* STY: apply ruff markdown formatting to README code blocks
CI installs ruff unpinned; ruff 0.16 formats fenced Python blocks in
Markdown by default, so `ruff format --check .` now flags README.md on
every PR. Reformat the affected snippets (indentation, quotes, call
wrapping) to unblock the lint check. No semantic changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* MNT: satisfy pylint on the pressure_ISA discretization changes
CI runs pylint unpinned; three messages were attributable to this PR:
- C0415 import-outside-toplevel: move the tools import to the test module
top level.
- R0915 too-many-statements: keep the discretization block compact so
pressure_ISA stays within the 25-statement limit.
- C0302 too-many-lines: the terser block keeps environment.py under the
3050-line module limit.
np.append over two linspaces yields the same grid as the previous
np.concatenate, so all numeric results are unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 725041c commit 8b01b34
5 files changed
Lines changed: 56 additions & 12 deletions
File tree
- rocketpy/environment
- tests
- integration/simulation
- unit/environment
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | | - | |
| 236 | + | |
239 | 237 | | |
240 | 238 | | |
241 | 239 | | |
| |||
290 | 288 | | |
291 | 289 | | |
292 | 290 | | |
293 | | - | |
| 291 | + | |
294 | 292 | | |
295 | 293 | | |
296 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2554 | 2554 | | |
2555 | 2555 | | |
2556 | 2556 | | |
2557 | | - | |
2558 | | - | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
2559 | 2565 | | |
2560 | 2566 | | |
2561 | 2567 | | |
| |||
2603 | 2609 | | |
2604 | 2610 | | |
2605 | 2611 | | |
2606 | | - | |
| 2612 | + | |
2607 | 2613 | | |
2608 | 2614 | | |
2609 | 2615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
391 | 396 | | |
392 | 397 | | |
393 | 398 | | |
| |||
414 | 419 | | |
415 | 420 | | |
416 | 421 | | |
417 | | - | |
| 422 | + | |
418 | 423 | | |
419 | 424 | | |
420 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
830 | 831 | | |
831 | 832 | | |
832 | 833 | | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
833 | 865 | | |
834 | 866 | | |
835 | 867 | | |
| |||
0 commit comments