Reply to topic  [ 10 posts ] 
tilted horizon / channels 
Author Message

Joined: Thu Oct 04, 2012 7:37 am
Posts: 6
Post tilted horizon / channels

Had the first few flights with my Espresso and hovering was quite fun but also hard to keep it from drifting too much.
In the GCS the artificial horizon isn`t straight when the QS is perfectly level (wing held like in forward flight), in order
to get it "straight" I got to tilt it approx 4-5degree to one side. Is there a way to compensate/calibrate that?

For RC-control I am using a Graupner MC24s with a spektrum module and two spektrum satelites, throttle=CH1, roll=CH2
,pitch=CH3 ,yaw=CH4 and the MODE switch is sent on CH6 does anyone have an Idea why I need to send it on CH6?

greetings from Austria

Sun Oct 07, 2012 11:14 am

Joined: Tue Jun 21, 2011 7:34 pm
Posts: 116
Post Re: tilted horizon / channels
To address the drift issue (and the tilted horizon), please ensure that the IMU calibration is set to:
<define name="ACCEL_X_NEUTRAL" value="0"/>
<define name="ACCEL_Y_NEUTRAL" value="0"/>
<define name="ACCEL_Z_NEUTRAL" value="0"/>
These lines are in the calibration file ~/paparazzi/conf/airframes/esden/calib/asp21-default.xml

Tue Oct 09, 2012 6:01 am

Joined: Thu Oct 04, 2012 7:37 am
Posts: 6
Post Re: tilted horizon / channels
yes all of these values are at 0
btw my ESCs dont speed up at the same stick position but during the first 30% of stick movement one after the other.
I got to trim roll almost all the way to one side what makes hovering quite stable but when in Mode2 I almost cant make turns
in the opposite direction of the trim.

Thu Oct 11, 2012 10:56 am

Joined: Tue Jun 21, 2011 7:34 pm
Posts: 116
Post Re: tilted horizon / channels
This definitely seems like an IMU calibration issue.
Please follow the instructions here: ... e_Your_IMU
to calibrate the IMU. You only need to do the accelerometers, not the mags.
Also, please try running the attitude visualizer (~/paparazzi/sw/in_progress/python/ to confirm that the attitude estimate of the vehicle is correct. The attitude visualizer will provide you a rendering of the airframe and place the rendering in the orientation that the estimator believes it is in. This should help you catch any offsets from straight and level, which would explain the drift issues you are having. To make the attitude visualizer work, please make sure your Espresso is powered up (but throttle can be killed) and the telemetry is set to either default or attitude.
If these two things do not work, please PM me and we will set up a skype meeting so that we can solve this issue.

Fri Oct 12, 2012 8:31 am

Joined: Thu Oct 04, 2012 7:37 am
Posts: 6
Post Re: tilted horizon / channels
after a lot of time spent in order to get the running i got the following error:

xxxxxxxxxxx:paparazzi gunnar$ sw/tools/calibration/ var/logs/
Traceback (most recent call last):
File "sw/tools/calibration/", line 100, in <module>
File "sw/tools/calibration/", line 78, in main
p0 = calibration_utils.get_min_max_guess(flt_meas, sensor_ref)
File "/Users/gunnar/paparazzi/sw/tools/calibration/", line 83, in get_min_max_guess
max_meas = meas[:,:].max(axis=0)
IndexError: too many indices

any ideas how to fix this?


Sun Oct 14, 2012 1:50 pm

Joined: Thu Oct 04, 2012 7:37 am
Posts: 6
Post Re: tilted horizon / channels
part of log file:

2.474 162 VFF 0. 0. 0. 0. 1. 1. 1.
2.475 162 TOYTRONICS_COMMANDS 0 0 0 0 0 0
2.475 162 BOOZ2_RADIO_CONTROL 0 0 0 0 0 0 -42 2
2.506 162 AHRS_REF_QUAT 32768 0 0 0 -2248 8641 31526 332
2.522 162 GPS_INT 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2.583 162 AHRS_REF_QUAT 32768 0 0 0 -2248 8638 31527 332

Sun Oct 14, 2012 4:14 pm

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: tilted horizon / channels
Hey Gunnar

just a thought: when selecting the RAW opzion for messages, did you confitm the selection by pressing the green sign on the right (you have to scroll to see it)?

Sun Oct 14, 2012 7:30 pm

Joined: Thu Oct 04, 2012 7:37 am
Posts: 6
Post Re: tilted horizon / channels
thx! it was the green sign.

calibrating made everything worse now it can`t fly anymore it tips over instantly

just to make sure I held the QS (Aspirin) in the right way:

UP=opposite side from battery bay
FRONT=control surfaces

<define name="ACCEL_X_NEUTRAL" value="733"/>
<define name="ACCEL_Y_NEUTRAL" value="48"/>
<define name="ACCEL_Z_NEUTRAL" value="86"/>
<define name="ACCEL_X_SENS" value="7.48836713193" integer="16"/>
<define name="ACCEL_Y_SENS" value="4.15083518168" integer="16"/>
<define name="ACCEL_Z_SENS" value="4.12000898073" integer="16"/>

I tried it with the Neutral values at 0 too. isn`t running on my system because it tells me I am missing a module: ImportError: No module named OpenGL.GLUT
could someone please point me to the correct terminal string to get OpenGl.GLUT working on my system? (Osx 10.7.4 / macports installed)
It took me a lot of time already to get the calibration tool running.. and I only want to fly :cry:


Thu Oct 18, 2012 1:18 pm
Site Admin
User avatar

Joined: Tue Jun 21, 2011 7:09 pm
Posts: 69
Post Re: tilted horizon / channels
Hi gunnar,

Looking at your graph it seems that you did not turn the wing in a way so that the blue line goes negative. (X axis of the accelerometer if I am not mistaken)

Think of the Quadshot being in a cube, you need to put the cube on every of it's 6 sides when you are recording the data. Hope it helps.

Cheers Piotr

Thu Oct 18, 2012 6:24 pm

Joined: Thu Oct 04, 2012 7:37 am
Posts: 6
Post Re: tilted horizon / channels
did a few more calibration runs:

<define name="ACCEL_X_NEUTRAL" value="33"/>
<define name="ACCEL_Y_NEUTRAL" value="38"/>
<define name="ACCEL_Z_NEUTRAL" value="86"/>
<define name="ACCEL_X_SENS" value="4.922189573" integer="16"/>
<define name="ACCEL_Y_SENS" value="4.88600073192" integer="16"/>
<define name="ACCEL_Z_SENS" value="4.79853456987" integer="16"/>


and got useable data this time.

the horizont in the GCS isn`t tilted anymore and most of the time the motors spin up at the same time but the QS
still drifts to the right side as he did in the beginning, too much to trim out as It would affect mode 2 and 3 too much
and it also drifts in the yaw axis.

meanwhile I managed to install OpenGL but now is missing ivy.std_api any suggestions?

thank you for the help so far

btw: these are the RC min /mx values:

roll -9436 / 9464
pitch -9324 / 9632
yaw 9404 / -9492
mode -9968 / 9604

when the QS isnĀ“t moving am I right with the assumption that theta phi and psi should have static values and not
change over time?

Fri Oct 19, 2012 12:23 pm
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.