I agree with Antoine that BODY_TO_IMU should be enough, but this is currently not the case for all ahrs algorithms. E.g. ahrs_float_dcm still assumes you the IMU and body frame are the same when computing the accel and gps updates.
Same goes for mag with other algorithms.
I think we should update all ahrs algos to make it possible to just set IMU_TO_BODY to define the mounting position, although the downside will be that we need a little more computing power.
So Bernie, right now you are better of changing the signs, although this is basically a hack.
Cheers, Felix
On Tue, Oct 4, 2011 at 3:53 AM, Bernard Davison <address@hidden> wrote:
> Thanks for the correction Antoine. :-) > I'll update my airframe. > > Cheers, > Bernie. > > On 04/10/2011, at 12:03 PM, antoine drouin wrote: > >> I disagree about using signs to describe the orientation of the IMU -
>> signs should only reflect the way sensors are mounted on a particular >> model of IMU ( and hence should be hard coded in the specific IMU >> header ) - you want to set the signs so that sensor readings are
>> correct with respect to the IMU frame. >> >> BODY_TO_IMU should be enough to describe the orientation of the IMU >> with respect to the vehicle body >> >> hth >>
>> Poine >> >> On Tue, Oct 4, 2011 at 1:16 AM, Bernard Davison <address@hidden> wrote: >>> Hi Sven, >>> >>> Changing the orientation is very easily achieved.
>>> From the configuration on this page http://paparazzi.enac.fr/wiki/IMU/SEN-10121 just change >>> <define name="BODY_TO_IMU_PHI" value="RadOfDeg(0)"/>
>>> <define name="BODY_TO_IMU_PSI" value="RadOfDeg(0)"/> >>> <define name="BODY_TO_IMU_THETA" value="RadOfDeg(0)"/>
>>> as required. This is assuming you have it mounted the right way. >>> >>> If you have it mounted sideways or upside down then you may need to adjust >>> <define name="GYRO_P_SIGN" value="1"/>
>>> <define name="GYRO_Q_SIGN" value="1"/> >>> <define name="GYRO_R_SIGN" value="1"/> >>> and >>> <define name="ACCEL_X_SIGN" value="1"/>
>>> <define name="ACCEL_Y_SIGN" value="1"/> >>> <define name="ACCEL_Z_SIGN" value="1"/> >>> >>>
>>> In my airframe I have >>> <define name="GYRO_P_SIGN" value="1"/> >>> <define name="GYRO_Q_SIGN" value="-1"/>
>>> <define name="GYRO_R_SIGN" value="-1"/> >>> <define name="ACCEL_X_SIGN" value="1"/> >>> <define name="ACCEL_Y_SIGN" value="-1"/>
>>> <define name="ACCEL_Z_SIGN" value="-1"/> >>> <define name="BODY_TO_IMU_THETA" value="RadOfDeg(10)"/> >>> because I have it mounted upside down and back to front…
>>> Once you have it mounted in your airframe and flashed the configuration, check the messages and PFD to make sure that changes are reported correctly. >>> >>> Cheers, >>> Bernie.
>>> >>> On 03/10/2011, at 7:37 PM, Sven Lorenz wrote: >>> >>>> Hi, >>>> >>>> I was happy and surprised that the sparkfun 6dof IMU (*) is working "out-of-the-box" with the ppzuav-IMU module. Well done ;-)
>>>> >>>> Is there a way to allow for the mounting position of such a sensor in a "general" way? From the code I can see only hardcoded orientations for aspirin and ppzimu. >>>>
>>>> Cheers! >>>> Sven >>>> >>>> >>>> (*)sparkfun 6dof IMU is a nice and tiny module with ITG3200 and ADXL345 connected via I2C >>>> http://www.sparkfun.com/products/10121
>>>> >>>> >>>> >>>> _______________________________________________ >>>> 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
> >