[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] problem with magnetometer that goes back to previous v

From: alonso acuña
Subject: [Paparazzi-devel] problem with magnetometer that goes back to previous value after aircraft is pointed in different direction
Date: Wed, 11 Dec 2013 22:30:19 -0600

Hello. I have a Lisa/M with Aspirin v2.2 10 DoM IMU.  It was nicely calibrated and worked great for 2 weeks. Today I have a problem where for example the aircraft is pointing North and in the attitude message I see psi=0. Then I turn it say 45 degrees and I immediatly see the psi=45 but then it starts slowly drifting back and in about 10 seconds it is again close to 0. This continues to happen after every change in direction.  

I tested if there was anything on the aircraft that might be affecting it but it continued to happen even with the chip a few inches away from the airframe. One thing that I did today and had not done in recent days was upload the firmware. I cleaned, built and uploaded several times but the problem persists.

I flew the the plane like that 2 times and it worked ok. I don't understand why it is important to calibrate the mag when even a crazy one flies ok?  On one of the flights the aircraft icon in the GCS was clearly pointing in the wrong direction like flying backwards but on the other flight it was close to the actual direction.

I am using a version of master from a couple of months ago which I consider very stable.

Any ideas what could be wrong?

Relevant parts of the airframe file:


  <firmware name="fixedwing">

    <target name="ap" board="lisa_m_2.0">
      <subsystem name="ins"     type="gps_passthrough"/>
      <subsystem name="radio_control" type="spektrum">
        <define name="RADIO_MODE" value="RADIO_AUX1"/>
       <configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/>

      <configure name="PERIODIC_FREQUENCY" value="120"/>
      <configure name="AHRS_PROPAGATE_FREQUENCY" value="100"/>
      <configure name="AHRS_CORRECT_FREQUENCY" value="100"/>
      <configure name="LISA_M_BARO" value="BARO_MS5611_SPI"/>
      <define name="AHRS_TRIGGERED_ATTITUDE_LOOP"/>

<subsystem name="gps" type="ublox" >
  <configure name="GPS_PORT"          value="UART3"/>
        <define name="USE_I2C2"/>
        <define name="USE_LED_12"/>
<define name="USE_SPI_SLAVE3"/>
  <load name="sys_mon.xml"/>
<load name="baro_ms5611_spi.xml">
 <define name="MS5611_SPI_DEV" value="spi2"/>     
 <define name="MS5611_SLAVE_DEV" value="SPI_SLAVE3"/> 
 <define name="SENSOR_SYNC_SEND"/>
<load name="baro_board.xml">
 <define name="BARO_ABS_EVENT" value="BaroMs5611UpdatePressure"/>
<subsystem name="ahrs"          type="int_cmpl_quat">

    <subsystem name="imu" type="aspirin_v2.2"/>

  <section name="MISC">
    <define name="MINIMUM_AIRSPEED" value="1.0" unit="m/s"/>
    <define name="MAXIMUM_AIRSPEED" value="30.0" unit="m/s"/>
    <define name="NOMINAL_AIRSPEED" value="15" unit="m/s"/>
    <define name="CARROT" value="5." unit="s"/>
    <define name="ALT_KALMAN_ENABLED" value="TRUE"/>
    <define name="DEFAULT_CIRCLE_RADIUS" value="65."/> 
    <define name="GLIDE_AIRSPEED" value="15"/> 
    <define name="GLIDE_VSPEED" value="3."/> 
<define name="KILL_MODE_DISTANCE" value="(MAX_DIST_FROM_HOME+400)"/>     
    <define name="UNLOCKED_HOME_MODE" value="TRUE"/>     
    <define name="RC_LOST_MODE" value="PPRZ_MODE_HOME"/> 

 <section name="IMU" prefix="IMU_">
<define name="MAG_X_NEUTRAL" value="-49"/>                                                                                                                                                    
<define name="MAG_Y_NEUTRAL" value="68"/>                                                                                                                                                     
<define name="MAG_Z_NEUTRAL" value="36"/>                                                                                                                                                     
<define name="MAG_X_SENS" value="5.64998985967" integer="16"/>                                                                                                                                
<define name="MAG_Y_SENS" value="5.37328205379" integer="16"/>                                                                                                                                
<define name="MAG_Z_SENS" value="6.17952574258" integer="16"/>  


    <!-- con el psi en 90 entonces para subir el theta que se ve en el mensaje hay que bajar el PHI y para bajar el phi baje el THETA -->
    <define name="BODY_TO_IMU_PHI"   value="-2.5" unit="deg"/>
    <define name="BODY_TO_IMU_THETA" value="0.95" unit="deg"/> 
    <define name="BODY_TO_IMU_PSI"   value="90" unit="deg"/>
  <section name="AHRS" prefix="AHRS_">
    <define name="H_X" value="0.797757"/>
    <define name="H_Y" value="-0.0147379"/>
    <define name="H_Z" value="0.602799"/> 
<define name="USE_GPS_HEADING" value="FALSE"/> 


  <section name="INS" prefix="INS_">
    <define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
    <define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>



Alonso Acuña

reply via email to

[Prev in Thread] Current Thread [Next in Thread]