# Moving position in inertial with out time arrays

**URL:** <https://community.cesium.com/t/moving-position-in-inertial-with-out-time-arrays/18324>\
**Category:** CesiumJS\
**Created:** [April 25, 2022, 11:34pm UTC](https://community.cesium.com/t/moving-position-in-inertial-with-out-time-arrays/18324 "2022-04-25T23:34:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NancyLSnyder](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/nancylsnyder/32/3476_2.png) [@NancyLSnyder](https://community.cesium.com/u/NancyLSnyder)\
**Post date:** [April 25, 2022, 11:34pm UTC](https://community.cesium.com/t/moving-position-in-inertial-with-out-time-arrays/18324/1 "2022-04-25T23:34:28Z")

</div>

Is there a way to have a moving position using INERTIAL Reference Frame without use sample position property with time. I can do fixed successfully with just the position. I can do both with FIXED and INERTIAL with sampled position but uses too much memory. So would like to have a dynamic moving position point that you can change the reference frame.

Here is my current code:  
const satPosition = new Cesium.CallbackProperty((time) =\> {  
try {  
const jsDate = Cesium.JulianDate.toDate(time);  
const positionAndVelocity = satellite.propagate(satRec, jsDate);  
const gmst = satellite.gstime(jsDate);  
if (enableECF) {  
// FIXED Frame Reference  
const p = satellite.eciToGeodetic(positionAndVelocity.position, gmst);  
const posFixed = Cesium.Cartesian3.fromRadians(  
p.longitude,  
p.latitude,  
p.height \* 1000  
);  
return posFixed;  
}  
// INERTIAL Frame Reference  
const posECI = positionAndVelocity.position;  
const posInertial = Cesium.Cartesian3.fromElements(  
posECI.x \* 1000,  
posECI.y \* 1000,  
posECI.z \* 1000  
);  
return posInertial;  
} catch (err) {  
return null;  
}  
}, false);

## I know for INERTIAL, I have to update the camera:

const cameraTrackEci = (scene, time) =\> {  
if (scene.mode !== Cesium.SceneMode.SCENE3D) {  
return;  
}  
const icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(time);  
if (Cesium.defined(icrfToFixed)) {  
const { camera } = scene;  
const offset = Cesium.Cartesian3.clone(camera.position);  
const transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);  
camera.lookAtTransform(transform, offset);  
}  
};

How to make the posInertial in the Cesium.ReferenceFrame.INERTIAL. I tried the ConstantPositionProperty but no luck. Any suggestions?

Thanks
