Skip to content

Document the Alignment Tool wizard and automatic compass orientation detection - #15

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

sensei-hacker wants to merge 8 commits into
iNavFlight:masterfrom
sensei-hacker:docs-mag-auto-orientation-detection

Conversation

@sensei-hacker

@sensei-hacker sensei-hacker commented Sep 2, 2026

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.
  • Adds a decision-first guide to the Alignment Tool tab's Auto Alignment Wizard (docs/04-inav-configurator/alignment-tool-tab.mdx), covering all four hardware-dependent paths: RAM-capable vs. RAM-constrained boards, each with and without a magnetometer fitted. States up front which order to do board alignment vs. compass calibration in, since doing it backwards wastes a calibration spin.
  • Cross-links compass.mdx, calibration-tab.mdx, and 04-accel-calibration.mdx to the new wizard page instead of leaving them as manual-only instructions.
  • Simplifies the RAM-gating explanation (F405/F411/F722, 256KB RAM) to name the affected boards plainly instead of implementation details.
  • Companion wiki update: iNavFlight/inav.wiki.git — Alignment-Tool-Tab.md, Calibration-Tab.md, GPS-and-Compass-setup.md now point at this page instead of duplicating the walkthrough.

Test plan

  • Docs-only change; verified against the firmware source (compass_orientation.c, common_post.h) and the inav-configurator wizard implementation (magnetometer.js/.html, calibration.js, locale/en/messages.json) on the linked branches.
  • Screenshots of the wizard UI are not yet included (tracked separately).

https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4

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

@robotgoat

Copy link
Copy Markdown
Collaborator

I hope that this isn't too much of an ask, but would it be possible to make sure that each new sentence belongs on its own line?

… docs

Expands the alignment-tool-tab stub into a decision-first guide covering
the wizard's four hardware-dependent paths (RAM-capable vs RAM-constrained,
with vs without a magnetometer), since getting the order wrong wastes a
calibration spin. Cross-links compass.mdx, calibration-tab.mdx, and
04-accel-calibration.mdx instead of duplicating manual-alignment guidance
that's now superseded by the wizard. Also simplifies the RAM-gating
explanation in compass.mdx to name the affected boards plainly instead of
implementation details (sample buffer, compiled out).

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
@sensei-hacker sensei-hacker changed the title Document automatic compass orientation detection Document the Alignment Tool wizard and automatic compass orientation detection Sep 12, 2026
@sensei-hacker

sensei-hacker commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

I hope that this isn't too much of an ask, but would it be possible to make sure that each new sentence belongs on its own line?

sure. Is that a Docusaurus thing, or ... ?

Splits several two-sentence lines introduced in the previous commit, per
robotgoat's review request on this PR. Also fixes the pre-existing
"Alignemnt" typo in the alignment-tool-tab.mdx image alt text, matching
upstream master's independent fix to the same line.

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4

# Conflicts:
#	docs/04-inav-configurator/alignment-tool-tab.mdx
Captured live via CDP against a connected H7 board (RAM-capable, with
magnetometer): the tab overview, both common wizard steps, the
RAM-capable+mag finishing dialog, and the manual compass wizard's
east-facing step. Replaces the old pre-wizard placeholder image and
corrects the finishing-dialog quote to match the exact captured copy.

Also fixes a broken link found via `docusaurus build`: the intro
pointed at a nonexistent ./setup-tab.mdx -- that tab is now called
Status, per the live Configurator and status-tab.mdx's frontmatter.

RAM-constrained (F405/F411/F722) and no-magnetometer screenshots still
need different hardware than what's connected this session.

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
The RAM-class split didn't matter for boards with no magnetometer --
both classes run the same two steps and finish identically -- so
collapse the old 4-way split (2 RAM classes x with/without mag) into
3 cases, decided compass-first: no magnetometer at all, then (only if
one is fitted) RAM-capable vs RAM-constrained.

Also fixes issues found in a fresh read-through: reconciles
"compass"/"magnetometer" terminology, reorders the order-matters info
box to match the RAM-capable-first convention used everywhere else,
replaces a vague "described below" forward-reference with the actual
step name, and fixes a singular/plural mismatch between link text and
headings.

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
Captures the two scenario finishing dialogs that had no matching hardware
in the previous pass, completing screenshot coverage for all three
documented cases.

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
The Alignment Wizard no longer branches by board RAM class: every
board with a magnetometer now gets the board-alignment steps followed
by a face-east compass-orientation step, in one flow, instead of
RAM-capable boards stopping after board alignment and being pointed
at the Calibration tab's separate auto-detect feature.

- Collapse the "RAM-capable" / "RAM-constrained" sections into a
  single "With a magnetometer" section.
- Retire the now-unreachable "board alignment only" finishing screen
  and its screenshot; rename the combined finishing-screen screenshot
  since it's no longer RAM-class-specific.
- Drop the stale "manual compass wizard" fallback references (that
  button was removed) in favor of just pointing at the wizard.
- Simplify the ordering guidance: calibrate the compass before
  running the wizard, on every board, rather than RAM-class-dependent
  ordering.
- Note that the Calibration tab's own RAM-gated auto-detect is still
  available as an alternative to the wizard's east step, not a
  requirement.

Verified with `docusaurus build` (0 broken links/images).

Claude-Session: https://claude.ai/code/session_01BUNPAbSF46z9QMPqTVWjv4
@sensei-hacker

Copy link
Copy Markdown
Member Author

Follow-up: the Alignment Wizard's RAM-capable/RAM-constrained branch that this page documented has since been removed from the configurator (see inav-configurator#2771) — the wizard now always does the face-east compass step when a magnetometer is fitted, on every board.

Updated this page accordingly:

  • Merged the "RAM-capable" / "RAM-constrained" sections into one "With a magnetometer" section.
  • Removed the now-unreachable board-alignment-only finishing screen and its screenshot; renamed the combined finishing screenshot (it's no longer RAM-class-specific).
  • Removed the stale "manual compass wizard" fallback references — that button was removed along with the branch.
  • Simplified the ordering guidance in compass.mdx and the inavwiki pages to match: calibrate the compass before running the wizard, on every board.
  • Noted that the Calibration tab's own RAM-gated auto-detect is still available as an alternative to the wizard's step, not a requirement — that feature itself is untouched.

docusaurus build clean (0 broken links/images).

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.

2 participants