Skip to content

Write KA orientations to SysState, keep KS inside the model - #312

Draft
1-Bart-1 wants to merge 8 commits into
mainfrom
frame-unification
Draft

1-Bart-1 wants to merge 8 commits into
mainfrom
frame-unification

Conversation

@1-Bart-1

@1-Bart-1 1-Bart-1 commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

TL;DR

SysState now carries KA orientations (aft-right-up, against ENU), the convention KiteUtils 0.13 stores; the model keeps working in KS and update_sys_state! converts at the boundary. Building on KiteUtils 0.13 forces two more changes that ride here: the 0.12 SysState migration (#321, merged in) and dropping Julia 1.11.

What a downstream consumer will notice

  • roll, pitch, yaw are no longer written to SysState — KiteUtils 0.13 removed those fields. orient_euler(s) still returns them against NED, and euler_KS(ss.orient) recovers them from a state or a log.
  • ss.orient is KA, not KS. calc_orient_quat and kite_ref_frame still return KS.
  • turn_rates is KA, so its z component has the opposite sign to before (a rate about an axis that pointed down and now points up).
  • winch_force, l_tether, v_reelout, set_force, set_torque, set_speed hold one value instead of four (from Build SysState with the KiteUtils 0.12 constructor and one-slot winch fields #321).
  • calc_heading(s) passes the quaternion instead of Euler angles; same angle, one quat2euler round trip fewer.

Julia 1.11 dropped

Agreed on this thread (option A). WinchModels 0.3.11 and AtmosphericModels 0.3.11, the only releases accepting KiteUtils 0.13, require Julia 1.12. So julia compat is 1.12, 1.13, Manifest-v1.11.toml.default is deleted, the CI cells move 1.11 → 1.12, and bin/install, bin/update_default_manifest and the install docs lose their 1.11 branch. CI's '1' cell runs 1.13.

Temporary: KiteViewers from a branch

No released KiteViewers accepts KiteUtils 0.13. examples_3d/Project.toml and test/Project.toml take it via [sources] from OpenSourceAWE/KiteViewers.jl#56's branch (agent/54-update-kiteutils). Those two lines must come out, and the compat point at the released version, before this merges — hence the draft and the Depends-On below.

Also in the diff

  • test-kps3.jl: calc_heading(kps) ≈ 0 had no absolute tolerance; the quaternion route gives 2.8e-17, the Euler route 2π − ε. It now compares modulo 2π.
  • examples_3d/parking_*.jl: stop overwriting sys_state.orient with a KS quaternion, and plot the KS body rate next to heading_rate so the curves keep the same sign.
  • calc_orient_quat gets a docstring and a place in docs/src/functions.md.

Review order: src/KiteModels.jl, then test/test-update-sys-state.jl. Everything under CHANGELOG.md and the one-slot winch fields is #321's and disappears from this diff when #321 merges.

Verification

  • test/test-update-sys-state.jl fails without the KA conversion (orient, turn_rates), passes 58/58 with it — Julia 1.12.7 and 1.13.0.
  • 1.13.0 on 6bf76f9: test-update-sys-state.jl 58/58, test-kps3.jl 77/77, test-aqua.jl 9/9. Earlier on 1.12.7: test-kps4.jl (11 @test_broken from main), test-orientation.jl 88/88, test-simulate_4p.jl 2/2, test-interface.jl, test-helpers.jl 19/19.
  • Docs build clean · REUSE lint clean · up to date with main · GitHub CI green on eb9d276.
  • agent ci-local on 1.13 stops at test_find_steady_state, which is find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314 and fails the same way on main.
  • examples_3d parking examples not run (need a display).
  • Risk: the [sources] lines pin a branch that will be deleted after KiteViewers#56 merges.

Scope

24 files; Manifest-v1.11.toml.default is −3139 of the −3469. Source change is src/KiteModels.jl (+19/−27, most of it #321's).

Depends-On: #321
Depends-On: OpenSourceAWE/KiteViewers.jl release after v0.6.0

🤖 Generated with Claude Code

1-Bart-1 and others added 2 commits August 25, 2026 14:59
KiteUtils 0.13 defines SysState quaternions as KA (aft-right-up against ENU).
The model is unchanged: kite_ref_frame and calc_orient_quat stay KS, and
update_sys_state! converts at the boundary.

- roll, pitch and yaw are unchanged; they stay KS, against NED
- turn_rates is KA, so its z component has the opposite sign to before
- calc_heading(s) passes the quaternion instead of Euler angles, one round trip
  through quat2euler fewer, same angle

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
KiteUtils 0.13 dropped the fields: they were the same orientation the quaternion
already holds, and keeping them kept a second convention in the state.
euler_ks(ss.orient) reports them, still against NED.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bart-1 1-Bart-1 added the refresh Have the agent look again at what it waits on label Sep 27, 2026
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed refresh Have the agent look again at what it waits on agent:queued Agent task state labels Sep 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:waiting-human Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:waiting-human Agent task state agent:queued Agent task state labels Sep 27, 2026
1-Bort-1 and others added 2 commits September 27, 2026 13:35
The WinchModels and AtmosphericModels releases that accept KiteUtils 0.13
(both 0.3.11) require Julia 1.12, so KiteModels on KiteUtils 0.13 cannot
support 1.11. Removes its manifest, CI cell, install branch and docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- fromKS2KA / fromKS2KA_body / fromENU2NED replace the names KiteUtils 0.13
  did not ship; calc_heading(s) hands it a KA attitude.
- examples_3d and test take KiteViewers from OpenSourceAWE/KiteViewers.jl#56's
  branch until a release accepts KiteUtils 0.13.
- Minimal resolve on 1.12 and 1.13: KiteUtils 0.12.2 -> 0.13.1,
  WinchModels 0.3.10 -> 0.3.11, nothing else.
- Tests assert the KA orientation, euler_KS round trip and KA turn rate;
  the parking examples stop overwriting sys_state.orient with KS and plot
  the KS body rate next to heading_rate.
- test-kps3: heading at azimuth 0 is checked modulo 2π; ≈ 0 had no
  absolute tolerance and failed on 2.8e-17.
- calc_orient_quat is on the functions page.

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!

@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 27, 2026
@1-Bart-1

Copy link
Copy Markdown
Member Author

@1-Bort-1 address the review comments

@OpenSourceAWE OpenSourceAWE deleted a comment from 1-Bort-1 Sep 28, 2026
@OpenSourceAWE OpenSourceAWE deleted a comment from 1-Bort-1 Sep 28, 2026
@OpenSourceAWE OpenSourceAWE deleted a comment from 1-Bort-1 Sep 28, 2026
@OpenSourceAWE OpenSourceAWE deleted a comment from 1-Bort-1 Sep 28, 2026
@OpenSourceAWE OpenSourceAWE deleted a comment from 1-Bort-1 Sep 28, 2026
@OpenSourceAWE OpenSourceAWE deleted a comment from 1-Bort-1 Sep 28, 2026
@1-Bort-1 1-Bort-1 added agent:queued Agent task state and removed agent:review Agent task state labels Sep 28, 2026
@1-Bart-1

Copy link
Copy Markdown
Member Author

And update the PR body

@1-Bort-1 1-Bort-1 added agent:running Agent task state and removed agent:queued Agent task state labels Sep 28, 2026
LinearAlgebra and Pkg compat move to "1.12, 1.13" (1.13 ships 1.13.0 of
both); minimal resolve moves only the project hash in each .default.
Drop the inline comment that repeated the docstring, the docstring's
mention of its callers, a dangling clause in docs/src/index.md and a
trailing space in README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1

Copy link
Copy Markdown
Member

Review addressed in 6bf76f9, and the PR body rewritten to describe the branch as it stands: the roll/pitch/yaw removal, the Julia 1.11 drop and the temporary KiteViewers [sources] pin are now named there.

The fixes: LinearAlgebra and Pkg compat move to 1.12, 1.13 (Julia 1.13 ships 1.13.0 of both; Logging and REPL are 1.11.0 on 1.12 and 1.13, so their entries stay). The minimal resolve on 1.12.7 and 1.13.0 moves only project_hash in each .default. The inline comment above ss.orient .= fromKS2KA(...) is gone, calc_orient_quat's docstring no longer names its callers, and the dangling "make sure Python3 and Matplotlib are installed:" in docs/src/index.md and a trailing space in README.md are removed.

Not changed: the CHANGELOG.md entry is #321's and leaves this diff when #321 merges; the README relinks, bin/setup_env deletion, KitePodModels/aenarete links and VortexStepMethod bullet the review mentions are not in this branch's diff against main.

To review: git show 6bf76f94 — seven lines plus two manifest hashes.

Verification

  • Julia 1.13.0 on 6bf76f9: test-update-sys-state.jl 58/58, test-kps3.jl 77/77, test-aqua.jl 9/9 · docs build clean · up to date with main · CI: pending on push
  • Risk: none from this round; the standing one is the KiteViewers branch pin.

Commits

Review just these changes

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
Task KiteModels.jl-312

@1-Bort-1

Copy link
Copy Markdown
Member

Done in 6bf76f9; each finding answered where it was written.

@1-Bort-1

Copy link
Copy Markdown
Member

PR body rewritten to match the branch at 6bf76f9.

@1-Bort-1 1-Bort-1 added agent:ci Agent task state and removed agent:running Agent task state labels Sep 28, 2026
@1-Bort-1

1-Bort-1 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Local full suite: FAIL (2 min, Julia 1.13.0, one cell of the matrix)

    init_springs!           |   34                    34     0.0s
    init_masses!            |   11                    11     0.0s
    calc_particle_forces!   |   11                    11     0.5s
    init                    |   11                    11     0.0s
    initial_residual        |    1              1      2     1.0s
    inner_loop!             |   11                    11     0.3s
    calc_aero_forces!       |   11                    11     0.4s
    test_loop               |   33                    33     0.4s
    test_residual!          |   30              9     39     1.1s
    test_getters            |    7              1      8     0.1s
    test_find_steady_state  |           1              1     1.7s
RNG of the outermost testset: Random.Xoshiro(0x40e8ebbf18bd9bef, 0xeb1e258ca6e65229, 0x7866a9fddbbbcd3b, 0x4e573826cfca85e3, 0x80a7376a06a53dc6)
ERROR: Package KiteModels errored during testing
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Types.jl:68
  [2] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3148
  [3] test
    @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3026 [inlined]
  [4] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:586
  [5] kwcall(::@NamedTuple{io::IOContext{IO}}, ::typeof(Pkg.API.test), ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:562
  [6] test(pkgs::Vector{PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:172
  [7] test(pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:161
  [8] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::PackageMode, subdir::Nothing, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:189
  [9] test()
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:178
 [10] top-level scope
    @ none:1
 [11] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [12] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:310
 [13] _start()
    @ Base ./client.jl:577

@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:ci Agent task state agent:queued Agent task state labels Sep 28, 2026
@1-Bort-1

Copy link
Copy Markdown
Member

Not a bug in this PR: the one error is #314, which fails the same way on main. Only test_find_steady_state errors (the 392 m KPS4 case, where find_steady_state! stops converging on Julia 1.13); the 11 broken are main's own @test_broken, and every other testset passes. #314 records the same failure on main under 1.13.0, deterministic and at the same iteration count, while 1.12.7 is clean. GitHub CI is green on 6bf76f9 only because test/test-kps4.jl:603 turns this error into @test_broken when CI=true. main has no commits since this branch was synced, so nothing here changed, and I haven't pushed a commit for it. The fix belongs in #314, not in this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:review Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants