paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Aspirin and Tiny or Twog for fixedwing


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] Aspirin and Tiny or Twog for fixedwing
Date: Fri, 17 Feb 2012 15:44:47 +0100

Hi Felix,

I understand your concern. 

-The signs in the airframe file are because in this particular plane the aspirin was mounted upside down (and float_dcm can not handle this) (see imu2body discussion)
-There is no need to run it as a module. A subsystem would be fine too. (see module <-> subsystem discussion)
-The i2c_aspirin driver was actually first a driver for the PPZ_UAV_IMU, explaining its name. Which turned out to be 100% compatible with aspirin1 and allows aspirin to be used on a TWOG.
-When this module was made there was only one aspirin version, and no nice headers with definitions.
-The aspirin2 driver was made such that it could be used with or without EOC interrupt(s), but the for the aspirin1 driver, 2 distinct drivers files are still needed. 

So what should I do? convert into subsystem and re-use the aspirin header files with default sensitivities and sign definitions? I could even automatically detect the aspirin version. But how can I then "turn it upside down"? Can I include subsystem headers into a module without any hacking?

-Christophe 



On Fri, Feb 17, 2012 at 1:59 PM, Felix Ruess <address@hidden> wrote:
Hi Christophe,

since you guys seem to use this setup most, maybe you want to add some sensible aspirin defaults for aspirin_i2c as well?
This is currently not the case (as it is with aspirin_v1.x subsystem) since aspirin_i2c actually uses the imu_ppzuav driver module:
* aspirin_i2c does not know about the different mag orientation for v1.5
* so maybe move the aspirin defaults from subsystems/imu/imu_aspirin.h to an extra header imu_aspirin_defaults.h which can then be used by both?
* are there use cases to actually run this as a module? if not I would suggest to rename it, move it to subsystems and get rid of the downlink stuff in there

regarding the signs, WTF??
#ifdef ASPIRIN_IMU
    RATES_ASSIGN(imu.gyro_unscaled, x, -y, -z);
#else // PPZIMU
    RATES_ASSIGN(imu.gyro_unscaled, -x, y, -z);
#endif

And then in your aiframe file you have these signs again:
    <define name="GYRO_P_SIGN" value="1"/>
    <define name="GYRO_Q_SIGN" value="-1"/>
    <define name="GYRO_R_SIGN" value="-1"/>

Same goes for the accel signs.

This cries for some cleanup!

Cheers, Felix

On Fri, Feb 17, 2012 at 10:35 AM, Christophe De Wagter <address@hidden> wrote:
There are some gerbers for an I2C carrier that makes all the connections (for all versions) cleanly and gives some options to power the board cleanly.


-Christophe 




On Fri, Feb 17, 2012 at 10:13 AM, Cédric Marzer <address@hidden> wrote:

Thanks a lot ! This will save me for sure quite a few hours of trials and errors.

 

De : paparazzi-devel-bounces+spam1=address@hidden [mailto:paparazzi-devel-bounces+spam1=address@hidden] De la part de Christophe De Wagter
Envoyé : vendredi, 17. février 2012 10:06
À : address@hidden
Objet : Re: [Paparazzi-devel] Aspirin and Tiny or Twog for fixedwing

 

We fly several planes with this setup. It is our second-best combination for airplanes at the moment (after the yapa + xsens). 

 

Here is a sample airframe (that seems to have the missing signs) and has datasheet default calibrations for the 1.5 version of the aspirin.

 

 


-Christophe 


On Fri, Feb 17, 2012 at 8:21 AM, Cédric Marzer <address@hidden> wrote:

Hi all,

I am trying to use an Aspirin (v1.5) IMU with a twog board on a fixedwing. There is some information about this combination on the mailing list and on the wiki but nothing really clear. After reading it all, I am still not 100% sure that this combination can work. So my first question is : does someone fly already with this setup ?

 

From what I understand one has to connect the board through i2c only like that :

aspirin-SCK / aspirin-SCL / twog-SCL

aspirin-mosi / aspirin-SDA / twog -SDA

aspirin-gnd / aspirin-miso / twog - gnd

aspirin - CS / twog - 3.3V

aspirin - 5V ideally to a 5 V linear regulator but it is also possible to connect it to the 3.3 V with no guarantee

 

on the software side :

 

in the airframe code :

 

<subsystem name="imu" type="aspirin_i2c"/>
<subsystem name="ahrs" type="float_dcm"/>

<section name="IMU" prefix="IMU_">

 

    <define name="GYRO_P_NEUTRAL" value="74"/>

    <define name="GYRO_Q_NEUTRAL" value="-39"/>

    <define name="GYRO_R_NEUTRAL" value="-60"/>

    <define name="GYRO_P_SENS" value="4.412" integer="16"/>

    <define name="GYRO_Q_SENS" value="4.412" integer="16"/>

    <define name="GYRO_R_SENS" value="4.412" integer="16"/>

    <define name="GYRO_PQ_SENS" value="0.0" integer="16"/>

    <define name="GYRO_PR_SENS" value="0.0" integer="16"/>

    <define name="GYRO_QR_SENS" value="0.0" integer="16"/>

   

    <define name="ACCEL_X_NEUTRAL" value="12"/>

    <define name="ACCEL_Y_NEUTRAL" value="1"/>

    <define name="ACCEL_Z_NEUTRAL" value="-13"/>

    <define name="ACCEL_X_SENS" value="37.3730252947" integer="16"/>

    <define name="ACCEL_Y_SENS" value="38.1837066302" integer="16"/>

    <define name="ACCEL_Z_SENS" value="39.169675633" integer="16"/>

    <define name="ACCEL_XY_SENS" value="0.0" integer="16"/>

    <define name="ACCEL_XZ_SENS" value="0.0" integer="16"/>

    <define name="ACCEL_YZ_SENS" value="0.0" integer="16"/>

   

    <define name="MAG_X_NEUTRAL" value="-45"/>

    <define name="MAG_Y_NEUTRAL" value="35"/>

    <define name="MAG_Z_NEUTRAL" value="-89"/>

    <define name="MAG_X_SENS" value="3.8038091533" integer="16"/>

    <define name="MAG_Y_SENS" value="3.99631626658" integer="16"/>

    <define name="MAG_Z_SENS" value="3.7728752292" integer="16"/>

    <define name="MAG_XY_SENS" value="0.0" integer="16"/>

    <define name="MAG_XZ_SENS" value="0.0" integer="16"/>

    <define name="MAG_YZ_SENS" value="0.0" integer="16"/>

 

  </section>


Now my problem is that when I compile I get the following values not being defined :

 

IMU_GYRO_P_SIGN

IMU_GYRO_R_SIGN

IMU_GYRO_Q_SIGN

IMU_GYRO_X_SIGN

IMU_GYRO_Y_SIGN

IMU_GYRO_Z_SIGN

 

Is it a problem of dev/current version of paparazzi (I am using the current one) ? Am I missing a step ?

Thank you for your help

Cédric

 

 

 


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