Repository navigation
BUG: evaluate the accelerometer gravity at the altitude - #1215
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1215 +/- ##
========================================
Coverage 91.67% 91.67%
========================================
Files 131 131
Lines 18239 18242 +3
========================================
+ Hits 16721 16724 +3
Misses 1518 1518 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
With consider_gravity=True, Accelerometer.measure evaluated environment.gravity at u[3] (the x velocity) instead of u[2] (the altitude), so a gravity model that varies with height gave the wrong reading. Part of #1209. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq
Flight already evaluates gravity at the altitude and passes it to every sensor, so measure() now uses that value and only falls back to environment.gravity at u[2] when it is missing. The lookup happens only with consider_gravity=True, and the docstring states the altitude frame. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW576DiZiigj5werWBsXn
The old test used a fixed 9.81 with a 10% tolerance, so it could not tell u[2] from u[3]. A seeded twin without gravity now isolates the gravity term, which must match the rotated env gravity at U[2] exactly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW576DiZiigj5werWBsXn
No integration test used consider_gravity=True. Two ideal accelerometers, with and without gravity, now fly under a height-dependent gravity, and their difference must equal g(z(t)) at every sample. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW576DiZiigj5werWBsXn
Gui-FernandesBR
force-pushed
the
bug/accelerometer-gravity-altitude
branch
from
November 16, 2026 13:18
5c6a3a0 to
2a39f1d
Compare
11 tasks done
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.
Part of #1209. With
consider_gravity=True,Accelerometer.measureevaluatedenvironment.gravityatu[3](x velocity) instead ofu[2](altitude), so any height-dependent gravity model gave the wrong reading. The new test fails ondevelop(reads 8 m/s² instead of 5) and passes here.🤖 Generated with Claude Code
https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq