I'll start by saying that I'm using Cesium b24 and STK Components 2013R7 with the Cesium jar file to write CZML. I've read through some of the past posts concerning switching reference frames but I'm still a bit lost and am looking for some suggestions on how to switch from the ECF frame (the Cesium default) to an ECI reference frame. I can do this in STK Pro by adding a button in the 3D Graphics Window called "Next View Reference Frame" and toggling it between the two views gives me what I want. I'd like to know the most efficient way to toggle between these two views in Cesium.
I see that the position attribute in CZML has a reference frame property that can be set to FIXED or INERTIAL. Is this all I'm really looking for and if so, how do I set that specific property in STK Components so that the CZML will get written out correctly?
I also see the Cesium Transform JS object. If this is what I really need and I need to write some javascript to make the reference frame change, can you supply a quick sample of code on how to use the Transform methods to do what I want?
If I'm not even close with my thoughts, please let me know what path to go down.
Thanks,
Peter
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I put the code in above and am able to switch between ECI and ECEF now. Thanks for the help!!
Any update on the Home Button issue? I'm also seeing something similar when I try to zoom into a specific object that I've added to the map. The camera seems to get lost.
Peter
var inertialToFixed = new Cesium.Matrix3();
function updateCameraInertial(viewer) {
if (viewer.scene.mode !== Cesium.SceneMode.SCENE3D || Cesium.defined(viewer.trackedObject)) {
return;
}
if (!Cesium.defined(Cesium.Transforms.computeIcrfToFixedMatrix(viewer.clock.currentTime, inertialToFixed))) {
Cesium.Transforms.computeTemeToPseudoFixedMatrix(viewer.clock.currentTime, inertialToFixed);
}
Cesium.Matrix4.fromRotationTranslation(inertialToFixed, Cesium.Cartesian3.ZERO, viewer.scene.camera.transform);
}
viewer.clock.onTick.addEventListener(function() {
updateCameraInertial(viewer);
});
Peter
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.