Skip to content

fix(windGround): emit ground direction to environment.wind.directionGround#245

Open
msallin wants to merge 1 commit into
SignalK:v2from
msallin:fix/v2-windground-path
Open

fix(windGround): emit ground direction to environment.wind.directionGround#245
msallin wants to merge 1 commit into
SignalK:v2from
msallin:fix/v2-windground-path

Conversation

@msallin

@msallin msallin commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Move the ground-wind direction output from environment.wind.directionTrue to environment.wind.directionGround.
  • Fixes the "ground direction overwrites true direction" conflict when both calculators are enabled.

Context

Reported in #186. The main windGround calc derives wind direction in the ground frame (uses SOG) but was writing to environment.wind.directionTrue, which per the SK spec is the water-frame true wind direction. Tracked in #244.

Test plan

  • Flip the // BUG: lock in test/windGround.ts
  • Assertion on the finite-input case updated to expect directionGround
  • npm test — 300 pass, 1 pre-existing moon failure unrelated to this change

The calculator uses SOG (speed over ground) to compute ground-frame
wind, but was writing its direction output to
environment.wind.directionTrue, which the SK spec reserves for the
water-frame true wind direction. This overwrote any value produced by
the water-frame true wind calculator when both were enabled.

Rename the output path to environment.wind.directionGround and flip
the test lock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant