Repository navigation
Conversation
The flight path controller already worked with the heading positive to the right, so the planner stops negating the heading and course it is given. The planner's turn thresholds and the default of heading_upper_turn (335 -> 25 degrees) are mirrored to match, and the parking controller example takes the new sign. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KiteModels' calc_heading(kps) loses its neg_azimuth keyword with the right-handed heading, so the examples that compute the heading themselves call it without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks
This branch has not been deployed
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.
Depends-On: OpenSourceAWE/KiteUtils.jl release after v0.14.2
Depends-On: OpenSourceAWE/KiteModels.jl#362
The next KiteUtils release flips the sign of the heading and the course. Zero still points towards zenith, but +90° now means the nose (or the velocity) points to the right as seen from the ground station. KiteModels follows in OpenSourceAWE/KiteModels.jl#362, so the heading and course the controllers receive change sign. This branch makes the controllers and examples expect that convention, so the autopilot flies the same figure of eight and the parking controller parks the same way as before.
The flight path controller already worked internally with the heading positive to the right. The planner flipped the heading and course before handing them over. That flip is gone, so the controller sees exactly the numbers it saw before.
The flight path planner switches between turns on heading thresholds. Each threshold is mirrored (ψ → 360° − ψ), so every turn ends at the same physical direction as before. One setting changes meaning with it: the upper turn's heading threshold is now 25° instead of 335°. The default, the four shipped settings files and the changelog (BREAKING) say so. A user's own settings file that sets it takes 360° minus its old value.
The examples that compute the heading themselves now call KiteModels' heading getter without the "negate the azimuth" option, which KiteModels removes. That option gave a heading a few degrees off the geometric one, depending on the azimuth. The examples now steer on the geometric heading, the same one the system state carries. The flights below show that this costs nothing.
The parking controller example now takes the heading and its set value positive to the right. It still returns the kite model's steering, so the parking examples that call it stay unchanged. Its own tests are re-derived: the mirrored inputs give the same steering and the mirrored turn rates. Two of its seven checks were already failing on
main, with stale references for the steering and the turn rate. Those references are re-derived along with the rest.I put the sign of the steering into the parking example's inversion block rather than negating its output at each caller. The flight path controller does the opposite, and the examples negate its output. I left that alone because changing a public function's output sign would break every user's call.
The KiteUtils compatibility bound moves once its release is out. That release also needs WinchControllers, KiteViewers and KitePodModels to accept the new KiteUtils.
Run time: unchanged. Only signs and comparisons change, and the 1000 s batch runs took the same wall time.
Verification
Reproduced first, on
main: a heading of +30° reached the controller as −30°. The planner stayed in the upper turn at 340° but left it at 185°. It left the low turn at 146°, the left turn at 204° and the right turn at 156°, each the mirror of the new thresholds.test/test-heading_convention.jl(new): red onmain(the controller and planner checks fail), green after.The new test plus
test-fpp_settings,test-model_and_control,test-flightpathcontrollerandtest-kiteobserver: 154/154 pass.Parking controller example tests: 7/7 pass (5/7 on
main).Batch autopilot, 1000 s per project. All nine runs complete, average power in W.
mainis the code as shipped. The branch's inputs come from the installed KiteModels with the heading and course mirrored: "today's" uses the examples' old heading, "geometric" uses the heading KiteModels now gives.mainThe mirroring is exact: the system state's old heading equals 360° minus the right-handed geometric heading, to 0.01° at each of ten samples of a steered flight.
Docs build completes; its warnings are about functions this branch does not touch.
Not run: the examples against the KiteUtils and KiteModels branches themselves. The mirrored inputs above stand in for them, since KiteModels' pull request reports the four-point model's flight as bit-identical.
Local full suite on this head: PASS (15 min, exit 0, Julia 1.13.4). GitHub CI: starts when the pull request opens; it installs today's KiteUtils, whose heading has the old sign, so it checks only the sign-free parts until the release.
Benchmark: n/a
Risk: a caller that feeds the planner or the system state control its own heading in the old convention now steers the mirror image, with no error.
Opened by
1-Bort-1, an AI agent working for @1-Bart-1.Closes #89 · task
KiteControllers.jl-89Refs OpenSourceAWE/KiteUtils.jl#194