Take a live polar onto a wing whose table carries a delta axis - #269
Merged
Conversation
set_polar! wrote a 1D table into whatever interpolation field the panel had, which a POLAR_MATRICES panel does not have: its field type is 2D and the write threw. Every wing whose offline polars carry a flap axis was locked out of the live path, which is most of them, and neither test suite noticed because both fixtures build vector panels. The table now keeps the shape the panel was built with. A matrix panel takes the sampled curve at every delta it already spans, which is what a regenerated polar means: the deflection is in the shape the network was given, so the answer does not depend on the flap angle any more. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1-Bart-1
enabled auto-merge (rebase)
August 31, 2026 21:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release blocker for #268.
refresh_live_polars!throws on any wing whose offline polars carry a flap axis — which is most real wings, including the SK100.The bug
set_polar!wrote a 1D table into whatever interpolation field the panel had. APOLAR_MATRICESpanel's field type is 2D, so the assignment could not convert:data/sk100/aero_settings.yamlcarries bothalpha_rangeanddelta_range, so the SK100 resolves toPOLAR_MATRICESand was locked out of the live path entirely.Before #268 this worked, because
SAMPLEDkept its own storage and never touched the interpolation fields. Folding it into the panel's own table is still the right call, but the table's shape is fixed by the panel's type parameters and the write has to respect it.Neither test suite caught it. VSM's live-polar fixture builds
POLAR_VECTORSpanels, and SymbolicAWEModels'test_live_polar.jluses2plate_kite, whose polars are also 1D (361 alpha knots, no delta axis). Both go green while the SK100 fails.The fix
rebuild_polardispatches on the interpolation's dimensionality, andpolar_modelreports the model that goes with it:deltait already spans, and staysPOLAR_MATRICES.That is what a regenerated polar means: the deflection is in the shape the network was handed, so the answer no longer depends on the flap angle, and a delta-invariant table says exactly that.
Test
test/airfoil_aero/test_live_polar.jlgains "a rewritten polar lands on a matrix panel too" — the case both suites were missing. It pins that the panel staysPOLAR_MATRICES, that the value at a knot is the sampled one, thatdelta = -40°anddelta = +40°read the same polar, and that it is still held flat past the sampled window.All live-polar tests pass (87 assertions).
🤖 Generated with Claude Code