The example below shows how to calculate the exterior orientation parameters (location and orientation angles) for the camera in the georeferenced chunk:

import Metashape

chunk = #active chunk

camera = chunk.cameras[0] #example for the first camera in the chunk.

estimated_coord = #estimated XYZ in coordinate system units

T = chunk.transform.matrix
m = #transformation matrix to the LSE coordinates in the given point
R = (m * T * camera.transform * Metashape.Matrix().Diag([1, -1, -1, 1])).rotation()
estimated_ypr = Metashape.utils.mat2ypr(R) #estimated orientation angles - yaw, pitch, roll

estimated_opk = Metashape.utils.mat2opk(R) #estimated orientation angles - omega, phi, kappa