setFromPlatformAndSensorPose

fun setFromPlatformAndSensorPose(cameraLat: Angle, cameraLon: Angle, cameraAltMeters: Double, pYaw: Angle, pPitch: Angle, pRoll: Angle, sAz: Angle, sEl: Angle, sRoll: Angle, vFov: Angle, aspect: Double, near: Double = 1.0, far: Double): Matrix4

Build the world-to-image matrix from a camera at (cameraLat, cameraLon, cameraAltMeters) whose orientation is the composition of platform body angles (body-to-NED) and sensor relative angles (camera-body-to-platform-body). This is the mathematically correct entry for KLV / MISB ST 0601 streams: tags 5-7 give platform heading/pitch/roll, tags 18-20 give sensor relative azimuth/elevation/roll, and the camera's actual world-frame direction is R_platform * R_sensor * forward_body.

Convention (aerospace 3-2-1, body-to-NED):

  • Body axes: +X = forward (out the nose), +Y = right wing, +Z = down.

  • Yaw (heading): rotation around +Down. 0 = facing North; positive = clockwise as seen from above (so 90 = East).

  • Pitch: rotation around the post-yaw +Right axis. 0 = level; positive = nose up.

  • Roll: rotation around the post-yaw-and-pitch +Forward axis. 0 = level; positive = right wing down.

Sensor relative angles use the same convention referred to the platform body axes.

Falls back to setToLookAt's composition for the projection and bias steps - only the view-matrix derivation differs.