Help to assign czml position and orientation to a model

Hi how are you, Im new to Cesium, Im importing a czml file as a datasource and then Im trying to apply this position and orientation arrays to a 3D model hosted in my ION account but the position of the model does not agree with the path the positions are reflecting. Im doing the transform between icrf to fixed and I dont know to to manage this functions working together, could you kindly guide me?

Loading the position and orientation from czml:

// load data

Importing the gltf from ion:

(async () => {
try {
const resource = await Cesium.IonResource.fromAssetId(XXXX);
const entity = viewer.entities.add({
position: Cesium.Cartesian3(“#position”),
orientation: Cesium.Quaternion(“#orientation”), / had to do this because I received object type error, expecting quaternion but string.
model: {
uri: resource,
minimumPixelSize: 1280,
maximumScale : 20000
viewer.trackedEntity = entity;
} catch (error) {

The icrf function is available in various q&a:

function icrf(scene, time) {
if (scene.mode !== Cesium.SceneMode.SCENE3D) {
var icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(time);
if (Cesium.defined(icrfToFixed)) {
var camera =;
var offset = Cesium.Cartesian3.clone(camera.position);
var transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);
camera.lookAtTransform(transform, offset);