Skip to content

Document automatic compass orientation detection - #15

Open
sensei-hacker wants to merge 1 commit into
iNavFlight:masterfrom
sensei-hacker:docs-mag-auto-orientation-detection
Open

Document automatic compass orientation detection#15
sensei-hacker wants to merge 1 commit into
iNavFlight:masterfrom
sensei-hacker:docs-mag-auto-orientation-detection

Conversation

@sensei-hacker

Copy link
Copy Markdown
Member

Summary

  • Documents the new mag-calibration-spin feature (inav#11708): INAV can automatically detect and set the compass's mounting orientation relative to the FC during the normal calibration spin.
  • Clarifies scope: it only resolves compass-to-FC alignment, not FC-to-airframe alignment (board_align_* must still be set correctly first).
  • Notes it's unavailable on F722-based flight controllers (256KB RAM, at the firmware's MCU_RAM_SIZE > 256 build gate) and any other target at or below that RAM threshold — those fall back to the existing manual align_mag_* process.

Test plan

  • Docs-only change; verified against the firmware source (compass_orientation.c, common_post.h) on the linked PR's branch.

Covers the new mag-calibration-spin feature from inav#11708: what it does,
that it only covers compass-to-FC alignment (not FC-to-airframe alignment),
and that it's unavailable on F722-based boards (256KB RAM, at the
MCU_RAM_SIZE > 256 build gate).

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Document automatic compass orientation detection

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Documents automatic compass orientation detection during standard magnetometer calibration spins.
• Clarifies supported mountings, confidence fallback, and flight-controller alignment prerequisites.
• Explains RAM-based availability limits and manual alignment fallback.
Diagram

graph TD
  Spin["Calibration spin"] --> Ram{"RAM over 256KB?"}
  Ram -- Yes --> Sample["Collect paired samples"] --> Match{"Confident standard match?"}
  Ram -- No --> Manual["Manual alignment"]
  Match -- Yes --> Set["Set mag alignment"]
  Match -- No --> Keep["Keep current alignment"]
Loading
High-Level Assessment

Adding the explanation directly beside the existing Configurator calibration procedure is the clearest approach because orientation detection occurs during that same spin. A standalone page would fragment the workflow and duplicate alignment context, while the current section links readers to manual alternatives and prerequisite FC alignment guidance.

Files changed (1) +14 / -0

Documentation (1) +14 / -0
compass.mdxDocument automatic orientation detection during compass calibration +14/-0

Document automatic orientation detection during compass calibration

• Adds guidance explaining how INAV derives compass-to-flight-controller alignment from calibration samples and applies it only for confident standard-orientation matches. Documents FC alignment prerequisites, supported mounting angles, RAM-based availability limits, and manual or existing-alignment fallbacks.

docs/05-core-features/compass.mdx

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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