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 天内回复