Getting camera pose with libvideo-metadata

I’m trying to calculate the front camera angles relative to the drone angles.
I’m using libvideo-metadata to read the stream and retrieving frame information via pdraw_vsink_get_frame(), then frame angles via vmeta_frame_get_frame_euler(). I don’t understand in which base they are, as they don’t seem to be in NED. Are the X and Y axis arbitrary as in Vmeta_CameraMetadata ? If so how can I calculate them in NED or relative to the drone euler angles ?
Thank you


When the drone boots, the drone and camera angles are in the drone coordinates system (X pointing forward), as there is no absolute reference available. Once the drone has a GPS fix, the coordinate system jumps to NED.

However, both the drone angles and the camera angles are affected by the same ‘jump’ so it should not be a problem if you are interested in the camera angles relative to the drone angles.

Thank you for your answer.
I’m sorry but I still don’t get how to calculate the fields I want, which are STANAG4609 fields :

  • Sensor Relative Elevation Angle : relative elevation angle of sensor to platform longitudinal-transverse plane.
  • Sensor Relative Roll Angle : twisting angle of camera about lens axis.
  • Sensor Relative Azimuth Angle : rotation angle between platform longitudinal axis and camera pointing direction as seen from above the platform.

From what I see with libvideo-metadata, the drone angles (vmeta_frame_get_drone_euler) are in NED, but vmeta_frame_get_frame_euler() give me angles that I don’t understand :
for example when camera is looking down (NADIR) and drone angles are : pitch 1.38, roll -0.76, heading -27.496, then frame angles are : pitch -90 (ok) and yaw 0 (ok if relative to drone but not in NED) and roll -28.01 (which is nearly similar to drone heading ?),
and when the camera is facing front, it’s the yaw angle that is similar to the drone heading and pitch and roll are equal to 0.
Am I using the right functions ?

Thank you

This is likely a gimbal lock. I think you should consider using the frame and drone quaternions instead of euler angles for your computations.

Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.