Skip to content

fix(fatcow): the cow asks the shared helper whether it is on the ground (FIX-FAT-COW-GROUND-TEST, #295) - #320

Merged
FullGas1 merged 3 commits into
developfrom
fix/FIX-FAT-COW-GROUND-TEST
Nov 18, 2026
Merged

FullGas1 merged 3 commits into
developfrom
fix/FIX-FAT-COW-GROUND-TEST

Conversation

@FullGas1

Copy link
Copy Markdown
Collaborator

Summary

Issue #295. DCS's own inAir() can answer "in the air" for a high-chassis helicopter such as the CH-47, the cow of the whole feature, while it is landed and at rest. CTLD has ctld.utils.inAir for exactly that case (it counts a unit below groundAglThreshold and nearly still as on the ground) and the rest of the code uses it. The Fat Cow called the raw form at three places:

  1. FARP deployment: a landed cow was refused as "airborne". An AI cow's FARP never opened (since fix(fatcow): an AI cow that cannot open its FARP says so (FIX-FAT-COW-DEPLOY-REFUSALS, #296) #319 the flight at least reads "could not be deployed" and the log says why), and a piloted cow's pilot, on the ground with his crates in the hold, read "The Fat Cow FARP could not be deployed.".
  2. Land here: the "The Fat Cow is already on the ground." guard never fired, so a cow already on the ground was re-tasked to land.
  3. Release the Fat Cow (not in the issue, found in the grill): a landed cow was taken for an airborne one and given an orbit task, so it lifted off from its open FARP and left it behind, against the pilot guide.

What changes

The three go through ctld.utils.inAir. A cow really in the air is treated as before: refused by the deployment as "airborne", sent to land by Land here, orbiting where it stands when released. Messages, labels and order are unchanged; no text, dictionary or configuration change.

Out of scope, on purpose: the two raw calls of the mine field scene (another component, not analysed here; a lot of its own if it matters).

Tests

  • busted tests/ci/: 2015 successes, luacheck clean, build run (no dictionary drift).
  • The specs stubbed the raw form and the helper on the same flag, so they could not tell them apart. The new cases use a unit that disagrees with itself, the CH-47 at rest: raw inAir() says "in the air", the helper says "on the ground". 4 cases red first for the right reason (an AI cow's FARP not deployed, no "already on the ground", an orbit task given to a landed cow, a piloted FARP not opened), plus controls with a cow really in the air that pass before and after. One existing test whose mock lacked a velocity was updated now that the deployment reads it, and a core-spec case exercises the real helper with a landed CH-47.
  • DCS's behaviour for the CH-47 was not re-measured and not checked in a live mission: the helper's own documentation (inherited from v1) is the premise, and the fix is right whether or not DCS still misreports. A unit test, not a measurement, proves it.

🤖 Generated with Claude Code

FullGas1 and others added 2 commits November 18, 2026 19:38
PRD and one ticket: the Fat Cow asks ctld.utils.inAir instead of DCS's raw
inAir() at its three places.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DCS's raw inAir() can answer "in the air" for a landed CH-47, the cow of the
whole feature; ctld.utils.inAir exists for that case and the rest of CTLD uses
it. The Fat Cow called the raw form at three places: the FARP deployment
(a landed cow was refused as airborne: an AI cow's FARP never opened, a
piloted cow's pilot read "could not be deployed"), the Land here guard ("already
on the ground" never fired) and Release the Fat Cow (a landed cow was given an
orbit task and lifted off from its open FARP). All three now go through the
helper; a cow really in the air is treated as before. The mine field scene's
raw calls are untouched. The specs now tell the two forms apart with a unit
that disagrees with itself, the CH-47 at rest. Issue #295.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@FullGas1
FullGas1 requested a review from davidp57 as a code owner November 18, 2026 18:40
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@FullGas1
FullGas1 merged commit 8b6ab73 into develop Nov 18, 2026
10 checks passed
@FullGas1
FullGas1 deleted the fix/FIX-FAT-COW-GROUND-TEST branch November 18, 2026 18:52
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.

1 participant