# How to find the angle of attack?

I'm trying to calculate the angle of attack (AOA) using aircraft some data. From what I understand the AOA is just the angle between the aircraft's forward unit vector (out the nose vector) and the x-component of the velocity vector (vx), as long as both vectors are in the same coordinate frame.

My current plan is to find the aircraft's forward unit vector, and then find the angle between that forward vector and the x-component of the aircraft's velocity vector (vx) using the dot product.

All of my data is in the ECEF frame and consists of the position (x,y,z), velocity components (vx,vy,vz), and the orientation components (psi,theta,phi).

There are two stack exchange answers that I think are on the right track, but they are not using the ECEF frame.

In the first answer, https://stackoverflow.com/a/1568687/12131175 the unit vectors of the aircraft can be found using the rotation matrices, but I think they are using the NED coordinate frame and not ECEF.

In the second answer, https://aviation.stackexchange.com/a/67213/52074 the AOA is found using the arctan function, but vectors are in the aircrafts body frame.

So, my questions are:

1. Am i on the right track on how to calculate the AOA? Is this the best way?
2. What are the correct rotation matrices needed to solve for the unit vectors in the ECEF frame?

It seems like there's a lot of different sets of rotation matrices out there for the different orders of rotations (x-y-z vs z-y-z and extrinsic vs intrinsic). Some use different greek letters for the same rotation (i.e. rotation about z-axis, some use φ and some use ψ). I'm not certain which rotation matrices are correct for describing an aircrafts orientation in the ECEF frame.

• AOA is actually to the wing chord line, not “out the nose”, so make sure you factor in any angle of incidence built into the airframe... Aug 20 '20 at 16:59
• What's the ECEF frame?
– JZYL
Aug 20 '20 at 17:33
• @MichaelHall Thanks. Aug 20 '20 at 17:41
• No, you can't find AOA simply by looking at inertial velocity. You need to know winds too (expressed in whichever frame you're doing your calculations in).
– JZYL
Aug 20 '20 at 17:43
• I think you misunderstand the definition of AoA. It is defined between mean chord (not zero angle with the fuselage) and relative wind (not necessarily constant in time). See skybrary for more information. Aug 20 '20 at 18:07

• The angle of attack is the angle between the chord line of the airfoil and the relative airflow, that's first and foremost.

There is a longitudinal datum that could be what you are referring to as the "aircraft's forward unit vector" but that longitudinal datum shouldn't be measured directly to the velocity vector in your case because that's not what the air considerably is passing through, the air passes through the airfoil which has the chord line in it, the angle between the chord line and the longitudinal datum is called the angle of incidence and it's a fixed angle.

• The velocity vector could be the relative airflow which is a combination of more than one direction of wind.