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:
- Am i on the right track on how to calculate the AOA? Is this the best way?
- 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.
Thanks in advance!