1
$\begingroup$

How do I calculate roll,pitch and yaw value from the position co ordinates of the drone, that is x,y and z from the gps sensor??? Using the x,y and z co ordinates I have to calculate roll,pitch and yaw. What is the equation for this??

$\endgroup$
0
3
$\begingroup$

The position coordinates x, y, z are inadequate information to compute the roll pitch and yaw.

x, y, and z are the position of the vehicle in space. roll, pitch, and yaw are the attitude or orientation. They can change independently. Aka you can change the orientation of the vehicle independently from the position of the vehicle.

$\endgroup$
3
  • 1
    $\begingroup$ Perhaps you can briefly say why it is so, as this statement may be immediately evident to many of us but not to everyone. $\endgroup$ Sep 20 at 11:17
  • $\begingroup$ x, y, and z are the position of the vehicle in space. roll, pitch, and yaw are the attitude or orientation. They can change independently. Aka you can change the orientation of the vehicle independently from the position of the vehicle. $\endgroup$
    – Tully
    Sep 21 at 16:25
  • $\begingroup$ That's a good answer! You'd better edit the post and include it there instead of leaving it as a comment. $\endgroup$ Sep 21 at 16:49
1
$\begingroup$

It is not possible to calculate your roll - pitch - yaw angles from linear position information. If you are using a simulated robot with sensors, you can use the gyroscope readings from the IMU sensor, that way you are going to have the angular velocities in three axes. You can then integrate this readings to get angular position. However, because of the integration, the error is going to increase rapidly; therefore you need to combine these readings with some additional sensors (magnetometer, accelerometer) to improve accuracy - you can check Complementary and Kalman Filter for that.

$\endgroup$
-3
$\begingroup$

use a compact module that has gyroscope and compass sensor

  • "X" angle as your "Roll" angle
  • "Y" angle as your "Pitch" angle
  • and the compass data that gives you the "Azimuth" or "bearing" and it's you "Yaw" angle

you can check this out :

https://theiotprojects.com/measure-pitch-roll-and-yaw-angles-using-mpu6050-and-arduino/

enter image description here

New contributor
Hamid 'Smith' Salehi is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.