paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] problem with magnetometer that goes back to previo


From: alonso
Subject: Re: [Paparazzi-devel] problem with magnetometer that goes back to previous value after aircraft is pointed in different direction
Date: Tue, 17 Dec 2013 22:40:35 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

I am sure I am using the magnetometer.

I added

#if USE_MAGNETOMETER
        PRINT_CONFIG_MSG("USING MAGNETOMETER")
#endif  

And I see

subsystems/ahrs/ahrs_int_cmpl_quat.c:59:9: note: #pragma message: Config: USING MAGNETOMETER

Perhaps it is enabled by default somewhere? If I define it with value=0 then I don't see the message.


On 12/17/2013 10:04 AM, Felix Ruess wrote:
Hi Alonso,

are you sure you are actually using the magnetometer?

Please update to latest master and use
<subsystem name="ahrs" type="int_cmpl_quat">
  <configure name="USE_MAGNETOMETER" value="1"/>
</subsystem>
and remove the <define name="USE_GPS_HEADING" value="FALSE"/>

I also added additional error messages in master if you have neither AHRS_USE_GPS_HEADING nor USE_MAGNETOMETER set to true.

Cheers, Felix


On Fri, Dec 13, 2013 at 1:22 AM, alonso acuña <address@hidden> wrote:
Ok I have more info.  I have 2 planes with different airframes, both with Lisa/M and Aspirin 2.2. Both were nicely calibrated, they were working fine for several weeks. Plane #1 is the one I described before. I have tested with various power sources (speed control's BEC, separate BEC, different batteries) and once it worked perfectly but all other tries present the problem.  Next I tested plane #2 it worked fine with the same power source that failed on #1, rebooted and worked fine again.  Now I uploaded the firmware on plane #2 which is the exact same one it had before, I did not clean and recompile, just uploaded and I can see that the generated files are from last week. Now plane #2 presents problems. So #2 was fine and simply uploading the same firmware breaks it. On ocassion it would work fine but after rebooting it again has problems. There are 2 separate ways that the problem presents:

a) Seen more on plane #1. When the plane is pointed in another direction the psi shows the new value and then slowly starts going back and ends up with a very incorrect value. This happens again and again after every move.
b) Seen for now only on #2. The psi cycles from 0 to 180 and from -180 to 0 again and again. All the while the signals from 3 mag axis remain stable. When monitoring the 3 values I have not seen the problem, only the psi in the Attitude message shows the problem. I have a video here http://youtu.be/uBwhHQUWYNI showing stable mag and raw mag axis values and cycling psi value

I have not updated paparazzi for several months because it has been working fine.




On Thu, Dec 12, 2013 at 8:59 AM, Eduardo lavratti <address@hidden> wrote:
check the signals of all mag axys
Do you calibrated magnetometer in correct way ?

Date: Thu, 12 Dec 2013 09:42:04 +0100
From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] problem with magnetometer that goes back to previous value after aircraft is pointed in different direction


Hi Alonso,

idea one - a hardware fault on the magnetometer.

idea two - a power system issue, see https://github.com/paparazzi/paparazzi/issues/333

idea three - some subtle code change which caused this, master branch is developing pretty rapidly.

M


On Thu, Dec 12, 2013 at 5:30 AM, alonso acuña <address@hidden> wrote:
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"/>
       
      </subsystem>


 
      <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"/>
   </subsystem>
        <define name="USE_I2C2"/>
        <define name="USE_LED_12"/>
<define name="USE_SPI_SLAVE3"/>
<modules>
  <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>
<load name="baro_board.xml">
 <define name="BARO_ABS_EVENT" value="BaroMs5611UpdatePressure"/>
</load>  
</modules>
    </target>
  
<subsystem name="ahrs"          type="int_cmpl_quat">
  
    </subsystem>


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

  <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>
 

 <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>
 
  <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>

 

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


</airframe>



Thanks

Alonso Acuña

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

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