Skip to content

Commit

Permalink
Update declination
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Jan 26, 2025
1 parent 05be139 commit d941571
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/wiki/guides/current/Betaflight-4.5-CLI-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,10 @@ Array length: 3
mag_declination = 0
Allowed range: 0 - 3599
:::note
Betaflight 4.6 uses allowed range: -300 - 300 for 30 degrees declination.
:::
mag_hardware = AUTO
Allowed values: AUTO, NONE, HMC5883, AK8975, AK8963, QMC5883, LIS2MDL, LIS3MDL, MPU925X_AK8963, IST8310
Expand Down
10 changes: 9 additions & 1 deletion docs/wiki/guides/current/Magnetometer.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ In Betaflight 4.5, the CLI variable `mag_declination` was introduced, to correct

Declination values should be entered in decidegrees; in the above example, `set mag_declination = 130` would correct for a 13° positive declination, and `set mag_declination = 34` for positive 3.4° of declination. A negative local declination, eg -3°, should be entered as `set mag_declination = 3570` (i.e. 3600 - 30).

:::note
In firmare 4.6 declination has been changed to use a range of 30 degrees.
13° would still be `130` but -3° needs to be initialized as `-30`.



`mag_declination` is difference of angles (between true and magnetic north). Declination value in inhabited areas is within +- 30 degrees range. The limit should prevent misuse of declination for other purposes.
:::

## Mounting a Magnetometer

It is a whole lot easier to fix orientation problems if the magnetometer is physically mounted in the same plane as the FC (e.g., flat to the frame).
Expand Down Expand Up @@ -135,7 +144,6 @@ The user should use the default `set mag_hardware = AUTO` in CLI, so that Betafl

:::warning
Magnetometer detection takes place on power up. Make sure that the Mag powers up at the same time as the FC.

:::

The magnetometer is usually connected via i2C. All supported magnetometers are specified only up to 400Hz 'fast' mode. Wire up the SCL and SDA pins on the module to the pins of the same name on the FC, and power the module with either 5V or 3.3V depending its requirements.
Expand Down

0 comments on commit d941571

Please sign in to comment.