# What is required to get the roll, pitch and yaw of an aerial vehicle?

TL, DR : What is the method(in terms of sensors and algorithm) to get the roll, pitch and yaw of an aircraft at any instant.

I am planning to build a hobby aircraft. I am so confused about which kind of sensors should I use and how to use them in order to get the roll, pitch and yaw angles of the aircraft.

I think I also have some problems about understanding the concept.

What are the ways/methods/agents to get the orientation of an aircraft at any instant?

In some sources there is something going on as the importance of order of the application of roll,pitch and yaw. But I cannot understand why this is related.

I have used accelerometer values by inputting them into some formulas on the internet(which everybody uses but nobody explains well) to get the roll and pitch values. However could not understand how to manipulate them in order to meet my requirements.

I also have basic understanding about what a gyroscope is.

• "some formulas on the internet(which everybody uses but nobody explains well) to get the roll and pitch values" I would start at trying to understand those formula's. Can you put up those formula's here with the question? – vvy Jul 26 '19 at 19:01
• @vvy yes I know but I realy am bad at 3d geometric imagination. Do you have any suggestions that I can use to visualize such vectors/axes ? – muyustan Jul 26 '19 at 19:03
• The question you've asked is very general. Its a good idea to start with a smaller question. Usually, gyro rate sensors are used for RPY(rate,pitch,yaw). Might be helpful to understand what is a raw output of a gyro and then the transformation to obtain the quantity of interest (here it's RPY). Those equations you're referring to would probably explain this transformation. – vvy Jul 26 '19 at 19:12
• @vvy I am more clear about gyro calculations than accelemoter actualy, I know as follows(please revise and give me feedback about it) : gyro measures the rotation speed about an axis, so we can get the gyro readings(dps) over a short time(dt) duration and add to the p/r/y variable as dps*dt - an approximation of integartion -. So by this, with respect to an inital attitude we can have a relative p,r,y angles. But this has two disadvantages, the drift issue(errors cumulatively increases because of integration) and the problem mentioned here : youtu.be/4BoIE8YQwM8?t=596 – muyustan Jul 26 '19 at 19:20
• @vvy so I am not a total stranger, have the basics somehow but need to relate each of them. – muyustan Jul 26 '19 at 19:21