### IMU logs: X and Y accel, which one is pitch and which is roll?

Quick stupid question, but is the X accel the pitch or roll?  I'm trying to tune out some vibration and have great X accel, and Z accel, but my Y accel is bad.  I did a bit of search on google and the DIY forms and didn't see an answer.

#### Replies

• Your question can be interrupted in many ways (its not clear) however here is what I understood :).

Answer1: if you move nose-up/down of the ardupilot, you will experience change in Acc-x (that means pitch fluctuation can be visible on the x-axis)....... similarly the y-axis will show fluctuation in roll. (please note that x-axis is facing forward, y-axis to the right and z-axis down .......... and from acceleration point of view....... if gravity vector is compensated..... acc_x provides fwd/back motion..... acc_y provides sideway motion.....acc_z provides up/down motion info)

Answer2: Please note that gyro provides relative angular rate (so roll is gyro_x, pitch is gyro_y and yaw is gyro_z),

"Extra info": To calculate the absolute roll-pitch from accelerometer, here is the simple math:

pitch_fromacc = -1*atan2(accl_x,sqrt(accl_y*accl_y +  accl_z* accl_z));

roll_fromacc = atan2(accl_y,sqrt(accl_x*accl_x +  accl_z* accl_z));

for absolute yaw, one need magnetormeter as accelerometer has got gravity

I would recommend to do imu calibration again from the GCS (seems calibration error as well)

• My understand is that Y is acceleration fore/aft.  X is side/side, and Z is up/down.

Accel is not angular, and therefore is not pitch , or roll, or yaw.

Now, the Gyros... I believe Y is roll, X is pitch, and Z is yaw.

• Looking at some code is it possible that accel X is both pitch and roll, accel Y is yaw and Z is altitude?

### Activity

RT @Heavy02011: #VirtualRaceLeague: @DIYRobocars Race #14 - #ParkingLotNerds join us January 15th for #AutonomousRacing #RoboRace ⁦@DAVGtec…
yesterday
RT @chr1sa: And after that came our races, 50 in all. This battle between these two Russians was the best we've ever seen -- incredible fig…
yesterday
RT @chr1sa: Before our @DIYRobocars virtual race this weekend, we had a presentation from the team that won the Indy Autonomous Challenge i…
yesterday
Dec 12, 2021
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
Dec 4, 2021
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28, 2021
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26, 2021
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25, 2021
@gclue_akira CC @NVIDIAEmbedded
Nov 23, 2021
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23, 2021
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23, 2021