CameraSpace Transform3d from Limelight's PriorityTag

So LL’s priorityTag setup allows me to set a desired tag to retrieve 2D values from, tx, ty, ta, etc.

Everything is from the camera’s perspective at the end.

So to get the Camera space Transform3d I need
x, y, z, roll, pitch, yaw.

-tx is yaw
-ty is pitch
I need the distance to the camera using (targetHeight - cameraHeight) / Tan(camera pitch + targetPitch) all in SI units of course.
From the distance I can get x from distance * cos(yaw) and y from distance * sin(yaw).

So I have x, y, pitch, and yaw. I’m missing z and roll.

I can get z from targetHeight - cameraHeight.

So that leaves roll. What I would have to rotate the camera to see the AprilTag square (rect?) head on. Do I need corner data to get that. If so what would the formula be?

Note: You’ll often see me post about both LL and PhotonVision. We’re going to use PhotonVision for the first time this year, but we also plan on using our LL3 because well it’s a camera. We aren’t going to throw away $400.

You can install PhotonVision on a LimeLight FYI, if you find it more convenient to use a consistent API for all your cameras.

My only concern there is that I can’t get LED control on the LL3. I’m afraid I won’t be able to shut off the LEDs

In fact they don’t provide a HW config for LL3

Correction. I can get the roll from the skew of the target.

The yaw needs to have an adjustment based on the yaw of the target not just to the target.

It might be beneficial to return the Transform3d and 1 more angle being the camera yaw or just return the 3d transform that goes to the center point. This would make some angles easy (0)