[Top][All Lists]

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

Re: [Paparazzi-devel] Vector Increment wrong in ahrs_cmpl_filter

From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] Vector Increment wrong in ahrs_cmpl_filter
Date: Sat, 24 Oct 2015 08:48:58 +0200

What is your telemetry rate for this message? 512/30 or about 0.05 as period?

On Oct 23, 2015 11:34 PM, "flavio_just" <address@hidden> wrote:
Guys, I have the following code below. What happens is that vector3 Corr is
supposed to implement a 1 increment but the result is something like
14,44,74,104... instead of 1,2,3,4... And I have no idea why.

In ahrs_int_cmpl_euler.h

struct AhrsIntCmplEuler {
struct Int32Vect3 Corr

In ahrs_int_cmpl_euler.c

void ahrs_init(void) {
other variables go here...

void ahrs_propagate(void) {

default code goes her...
in the end of ahrs_propagate function goes:


In telemetry.h:
#include "subsystems/ahrs/ahrs_int_cmpl_euler.h"
#define PERIODIC_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.Corr.x, \
                         &ahrs_impl.Corr.y, \
                         &ahrs_impl.Corr.z); \
#define PERIODIC_SEND_FILTER(_chan) {}

I changed the last 3 entries of the message FILTER. After I turn on the
drone and make some moviments with it, the info goes to a SD card where I
decode the info using Matlab. I read this message from binary format as
int32. The result I get is what I explained before, something like, 0 14 44
74 etc...sometimes it jumps 30, sometimes it jumps 60 or 90...

Can someone tell me what is the problem here? maybe some memory variables,
bitshifts...I don't know =/.

Thank you so much guys!
Flávio Justino

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]