Hi.
I think this question(s) will go to Felix :-)
I am almost ready to fly, all hardware is secured, no interference is
present, all tests are passed but
there is a magnetometer behavior that is bothering me.
I use the Drotek 10dof IMU with the magnetometer and since it is
present i read it and pass the values
to the rest of the airborne code like this:
x = (int16_t) ((drotek_hmc5883l.buf[0] << 8) | drotek_hmc5883l.buf[1]);
z = (int16_t) ((drotek_hmc5883l.buf[2] << 8) | drotek_hmc5883l.buf[3]);
y = (int16_t) ((drotek_hmc5883l.buf[4] << 8) | drotek_hmc5883l.buf[5]);
VECT3_ASSIGN(imu.mag_unscaled, x, -y, -z);
mag_valid = TRUE;
hmc5883l_i2c_status = HMC5883L_I2C_STATUS_IDLE;
Of course the magnetometer is calibrated as per the wiki and the
magnetic field strength for my area of the world is set in the
airframe file like this:
<!-- Normalized Local magnetic field obtained from
http://www.ngdc.noaa.gov/geomag-web/#igrfwmm -->
<!-- Magnetic field intensity / total field strength -->
<section name="AHRS" prefix="AHRS_" >
<define name="H_X" value="(26536.1/45817.2)" />
<define name="H_Y" value="(1843.5/45817.2)" />
<define name="H_Z" value="(37304.9/45817.2) " />
</section>
Now when i use the <subsystem name="ahrs" type="float_cmpl_rmat">
with the magnetometer enabled all is fine and when i get no gps signal
because i am indoors the heading is correctly indicated
but when i use "float_dcm" with the magnetometer disabled by
<configure name="USE_MAGNETOMETER" value="0"/>
the GCS continues to show me the heading when gps has no signal during
power up indoors but in a strange way.
After power up (always indoors without gps) i get a heading of -174
degrees always
and then the heading indication follows the airplane's nose movement
nicely.
Example:
If i power up with the nose of the airplane aligned with the South i
get the -174 degrees heading and then the airplane tracks nicely when
i align the nose with the North.
Accuracy and resolution is excellent, less than 1 degree.
Now my questions:
Do i need to completely disable the magnetometer from the imu code in
order not to mess the gps heading readings or i can use it as a simple
compass?
If i align the airplane's nose with the magnetic south will the
magnetometer heading remain aligned for the whole flight? Can this
method be used for magnetometer calibration?
Is there any way to fuse or calibrate the magnetometer with the gps
heading when of course the airplane gets moving?
From what i understand the magnetometer can be used determining the
actual yaw angle and the gps heading for the actual course heading.
Lastly please forgive me for all those questions.
Chris
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel