Skip to content

BUG: evaluate the accelerometer gravity at the altitude - #1215

Merged
Gui-FernandesBR merged 4 commits into
developfrom
bug/accelerometer-gravity-altitude
Nov 16, 2026
Merged

Gui-FernandesBR merged 4 commits into
developfrom
bug/accelerometer-gravity-altitude

Conversation

@Gui-FernandesBR

Copy link
Copy Markdown
Member

Part of #1209. With consider_gravity=True, Accelerometer.measure evaluated environment.gravity at u[3] (x velocity) instead of u[2] (altitude), so any height-dependent gravity model gave the wrong reading. The new test fails on develop (reads 8 m/s² instead of 5) and passes here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq

@Gui-FernandesBR
Gui-FernandesBR requested a review from a team as a code owner November 16, 2026 02:28
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (da24869) to head (2a39f1d).
⚠️ Report is 5 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Gui-FernandesBR and others added 4 commits November 16, 2026 10:18
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
Gui-FernandesBR force-pushed the bug/accelerometer-gravity-altitude branch from 5c6a3a0 to 2a39f1d Compare November 16, 2026 13:18
@Gui-FernandesBR
Gui-FernandesBR merged commit 501c1a8 into develop Nov 16, 2026
8 checks passed
@Gui-FernandesBR
Gui-FernandesBR deleted the bug/accelerometer-gravity-altitude branch November 16, 2026 13:18
@Gui-FernandesBR Gui-FernandesBR mentioned this pull request Nov 20, 2026
11 tasks done
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