Skip to content

Fix NED/NEU mismatch in wind estimator Z-axis consumers - #23

Closed
sensei-hacker wants to merge 1 commit into
breadoven:abo_windestimator_fixesfrom
sensei-hacker:fix/wind-z-ned-neu-consistency
Closed

Fix NED/NEU mismatch in wind estimator Z-axis consumers#23
sensei-hacker wants to merge 1 commit into
breadoven:abo_windestimator_fixesfrom
sensei-hacker:fix/wind-z-ned-neu-consistency

Conversation

@sensei-hacker

Copy link
Copy Markdown

Summary

This PR's fuselageDirection[Z] sign flip changes getEstimatedWindSpeed(Z)'s output convention from NED to NEU, matching posEstimator.gps.vel.z's own established NEU convention — confirmed empirically via SITL/JSBSim wind injection (a known downdraft produces a negative raw wind[2]).

Two consumers were left unchanged and still apply the old "convert NED to NEU" negation, which now double-flips the sign:

  • rth_estimator.c:156 (vertical wind used in RTH glide-distance/energy estimation)
  • io/osd.c:3768 (OSD vertical wind speed indicator)

Changes

  • Drop the now-obsolete -///from NED to NEU negation in both consumers above.
  • No functional change to pitotmeter.c's virtual-airspeed path — it was already NEU-NEU consistent.
  • Add // NED / // NEU markers at every place a Z-axis wind value is read, written, or passed (wind_estimator.c/.h, blackbox.c), so the convention no longer requires re-derivation.

Testing

Builds clean (SITL, no new warnings). Verified against this PR's actual commit (based on abo_windestimator_fixes).

PR iNavFlight#11855 changed getEstimatedWindSpeed(Z)'s output convention from NED
to NEU to restore internal consistency with posEstimator.gps.vel.z
(NEU). Confirmed empirically via SITL/JSBSim wind injection. Two
consumers (rth_estimator.c, osd.c) still applied their old "NED to NEU"
negation, which now double-flips the sign of vertical wind used in RTH
glide-distance estimation and the OSD vertical wind indicator.

Removes the now-obsolete negation in both places, and adds "// NED" /
"// NEU" markers at every place a Z-axis wind estimate value is read,
written, or passed, so the convention is explicit rather than requiring
re-derivation.
@sensei-hacker

Copy link
Copy Markdown
Author

Closing — targeted the wrong base. iNavFlight#11855 has already been merged; reopening this as a PR against upstream maintenance-10.x instead.

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