Repository navigation
DOC: add notes on the inputs of the drag coefficient models - #1232
Conversation
- alpha and beta are separate signed angles, to be combined for the total angle of attack. The example now uses both. - The Reynolds number uses the rocket diameter as reference length. - A drag CSV with a missing combination loads, but interpolates differently. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
I checked each claim against develop. The alpha, beta and diameter Reynolds statements match Flight.__compute_drag_7d_inputs, and the CSV fallback matches Function.from_regular_grid_csv. The comments below add to the notes, none blocks the merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CharlesXmf
left a comment
There was a problem hiding this comment.
I checked these notes against Flight.__compute_drag_7d_inputs and the post-processed Flight methods on develop. The points about alpha/beta being separate signed angles, Reynolds using the diameter, and a non-grid CSV falling back to scattered interpolation all match the code.
One unit problem in the new paragraph:
alphaandbetaare the partial angle of attack and the sideslip angle in radians, as defined in genericsurfaces. They matchFlight.partial_angle_of_attackandFlight.angle_of_sideslip, which are in degrees.
__compute_drag_7d_inputs leaves alpha/beta as np.arctan2(...) (radians). The Flight methods use the same definition but return np.rad2deg(...) and are labeled (°). Saying they "match" those methods "which are in degrees" can be read as "use the Flight values, or tabulate degrees," which would be wrong for a drag model (a 10° angle would be treated as ~10 rad).
I'd say the definitions match, but the drag-model inputs stay in radians while the Flight attributes are converted to degrees. The example note that alpha = pi adds about 5.9 is already consistent with radians (0.6 * pi**2 ≈ 5.92).
The CSV note about a missing combination or inconsistent formatting is also useful. #1238 is about adding a warning on that fallback, so that sentence may need a small follow-up once the warning exists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @CharlesXmf, fixed in e77aecc: the angles are the same as the Flight ones, but the drag model receives them in radians while those Flight attributes are in degrees. The "no warning is given" sentence can go with #1239. |
PR RocketPy-Team#1232 landed on develop with the drag CSV docs note that this branch needs to update. Co-authored-by: Charles <CharlesXmf@users.noreply.github.com>
PR RocketPy-Team#1232 documented that a non-grid table still loads and no warning is given. This branch now warns, so the note matches that behavior. Co-authored-by: Charles <CharlesXmf@users.noreply.github.com>
* ENH: warn when a drag CSV does not form a regular grid Fall back from regular-grid interpolation still loads the table, but now emits a UserWarning so a missing combination, duplicate row, or split float does not silently change drag between tabulated points. Co-authored-by: Charles <CharlesXmf@users.noreply.github.com> * DOC: say RocketPy warns on irregular drag CSVs PR #1232 documented that a non-grid table still loads and no warning is given. This branch now warns, so the note matches that behavior. Co-authored-by: Charles <CharlesXmf@users.noreply.github.com> * ENH: point the irregular drag CSV warning at Rocket() Raise stacklevel from 2 to 4 so the warning names the caller's Rocket(...) line, and include the drag file path in the message. Co-authored-by: Charles <CharlesXmf@users.noreply.github.com> * fix(tests): platform-safe drag CSV warning path assertion for Windows CI Rocket warns with file_path!r, so backslashes differ from str(Path) on Windows. Check filename plus native or repr path in the warning message. Unblocks PR 1239. Co-authored-by: Charles <CharlesXmf@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Charles <CharlesXmf@users.noreply.github.com>
* DOC: backfill the v1.14.0 changelog The changelog automation has not run since #1112, so the PRs merged into develop after it were missing from [Unreleased]. Add them, add the entries for #1225, #1226 and #1227, update the tip-off, tube-fins and parachute-seed entries to what the release ships, and drop the raw commit link, the back-merge entry and the duplicate StochasticFreeFormFins entry. Related to #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq * DOC: add a Breaking changes section to the v1.14.0 changelog List what changes for a v1.13.0 user: Monte Carlo seeding and numbering, the deprecated static_margin assignment, the parachute trigger ValueError on the rail, the shifted flight results, and the sensor default temperature. Related to #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq * DOC: bring the v1.14.0 changelog up to date with develop Describe the forecast reuse and the opt-in disk cache that replaced the first cache (#1219), and add the PRs merged after the backfill: #1221, #1222, #1223, #1224, #1231, #1232, #1234, #1239 and #1242. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: MateusStano <mateusstano@usp.br>
Related to #1209 and #1142. This is the #1142 item of the v1.14.0 checklist.
Pull request type
Checklist
CHANGELOG.md: not updated here, DOC: backfill the v1.14.0 changelog and add breaking changes #1228 is collecting the entriesCurrent behavior
The drag section that #1142 added to
rocket_usage.rstis correct, but leaves out three things a user needs to build a drag model:alphaandbetaare separate signed angles, and neither is the total angle of attack. The example only usedalpha.New behavior
Two notes in the section cover the three points, and the example now uses
alpha**2 + beta**2.Each point was checked in the code:
Flight.__compute_drag_7d_inputstakesalphafrom the body y and axial velocity components andbetafrom the x and axial ones, and computes the Reynolds number with2 * rocket.radius.Breaking change
🤖 Generated with Claude Code