computeIcrfToFixedMatrix
fun computeIcrfToFixedMatrix(date: JulianDate, result: Matrix3? = definedExternally): Matrix3?(source)
Computes a rotation matrix to transform a point or vector from the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF) at a given time. This function may return undefined if the data necessary to do the transformation is not yet loaded.
scene.postUpdate.addEventListener(function(scene, time) {
// View in ICRF.
const icrfToFixed = Transforms.computeIcrfToFixedMatrix(time);
if (defined(icrfToFixed)) {
const offset = Cartesian3.clone(camera.position);
const transform = Matrix4.fromRotationTranslation(icrfToFixed);
camera.lookAtTransform(transform, offset);
}
});
Content copied to clipboard
Return
The rotation matrix, or undefined if the data necessary to do the transformation is not yet loaded.
Parameters
date
The time at which to compute the rotation matrix.
result
The object onto which to store the result. If this parameter is not specified, a new instance is created and returned.