Skip to content

fix: avoid false lighthouse rotation differences - #59

Open
n3orma wants to merge 1 commit into
bitcraze:mainfrom
n3orma:fix-lighthouse-rotation-delta
Open

n3orma wants to merge 1 commit into
bitcraze:mainfrom
n3orma:fix-lighthouse-rotation-delta

Conversation

@n3orma

@n3orma n3orma commented Oct 16, 2026

Copy link
Copy Markdown

Motivation

Lighthouse configuration checks can report a small rotation when only a base station's position changed, due to floating-point rounding.

Changes

  • Calculate rotation differences using atan2 to avoid numerical errors near zero.
  • Add regression coverage for position changes with an unchanged rotation.
  • Verify that genuine rotations of 0.001°, 90°, and 180° remain accurate.

Fixes #56.

Validation

  • cargo test --locked modules::lighthouse::tests — 13 passed.
  • cargo test --locked — 106 passed.
  • cargo build --locked
  • git diff --check

Signed-off-by: Dharmesh Makvana <212810347+n3orma@users.noreply.github.com>
@gemenerik
gemenerik self-requested a review November 17, 2026 09:14

This branch has not been deployed

No deployments
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.

lh check reports a ~0.02° turn when only the position differs

1 participant