Difference between revisions of "Subsystem/ahrs"

From PaparazziUAV
Jump to navigation Jump to search
(add info about mag vector for int_cmpl_quat)
Line 13: Line 13:


There is a test program ( sw/airborne/test/ahrs/compare_ahrs.py ) to compare different AHRS implementations on simple test cases.
There is a test program ( sw/airborne/test/ahrs/compare_ahrs.py ) to compare different AHRS implementations on simple test cases.
Other flags of interest are:
*AHRS_PROPAGATE_LOW_PASS_RATES : apply a low pass filter on rotational velocity
*AHRS_MAG_UPDATE_YAW_ONLY : use mag to update yaw only


=== Complementary Euler (fixed point) ===
=== Complementary Euler (fixed point) ===
Line 26: Line 32:
   </firmware>
   </firmware>


<section name="AHRS" prefix="AHRS_">
  <section name="AHRS" prefix="AHRS_">
    <define name="PROPAGATE_FREQUENCY" value="512"/>
     <define name="H_X" value=" 0.51562740288882"/>
     <define name="H_X" value=" 0.51562740288882"/>
     <define name="H_Y" value="-0.05707735220832"/>
     <define name="H_Y" value="-0.05707735220832"/>
Line 35: Line 40:
}}  
}}  


H is the normalised local magnetic field which can be derived by following instructions on the IMU calibration page [http://paparazzi.enac.fr/wiki/BoozSensorsCalibration#AHRS-integer_complementary_.28ic.29_filter_normalised_magnetic_X.2CY.2CZ_fields here].


Other flags of interest are;
To calculate the normalised local magnetic field insert the relevant location coordinates [http://www.ngdc.noaa.gov/geomagmodels/IGRFWMM.jsp here]and calculate.
 
 
Screenshot of noaa page.
[[Image:Noaa_mag_data.png|240px]]
 
 
Copy the north(x),east(y),vertical(z) component values into scilab and execute "X/norm(X)".
 


*AHRS_PROPAGATE_LOW_PASS_RATES : apply a low pass filter on rotational velocity
Screenshot of scilab page.
*AHRS_MAG_UPDATE_YAW_ONLY : use mag to update yaw only
[[Image:Normalised_mag_fields.png|240px]]


=== DCM (floating point) ===
=== DCM (floating point) ===

Revision as of 07:20, 24 November 2011

AHRS subsystem

The AHRS subsystem specifies which attitude estimation filter you are using.

e.g. for the complementary filter:

File: conf/airframes/myplane.xml
  <firmware name="fixedwing or rotorcraft">
     ...
    <subsystem name="ahrs" type="int_cmpl_euler"/>
  </firmware>

There is a test program ( sw/airborne/test/ahrs/compare_ahrs.py ) to compare different AHRS implementations on simple test cases.


Other flags of interest are:

  • AHRS_PROPAGATE_LOW_PASS_RATES : apply a low pass filter on rotational velocity
  • AHRS_MAG_UPDATE_YAW_ONLY : use mag to update yaw only

Complementary Euler (fixed point)

Complementary Quaternion (fixed point)

For the latest integer complementary quaternion filter (int_cmpl_quat):

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
     ...
    <subsystem name="ahrs" type="int_cmpl_quat"/>
  </firmware>

  <section name="AHRS" prefix="AHRS_">
    <define name="H_X" value=" 0.51562740288882"/>
    <define name="H_Y" value="-0.05707735220832"/>
    <define name="H_Z" value=" 0.85490967783446"/>
  </section>


To calculate the normalised local magnetic field insert the relevant location coordinates hereand calculate.


Screenshot of noaa page. Noaa mag data.png


Copy the north(x),east(y),vertical(z) component values into scilab and execute "X/norm(X)".


Screenshot of scilab page. Normalised mag fields.png

DCM (floating point)

Infrared