Skip to content

Build SysState with the KiteUtils 0.12 constructor and one-slot winch fields - #321

Merged
ufechner7 merged 3 commits into
mainfrom
agent/KiteViewers.jl-54
Oct 11, 2026
Merged

ufechner7 merged 3 commits into
mainfrom
agent/KiteViewers.jl-54

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

TL;DR

KiteModels now requires KiteUtils 0.12. SysState(kps) uses the new SysState(P) constructor and writes the winch quantities into slot 1 of one-slot vectors. This is the 0.11 → 0.12 SysState migration that #312 says it is blocked on. #312's frame edits go on top of it, and after that KiteModels can take KiteUtils 0.13.

What 0.12 broke

KiteUtils 0.12 gave SysState type parameters for winches, tethers, pulleys, segments and float type. It removed SysState{P}(), and it sized winch_force, l_tether, v_reelout, set_force, set_torque and set_speed by winch/tether count, where they used to be fixed at 4. update_sys_state! assigned 4-element vectors into those fields. On a 0.12 SysState(P), with one winch and one tether, that is a DimensionMismatch, and the constructor call before it is a MethodError:

update_sys_state! scalar fields: Error During Test
  MethodError: no method matching (SysState{11})()

That is test/test-update-sys-state.jl against unchanged src/, with the compat raised to 0.12. Every testset in the file fails the same way.

What changed

  • src/KiteModels.jl: SysState(length(s.pos)), and ss.<field>[1] = ... for the six winch fields. The three isnothing branches that wrote NaN become something(x, NaN), with the same result.
  • test/test-update-sys-state.jl: the nine assertions that compared against [x, 0, 0, 0] now compare against [x]. The value in slot 1 is asserted exactly as before. The three zero slots no longer exist, so there is nothing left to assert about them.
  • Project.toml: KiteUtils = "0.12". docs/Project.toml adds 0.12. examples_3d/Project.toml allows KiteViewers = "0.5.1, 0.6", because KiteViewers 0.6.0 is the first release that accepts KiteUtils 0.12.
  • Nothing else in src/, test/, examples/ or docs/ touches the changed API. SysState(kps), Logger(P, steps), log!, load_log and demo_state_4p all still work, and Logger's defaults (one winch, one tether, Float32) match what SysState(kps) builds.

The manifests

Pkg.resolve() refuses to lift a package the manifest pins below a new bound (empty intersection between KiteUtils@0.11.13 and project compatibility 0.12). So each .default was seeded from the tracked one and updated only for the packages the bound forces (Pkg.update([...]; preserve=PRESERVE_TIERED)), each under its own Julia (1.11.9, 1.12.7, 1.13.0):

  • KiteUtils 0.11.13 → 0.12.2, AtmosphericModels 0.3.8 → 0.3.11 (0.3.10 on 1.11), KitePodModels 0.4.0 → 0.4.2, WinchModels 0.3.9 → 0.3.10, KiteViewers 0.5.2 → 0.6.0 (1.12 and 1.13; the 1.11 manifest has no examples_3d).
  • 1.12 also moves CompilerSupportLibraries_jll and OpenSSL_jll, the stdlib JLLs of Julia 1.12.7 against the 1.12.6 that last wrote the file.
  • The 1.11 .default is the examples view that bin/install copies into the sub-projects, so it was updated from examples/. Its KiteModels entry stays path = "..".

