[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Paparazzi-devel] Gyro Values in Floating Point
From: |
flavio_just |
Subject: |
[Paparazzi-devel] Gyro Values in Floating Point |
Date: |
Tue, 27 Oct 2015 11:15:49 -0700 (MST) |
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] Gyro Values in Floating Point,
flavio_just <=