|
From: | Flavio Justino |
Subject: | Re: [Paparazzi-devel] Gyro Values in Floating Point |
Date: | Wed, 28 Oct 2015 22:46:18 +0000 |
FelixHope that helps,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...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 http://docs.paparazziuav.org/latest/imu_8h.html#structImuIn 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...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
#ifdef USE_AHRS_CMPL
#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, */\
&ahrs_impl.tbf_eulers_meas.phi,\
&ahrs_impl.tbf_eulers_meas.theta,\
&ahrs_impl.tbf_eulers_meas.psi,\
&ahrs_impl.gyro_tbf.p,\
&ahrs_impl.gyro_tbf.q,\
&ahrs_impl.gyro_tbf.r);\
}
#else
#define PERIODIC_SEND_FILTER(_chan) {}
#endif
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!
Flavio
View this message in context: http://lists.paparazziuav.org/Gyro-Values-in-Floating-Point-tp17510.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.
_______________________________________________
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
[Prev in Thread] | Current Thread | [Next in Thread] |