How I can get plane's yaw angle from the log data?

Hi there!
I want to know plane’s attitude relative to its velocity vector i.e. roll, pitch and yaw. ATT of the log data gives us desired roll, desired roll, pitch, desired pitch, yaw and desired yaw. Rolls and pitchs are those I want but yaws are not. Yaw angle are measured from the north and

Something got cut off.
If you are looking for sideslip angle there should be SSA field in one of the messages, IIRC it is one of the first messages in the liwest. Though it may be 0 as

Should be available (at a minimum) in the AHRS messages as SSA (sideslip angle).

Lupus and Yuri,

Thank you for your advices.
But why the ATT does not show yaw angle relative to the velocity vector?
In usual aircraft flight dynamics theory, the aircraft’s attitude Ψ,Θ、Φ are measured in refarence to its velocity vector.

Beg to differ on aircraft dynamics:

  • ψ, θ, and φ are referenced with respect to the fixed longitudinal axis.
  • σ, γ, and μ are defined with respect to the velocity vector.

Both of us answered with β because it seemed the logical answer to the brief question.

ArduPilot’s codebase is written using quaternions. EKF quaternion state information is available in the XKQ log items.

It’s a stretch of my .bin log skillset to do the transformations from quaternion state data to Euler angles, but I found an post where @kd0aij did some interesting log manipulation and did just that. Maybe he could shed some light on how it’s done.

Thank you Yuri,
I have understood ArduPilot’s situation.
As I am an old boy (age 79), the aircraft attitude description I learned in a university was only expressed by Euler angles. There was no explanation about DCM and quaternion. I must sutudy them. Could you inform me any useful site to learn them?

BTW where I can find your .bin log skillset? For me Euler angles are the most easiest way to understand aircraft attitude.

My own .bin log skillset is unfortunately confined to my own skull.

Here’s a video that Tridge did, where he does some log analysis and explanation. That’s a good place to start.

As for aircraft dynamics and the math therein, here’s a link to where ArduPilot provides the transformations in C++. In the code comments, you’ll find a paper that discusses it.

1 Like

Thank you for your quick responce.
I will study them soon.

There are methods in libraries/AP_Math/quaternion.cpp to get Euler angles from a quaternion.
Not sure which post of mine you’re talking about though.

This rather old one, @kd0aij .

It’s not that I can’t do the math so much as I’m not sure how to best apply it to .bin log data in any meaningful way.

That’s really old… Now we have things like UAV Log Viewer which are much more convenient to use. (I would have used Cesium instead of Google Earth if I were as good at coding as Willian Galvani) It displays a vehicle icon with the attitude (and 3D position) recorded in the log.

It can use either euler angles or quaternions from dataflash logs to display vehicle attitude:

1 Like