Get yaw rate from egoPos Quaternions

Can anyone explain to me how to get the ego’s yaw angle and/or yaw rate from the egoPos rotation quaternions? I am always confused by quaternions and how to work with them.

For the quaternion yaw see (note the comments, it only works in a specific reference frames).

Similarly you could look at to get some inspiration for yaw rate. You’d then need to divide the yaw_diff by the time difference.

Looks what I was looking for to easily calculate yaw.
I will try it out. Thank you.