[Top][All Lists]

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

Re: [Paparazzi-devel] Gyro Values in Floating Point

From: Felix Ruess
Subject: Re: [Paparazzi-devel] Gyro Values in Floating Point
Date: Wed, 28 Oct 2015 23:05:43 +0100

Hi Flavio,

RATES_FLOAT_OF_BFP(ahrs_impl.gyro_tbf, imu.gyro) will give you the rates in SI units, so radians/sec, see also

On a side note: you shouldn't directly read from the global imu struct (which we will hopefully get rid off soon), but rather subscribe to the IMU_GYRO_INT32 ABI message...
In current master that is done in the corresponding ahrs_int_cmpl_euler_wrapper.c.

From what you write, it looks like you are using an older version of paparazzi, if you want to write a new estimator, it would make sense to start from the current master...

Hope that helps,

On Tue, Oct 27, 2015 at 7:15 PM, flavio_just <address@hidden> wrote:
Hello guys!
I am trying to write an algorithm for a new estimator in floating point. I
need a structure containing the values of the gyroscope, accel and mag in
floating point type. What I want exactly is that the values of each sensor
are in SI units without multiplying with any coefficients like happens with
BFP. I tried the following code just for the gyro values, just for testing:

in file ahrs_int_cmpl_euler.c (I'm writing the code here so I can compare
the results with this filter)

void ahrs_propagate(void) {
default code goes here

RATES_FLOAT_OF_BFP(ahrs_impl.gyro_tbf, imu.gyro);

In telemetry.h
#include "subsystems/ahrs/ahrs_int_cmpl_euler.h"
#define PERIODIC_SEND_FILTER(_chan) {                                   \
    DOWNLINK_SEND_FILTER(_chan,                                         \
                         &ahrs.ltp_to_imu_euler.phi,                    \
                         &ahrs.ltp_to_imu_euler.theta,                  \
                         &ahrs.ltp_to_imu_euler.psi,                    \
                         &ahrs_impl.measure.phi,                        \
                         &ahrs_impl.measure.theta,                      \
                         &ahrs_impl.measure.psi,                        \
                         &ahrs_impl.hi_res_euler.phi,                   \
                         &ahrs_impl.hi_res_euler.theta,                 \
                         &ahrs_impl.hi_res_euler.psi,                   \
                        /* &ahrs_impl.residual.phi,                     \
                         &ahrs_impl.residual.theta,                     \
                         &ahrs_impl.residual.psi,                       \
                         /*&ahrs_impl.gyro_bias.p,                      \
                         &ahrs_impl.gyro_bias.q,                        \
                         &ahrs_impl.gyro_bias.r,                        */\
#define PERIODIC_SEND_FILTER(_chan) {}

I changed the last 3 entries in FILTER message to see the values of the
gyro. After I turn on the drone and make some movements with it, the info
goes to a SD card and I read the info using matlab. The values should be
something between 0 and 45 deg/s for the movements that I'm doing but it
shows something like 1E+09 all the time.

Can anyone explain me the reason?
Thank you guys!


View this message in context:
Sent from the paparazzi-devel mailing list archive at

Paparazzi-devel mailing list

reply via email to

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