ICRF-to-Fixed reference frame transformation returns undefined

Hi,

I would like to convert a position that is specified in the ICRF reference frame to the Earth-Fixed frame.

I am using the computeIcrfToFixedMatrix() function from Cesium Transforms. The rotation matrix that I get is undefined, regardless whether I preload the transformation data or not.

Here is my code:

var now = Cesium.JulianDate.now();

// Without preloading

var result = Cesium.Transforms.computeIcrfToFixedMatrix(now);

console.log(result);

// With preloading

Cesium.Transforms.preloadIcrfFixed(new Cesium.TimeInterval(now)).then(

function(){

var result2 = Cesium.Transforms.computeIcrfToFixedMatrix(now);

console.log(result2);

},

function(){

console.log(“Something went wrong with preloading!”);

}

);

``

Could you please help?

Thanks,

Laszlo

You aren’t constructing the TimeInterval that you pass to preloadIcrfFixed correctly. Check the documentation for how to construct a TimeInterval. http://cesiumjs.org/Cesium/Build/Documentation/TimeInterval.html

once you got preload and matrix calculation working… how did you get to the proper way to covert from ICRF to Earth?