DOC: Hedy example reports a 3.35 % apogee error by comparing a MSL alt vs AGL alt (real error ~0.3 %)

オープン 初心者向け
#1,241 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
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.apogee is 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) and develop @ 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 m and Percentage Error: 3.35%, while flight_reanalysis.altitude.max is 5246.90 m, +0.29 % against the log. On develop the cell prints 5399.55 m and 3.21 %; above ground it is 5239.57 m, +0.15 %.
  • flight_reanalysis.altitude.max and flight_reanalysis.apogee - envReanalysis.elevation gave 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時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RocketPy-Team/RocketPy のほかの issue

RocketPy-Team/RocketPy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。