Skip to content

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

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

1-Bart-1 wants to merge 10 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
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>
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:ci Agent task state agent:queued Agent task state labels Oct 9, 2026
@1-Bort-1

1-Bort-1 commented Oct 9, 2026

Copy link
Copy Markdown
Member

Not a bug in this PR: the one error is #314, the same failure that happens on main. On eb2238a under Julia 1.13.0, only test_find_steady_state errors. That is the 392 m KPS4 case, where find_steady_state! stops converging on 1.13. The 11 broken results are main's own @test_broken, and every other testset in the run passes. The same signature showed up on 6bf76f9 before the merge, and the merge touched only CHANGELOG.md and the package diagram. #314 is still open and records the same deterministic failure on main under 1.13.0, while 1.12.7 passes. GitHub CI doesn't show it because its CI=true path catches the error. No change here: the fix belongs to #314. Hiding the test to get this run green is exactly what that issue is about.

@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:ci Agent task state agent:review Agent task state agent:queued Agent task state labels Oct 9, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:waiting-human Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Oct 9, 2026

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:waiting-human Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants