Skip to content

Follow KiteUtils 0.14: east azimuth anti-clockwise, wing angles stored per wing - #354

Draft
1-Bort-1 wants to merge 10 commits into
mainfrom
agent/353-move-to-kiteutils-0-14-and-document-calc
Draft

1-Bort-1 wants to merge 10 commits into
mainfrom
agent/353-move-to-kiteutils-0-14-and-document-calc

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Depends-On: OpenSourceAWE/KiteViewers.jl release after v0.7.0

KiteUtils 0.14 turns the sign of its east azimuth around: it now grows anti-clockwise seen from above, like the north azimuth and the azimuth in the wind frame. This package's east azimuth is that function, so it flips with it. Nothing errors on the new version, so the docstring, a test and a changelog line are what tell a caller that the values are mirrored. A kite due north now reads +90° instead of -90°.

calc_azimuth_east(kps)   # kite due north: before -90°, after +90°

KiteUtils 0.14.1 also stores the wing angles (elevation, azimuth, heading, course, angle of attack) once per wing, in the system state and in the logger. Saved state files follow it, so they hold lists under new names. A file saved before would have lost those angles on loading, without an error; it now loads them into the first wing. The examples that plotted or printed the logged elevation stopped with an error and now read the first wing.

The branch cannot merge yet: the test environment and the 3D examples use the viewer package, whose latest release only allows KiteUtils up to 0.13. Its fix is in review (OpenSourceAWE/KiteViewers.jl#69). The other three dependencies that capped KiteUtils have released versions that allow 0.14. Once the viewer is released, one more commit raises the KiteUtils bound, in the package and in the docs, and re-resolves both tracked manifests.

The bound will be 0.14.1 and up, not 0.13 beside 0.14. The same function would otherwise return opposite signs depending on which version a user happened to resolve, and 0.14.0 lacks the per-wing angles.

Close #357, the automatic compat update allowing 0.13 and 0.14 together. It would let the mirrored and unmirrored angle coexist.

Saved states also carry the new force, wind and acceleration columns of KiteUtils 0.14.1. These models do not fill them, so they are saved as zeros. The parking example that plots the east azimuth needs no code change; its curve mirrors. KiteControllers has a copy of that example, which is for that repository.

Work left

  • Once a KiteViewers release allows KiteUtils 0.14: raise the bound to 0.14.1 in the package and the docs and re-resolve both tracked manifests (Julia 1.12 and 1.13) in one commit, then run the full suite and the docs build on that commit.

Verification

  • Reproduced: azimuth_east of a kite due north is -π/2 on KiteUtils 0.13.3, and the examples stop with FieldError: type Logger has no field elevation_vec on 0.14.2
  • Due-north test red on 0.13.3 (Evaluated: -90.00000000000003 ≈ 90.0), green on 0.14
  • Older-state-file test red on 0.14.1 before the fix, green after; the save test follows the renamed key
  • Full suite on KiteUtils 0.14.2, with the released versions of the other dependencies and the viewer from the branch of Allow KiteUtils 0.14 next to 0.13 KiteViewers.jl#69, without benchmarks: 3162 passed, 0 failed (6 min). That environment is not committed
  • Both initialisation examples run on 0.14.2; the viewer's status text shows the state's first-wing elevation and azimuth (55.00° and 30.00° set and shown)
  • GitHub CI on the installable KiteUtils 0.13.3: fails at exactly the due-north test (-90.00000000000003 ≈ 90.0) and the save test (KeyError: key "elevations"), the two that need 0.14.1, until the bound moves
  • Plotting examples other than the two above: not run. Docs build on 0.14: not run. Julia 1.12 manifest: resolved with the bound
  • Up to date with main (v0.13.2)
  • Risk: a caller elsewhere in the ecosystem that reads this angle mirrors silently once it resolves 0.14.

Lines: +39 −18 (net +21) · the 10 files it touches: 3955 → 3976

Opened by 1-Bort-1, an AI agent working for 1-Bart-1.
Closes #353 · task KiteModels.jl-353

Rewrite the docstring, pin a kite due north at +90° in test-azimuth.jl,
note the sign change in the changelog and allow KiteUtils 0.14 in docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state agent:queued Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Oct 22, 2026

@1-Bort-1 1-Bort-1 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (advisory)

Verdict: REQUEST CHANGES · 4 inline, 0 off the diff

Good

  • The new calc_azimuth_east docstring says the right thing for KiteUtils 0.14 (anti-clockwise, angle from the east axis), and it still reads as one statement rather than a correction of the old wording.
  • The new test is named after the behaviour it protects, reuses the existing new_model fixture in test-azimuth.jl, and pins the case named in the issue: a kite due north is at +90°.
  • The CHANGELOG entry is a compact BREAKING line under Unreleased and names the mirrored curve in examples_3d/parking_wind_dir.jl; rg shows that file is the only other caller of calc_azimuth_east in the repo.

Not good

  • test/test-azimuth.jl:118 — The root Project.toml still pins KiteUtils = "0.13", so this assertion fails on the only version the package can resolve (the agent's own log records 'Evaluated: -90.00000000000003 ≈ 90.0'). Merging this turns the test suite red.
  • src/KiteModels.jl:461 — Without the compat bump to 0.14 this docstring is wrong: on KiteUtils 0.13, calc_azimuth_east is still positive clockwise. Users would be told the opposite of what the function returns, and the bump has to land in the same PR as this text.
  • CHANGELOG.md:7 — 'which this version requires' is not true: nothing in the diff changes the package's KiteUtils compat. The entry describes a requirement that isn't there.
  • docs/Project.toml:16 — This widens the docs compat to 0.14 while the package being documented cannot load 0.14, which is the opposite of the plan's 'drop 0.13' and leaves the docs and package compat out of step.
  • There is no PR card, so it is not written down anywhere that 0.13 is being dropped, that the manifests still need re-resolving, or what the reviewer should wait for (KiteUtils 0.14.0 is still unregistered, General#172937).
  • docs/Project.toml gains 0.14 while the main package stays on 0.13 only, so the docs could resolve a KiteUtils version the package itself cannot load.
  • Neither Manifest-v1.12.toml.default nor Manifest-v1.13.toml.default is re-resolved, although the plan for #353 requires both.
  • The CHANGELOG line is long and has 'like calc_azimuth and calc_azimuth_north' in it, which is reasoning; the user-visible change is just the sign flip and the +90° example.

claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.

Comment thread test/test-azimuth.jl
find_steady_state!(s; upwind_dir=π)
@test pos_kite(s)[1] ≈ 0.0 atol=1e-6
@test pos_kite(s)[2] > 0.0
@test rad2deg(calc_azimuth_east(s)) ≈ 90.0 atol=1e-6

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MAJOR: The root Project.toml still pins KiteUtils = "0.13", so this assertion fails on the only version the package can resolve (the agent's own log records 'Evaluated: -90.00000000000003 ≈ 90.0'). Merging this turns the test suite red.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. It stays red until KiteUtils 0.14 can resolve here (General#172937, AtmosphericModels.jl#56, and KitePodModels/WinchModels bounds). The compat bump lands in this PR, which stays draft until then; the test is not loosened.

Comment thread src/KiteModels.jl

Determine the azimuth_east angle of the kite in radian.
Positive clockwise when seen from above.
Determine the azimuth_east angle of the kite in radian: the angle of its horizontal position

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MAJOR: Without the compat bump to 0.14 this docstring is wrong: on KiteUtils 0.13, calc_azimuth_east is still positive clockwise. Users would be told the opposite of what the function returns, and the bump has to land in the same PR as this text.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The bump to 0.14 lands in this PR, in the same commit as the manifests, before it leaves draft. The card now says so.

Comment thread CHANGELOG.md Resolved
Comment thread docs/Project.toml Resolved
@1-Bort-1 1-Bort-1 added agent:running Agent task state and removed agent:queued Agent task state labels Oct 22, 2026
@1-Bort-1

1-Bort-1 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member Author

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

      KPS3, trim, azimuth -30.0°, upwind_dir 45.0°                       |   22           22   0.0s
      KPS4, trim, azimuth 30.0°, upwind_dir -90.0°                       |   22           22   0.1s
      KPS4, trim, azimuth 30.0°, upwind_dir 45.0°                        |   22           22   0.1s
      KPS4, trim, azimuth -30.0°, upwind_dir -90.0°                      |   22           22   0.1s
      KPS4, trim, azimuth -30.0°, upwind_dir 45.0°                       |   22           22   0.1s
      KPS3, init! at azimuth 30°                                         |    4            4   1.5s
      KPS4, init! at azimuth 30°                                         |    4            4   1.1s
      KPS3, turbulent wind at the turned kite position                   |    1            1   1.1s
      KPS3, azimuth 0° is unchanged                                      |    2            2   0.0s
      KPS4, azimuth 0° is unchanged                                      |    2            2   0.1s
      azimuth_east of a kite due north is +90°, anti-clockwise from east |    2     1      3   1.2s
RNG of the outermost testset: Random.Xoshiro(0x1a85fb02c07c8bfb, 0x61a22fb7cc6bd874, 0xf65e4b1ba59625f4, 0x57ff5f62929d94f4, 0x773f9d6663fde5c7)
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

The docs [compat] for KiteUtils 0.14 moves with the package's own bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 changed the title Move to KiteUtils 0.14 and document calc_azimuth_east as anti-clockwise Make calc_azimuth_east positive anti-clockwise, following KiteUtils 0.14 Oct 22, 2026
@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 22, 2026
@1-Bort-1

1-Bort-1 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member Author

CI: test / Julia 1 - ubuntu-latest - x64 - pull_request failed on 0c6fe3a4c.

2 failing test(s):

azimuth_east of a kite due north is +90°, anti-clockwise from east: Test Failed at /home/runner/work/KiteModels.jl/KiteModels.jl/test/test-azimuth.jl:118
  Expression: ≈(rad2deg(calc_azimuth_east(s)), 90.0, atol = 1.0e-6)
   Evaluated: -90.00000000000003 ≈ 90.0 (atol=1.0e-6)

save_state: Error During Test at /home/runner/work/KiteModels.jl/KiteModels.jl/test/test-update-sys-state.jl:133
  Test threw exception
  Expression: (state["elevations"])[1] isa Float64
  KeyError: key "elevations" not found

https://github.com/OpenSourceAWE/KiteModels.jl/actions/runs/45164185361/job/137656799396

@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:ci Agent task state agent:queued Agent task state agent:running Agent task state labels Oct 22, 2026
@1-Bort-1 1-Bort-1 added agent:running Agent task state and removed agent:queued Agent task state labels Oct 29, 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 29, 2026
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:waiting-human Agent task state agent:queued Agent task state labels Nov 8, 2026
KiteUtils 0.14.1 stores elevation, azimuth, heading, course and AoA per
wing, so save_state writes the per-wing lists and load_state silently
dropped the scalars of a file written before. It now goes through the
properties of SysState, which put them on the first wing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:waiting-human Agent task state and removed agent:running Agent task state labels Nov 8, 2026
@1-Bort-1 1-Bort-1 added the blocking Open work waits on this label Nov 14, 2026
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:waiting-human Agent task state agent:queued Agent task state labels Nov 23, 2026
KiteUtils 0.14 logs elevation per wing in elevations_vec; the examples
read elevation_vec, which no longer exists, and stopped with a
FieldError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Nov 23, 2026
@1-Bort-1 1-Bort-1 changed the title Make calc_azimuth_east positive anti-clockwise, following KiteUtils 0.14 Follow KiteUtils 0.14: east azimuth anti-clockwise, wing angles stored per wing Nov 23, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state and removed agent:running Agent task state labels Nov 23, 2026
@1-Bort-1

Copy link
Copy Markdown
Member Author

Blocked. Its checks are red on 0c6fe3a4c, and its turn ended without a commit to fix them. Its card says it waits on OpenSourceAWE/KiteViewers.jl release after v0.7.0. The agent will not try again by itself. Push a fix to this branch and its checks are watched again, or reply here with what to try and it takes another turn.

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:blocked Agent task state blocking Open work waits on this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move to KiteUtils 0.14 and document calc_azimuth_east as anti-clockwise

1 participant