DOC: Hedy example reports a 3.35 % apogee error by comparing a MSL alt vs AGL alt (real error ~0.3 %)
維護者通常 3 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 92/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- jupyter-notebook, python
研究方向
從 docs/examples/hedy_flight_sim.ipynb 開始,執行 "Altitude Comparison" 儲存格。檢查模擬的最高點是否以地面以上的高度表示,且與高度計紀錄一致,並檢查印出的百分比是否反映該比較。筆記本中既有的 Flight.altitude 與發射地點的海拔數值提供了必要的脈絡。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
The Hedy example (docs/examples/hedy_flight_sim.ipynb) compares RocketPy's simulated apogee with the real flight's altimeter log and prints:
Actual apogee: 5231.53 m
Simulated apogee: 5406.92 m
Percentage Error: 3.35%
The two numbers are measured from different zero points:
- "Actual apogee" is height above the ground. The flight log is read with
columns_map_cats_vega = {"filteredAltitudeAGL": "altitude", …}, and AGL means above ground level. - "Simulated apogee" is height above sea level.
flight_reanalysis.apogeeis the z coordinate at apogee (rocketpy/simulation/flight.py,self.apogee = self.apogee_state[2]), and z is measured from sea level.
The launch site is 160 m above sea level. The notebook prints this itself ("Launch Site Surface Elevation: 160.0 m"), and the same notebook prints the simulated apogee both ways: Apogee Altitude: 5406.918 m (ASL) | 5246.918 m (AGL).
Compared like for like, the error is:
| Above ground | |
|---|---|
| Real flight (altimeter log) | 5231.53 m |
| RocketPy | 5246.92 m |
| Difference | +15.4 m, +0.29 % |
To Reproduce
Run docs/examples/hedy_flight_sim.ipynb to the "Altitude Comparison" cell. That cell computes:
apogee_actual = cats_vega_flight.altitude.max # above ground (filteredAltitudeAGL)
apogee_simulated = flight_reanalysis.apogee # above sea level
Expected behavior
Compare both values above ground. For example:
apogee_simulated = flight_reanalysis.altitude.max # Flight.altitude is z - env.elevation, i.e. above ground
or flight_reanalysis.apogee - envReanalysis.elevation. The cell's altitude plot already compares like with like, because Flight.altitude is above ground (flight.py: "Rocket altitude above ground level"). Only the printed numbers mix the two.
Additional context
- Checked on v1.13.0 (
master@ 9bd6ad3) anddevelop@ b389b43 (2026-11-23). The notebook cells are unchanged on both. - Ran on RocketPy 1.13.0 from PyPI and on
develop@ b389b43 installed from source; Python 3.15.2, macOS arm64 (2026-11-27). - The 5406.92 / 3.35 % values are the notebook's saved outputs. Re-running it (with the data path fixed, see below) reproduces them: on 1.13.0 the cell prints
Simulated apogee: 5406.87 mandPercentage Error: 3.35%, whileflight_reanalysis.altitude.maxis 5246.90 m, +0.29 % against the log. Ondevelopthe cell prints 5399.55 m and 3.21 %; above ground it is 5239.57 m, +0.15 %. flight_reanalysis.altitude.maxandflight_reanalysis.apogee - envReanalysis.elevationgave the same value on both versions.- Running this notebook as shipped also hits a broken data path (
data/rockets/tust/), to be reported separately. - This report was prepared with the assistance of Claude Opus 5.5.
- 主要語言
- Python
- 星號
- 1.1k
- 分支
- 280
- 平均合併
- 3 天 2 小時
- 30 天內合併 PR
- 24
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
RocketPy-Team/RocketPy 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
RocketPy-Team/RocketPy#1255 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
RocketPy-Team/RocketPy#1202 ·
維護者通常 3 天內回覆
-
Monte Carlo test fixtures write their logs into the working directory可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
RocketPy-Team/RocketPy#1189 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
RocketPy-Team/RocketPy#1171 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 3/5 1-2 天 新手友好度 56/100
RocketPy-Team/RocketPy#1251 ·
維護者通常 3 天內回覆
查看 RocketPy-Team/RocketPy 的全部 Issue
相似的 Issue
-
docs(contributing): the two things that silently block a PR可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉available documentation good first issue
難度 1/5 1-3 小時 新手友好度 95/100
Nixitov/Riptide-Native#944 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 88/100
JTHCode/secretguard#24 ·
維護者通常 1 天內回覆
-
area: middleware documentation good first issue
難度 2/5 1-3 小時 新手友好度 88/100
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
good first issue
難度 1/5 1 小時以內 新手友好度 95/100
omarelshamy25x/shamy-hijri#63 ·
維護者通常 1 天內回覆