Fix NED/NEU mismatch in wind estimator Z-axis consumers - #23
Closed
sensei-hacker wants to merge 1 commit into
Closed
Fix NED/NEU mismatch in wind estimator Z-axis consumers#23sensei-hacker wants to merge 1 commit into
sensei-hacker wants to merge 1 commit into
Conversation
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.
Author
|
Closing — targeted the wrong base. iNavFlight#11855 has already been merged; reopening this as a PR against upstream maintenance-10.x instead. |
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.
Summary
This PR's
fuselageDirection[Z]sign flip changesgetEstimatedWindSpeed(Z)'s output convention from NED to NEU, matchingposEstimator.gps.vel.z's own established NEU convention — confirmed empirically via SITL/JSBSim wind injection (a known downdraft produces a negative rawwind[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
-///from NED to NEUnegation in both consumers above.pitotmeter.c's virtual-airspeed path — it was already NEU-NEU consistent.// NED/// NEUmarkers 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).