Files
gods-eye-view/src/sky/icrf.js
T
Sameh Khamis e6d9ec0636 Starry sky and the application viewer move into the Cesium adapter
src/sky/starrySky.js and src/app/viewer.js are Cesium through and
through, so they move into the adapter as src/render/cesium/starrySky.js
and applicationViewer.js; the ./application/viewer export points there.
The celestial ring's precise ICRF rotation reaches the shell through a
Cesium-free registry (src/sky/icrf.js) that the sky provides as it
loads; the application's renderer loads it, and so does
./render/cesium/unbound. Both files leave the Cesium allow-list.
2026-11-09 12:31:46 -08:00

29 lines
912 B
JavaScript

/**
* @module sky/icrf
* @description The precise ICRF-to-fixed rotation, from the renderer that
* has the tables for it (the Cesium adapter's starry sky provides it as it
* loads, `src/render/cesium/starrySky.js`). Cesium-free: with none
* provided, or before its tables load, it answers null and callers fall
* back to `temeToPseudoFixed` (`src/geo/frames.js`).
*/
let provided = null;
/**
* Provide the precise rotation; a later call replaces it.
* @param {(ms: number) => ({x: object, y: object, z: object} | null)} axesAt
*/
export function provideIcrfToFixed(axesAt) {
provided = axesAt;
}
/**
* The precise ICRF-to-fixed rotation at `ms` (epoch milliseconds) as its
* axes (the matrix's columns), or null while it is unknown.
* @param {number} ms
* @returns {{x: object, y: object, z: object} | null}
*/
export function icrfToFixedAxes(ms) {
return provided ? provided(ms) : null;
}