Order

  1. This PR.
  2. Write KA orientations to SysState, keep KS inside the model #312 merged on top of it, taking KiteUtils = "0.13". It is 29 commits behind main and conflicts in three places, all mechanical. It was also written before KiteUtils 0.13.0 shipped, and four of its calls are to names that release does not have. With them changed as below, a local merge of Write KA orientations to SysState, keep KS inside the model #312 onto this branch runs the whole Make the KA-frame change load against the KiteUtils 0.13 that shipped KiteViewers.jl#56 suite green against KiteUtils 0.13.0 (the 20 s KPS4 test_parking.jl included):
    • import KiteUtils: KS, KA, convert_body, convert_orientation → import KiteUtils: fromKS2KA, fromKS2KA_body
    • convert_orientation(calc_orient_quat(s); from=KS, to=KA) → fromKS2KA(calc_orient_quat(s))
    • convert_body(SVec3(0, 0, body_rate); from=KS, to=KA) → fromKS2KA_body(SVec3(0, 0, body_rate))
    • calc_heading(orientation, elevation, azimuth; frame=KS, ...) → calc_heading(fromKS2KA(orientation), elevation, azimuth; ...)
    • and from main, not Write KA orientations to SysState, keep KS inside the model #312: enu2ned (in calc_orient_quat, three calls) → fromENU2NED, a pure rename in 0.13.
  3. A KiteModels release. Make the KA-frame change load against the KiteUtils 0.13 that shipped KiteViewers.jl#56 needs it to leave draft, together with the WinchModels release that accepts 0.13 (aenarete/WinchModels.jl, opened from the same task).

Verification

  • Reproduced first: MethodError: no method matching (SysState{11})() in every testset of test/test-update-sys-state.jl against unchanged src/
  • test/test-update-sys-state.jl red before, green after: 58/58 on Julia 1.13.0
  • test/test-simulate_4p.jl (the Logger path): 2/2 on 1.13.0
  • test/test-kps4.jl: 213 pass, 11 broken, 0 errors on 1.12.7. On 1.13.0, test_find_steady_state errors with solver returned non-finite values — that is find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314, and this PR does not touch find_steady_state!. The 11 broken results come from the 4 @test_broken lines already on main.
  • Full suite: not run locally; GitHub CI is the check.
  • Risk: code outside this repo that reads ss.l_tether[2:4] (or similar) from a KiteModels SysState now gets a BoundsError. Those slots were always zero here, so the changelog lists this under Changed, not as breaking.

Scope

+56 / -65 across 9 files: src/KiteModels.jl (−12 net), test/test-update-sys-state.jl (the nine assertions), the three [compat] lines, CHANGELOG.md, and the three .default manifests.

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
From OpenSourceAWE/KiteViewers.jl#54 · task KiteViewers.jl-54

… fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread CHANGELOG.md Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1-Bort-1 added a commit that referenced this pull request Sep 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1-Bort-1 added a commit that referenced this pull request Oct 9, 2026
CHANGELOG.md: keep main's v0.11.17 date and fold #321's KiteUtils 0.12 line into main's single Changed section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ufechner7
ufechner7 requested a balanced review from Copilot October 11, 2026 10:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation consistently follows the new constructor and field dimensions, with focused regression coverage and compatible dependency updates.

0 open findings

What changed in this PR

Migrates SysState integration to KiteUtils 0.12 and its one-slot winch/tether layout.

Changes:

  • Uses the new SysState(P) constructor and indexed field updates.
  • Updates tests and compatibility bounds.
  • Refreshes default manifests and documents the behavior change.
File Description
src/​KiteModels.jl Adopts the KiteUtils 0.12 API.
test/​test-update-sys-state.jl Verifies one-slot state fields.
Project.toml Requires KiteUtils 0.12.
docs/​Project.toml Allows KiteUtils 0.12.
examples_3d/​Project.toml Allows compatible KiteViewers 0.6.
Manifest-v1.11.toml.default Updates compatible dependencies.
Manifest-v1.12.toml.default Updates compatible dependencies and JLLs.
Manifest-v1.13.toml.default Updates compatible dependencies.
CHANGELOG.md Documents the migration and layout change.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Resolve conflicts: move the KiteUtils 0.12 changelog entry to v0.11.20 (unreleased),
keep KiteViewers 0.6 compat with julia 1.12/1.13 in examples_3d, drop
Manifest-v1.11.toml.default, and update KiteUtils 0.12.2, KiteViewers 0.6.0,
KitePodModels 0.4.2 and AtmosphericModels 0.3.12 in the main default manifests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ufechner7
ufechner7 merged commit 53124cb into main Oct 11, 2026
5 checks passed
@1-Bort-1 1-Bort-1 added priority Open work waits on this and removed priority Open work waits on this labels Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants