Difference between revisions of "Module/Mag HMC58xx"

From PaparazziUAV
Jump to navigation Jump to search
m (added links)
(HMC58XX magneto channel and sign change is added)
 
Line 28: Line 28:


You will need to specify the AHRS_XXX_MAG_ID value. See [http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Enabling_External_Sensors AHRS External Sensors]
You will need to specify the AHRS_XXX_MAG_ID value. See [http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Enabling_External_Sensors AHRS External Sensors]
Recently, the module is being used like the below example, see how the channel order and the signs can be changed :
<source lang="xml">
    <module name="mag" type="hmc58xx">
      <configure name="MAG_HMC58XX_I2C_DEV" value="i2c2"/>
      <define name="MODULE_HMC58XX_UPDATE_AHRS"/>
      <define name="HMC58XX_CHAN_X" value="0"/>
      <define name="HMC58XX_CHAN_Y" value="1"/>
      <define name="HMC58XX_CHAN_Z" value="2"/>
      <define name="HMC58XX_CHAN_X_SIGN" value="+"/>
      <define name="HMC58XX_CHAN_Y_SIGN" value="+"/>
      <define name="HMC58XX_CHAN_Z_SIGN" value="-"/>
    </module>
</source>




[[Category:User_Documentation]] [[Category:Modules]]
[[Category:User_Documentation]] [[Category:Modules]]

Latest revision as of 05:52, 4 November 2016

Introduction

Paparazzi allows the use of external Magnetometers. This module supports the use of the Honeywell HMC5843 and HMC5883 magnetometers. These magnetometers can be connected to your autopilot board via i2c.


File: conf/airframes/myplane.xml
  <firmware>
    ...
    <define name="USE_I2C2" />
    ...
    <subsystem name="ahrs" type="float_cmpl_quat">
      <define name="AHRS_XXX_MAG_ID" value="MAG_HMC58XX_SENDER_ID"/>
    </subsystem>
  </firmware>
  ...
    <modules>
     <load name="mag_hmc58xx.xml">
      <define name="MODULE_HMC58XX_UPDATE_AHRS"/>
      <define name="MAG_HMC58XX_I2C_DEV" value="i2c2"/>
     </load>
    </modules>

You will need to specify the AHRS_XXX_MAG_ID value. See AHRS External Sensors

Recently, the module is being used like the below example, see how the channel order and the signs can be changed :

    <module name="mag" type="hmc58xx">
      <configure name="MAG_HMC58XX_I2C_DEV" value="i2c2"/>
      <define name="MODULE_HMC58XX_UPDATE_AHRS"/>
      <define name="HMC58XX_CHAN_X" value="0"/>
      <define name="HMC58XX_CHAN_Y" value="1"/>
      <define name="HMC58XX_CHAN_Z" value="2"/>

      <define name="HMC58XX_CHAN_X_SIGN" value="+"/>
      <define name="HMC58XX_CHAN_Y_SIGN" value="+"/>
      <define name="HMC58XX_CHAN_Z_SIGN" value="-"/>
    </module>