Hello, I am trying to load CZML data with CesiumJS and track it with a camera.
However, I’ve noticed that the camera direction changes unexpectedly at times.
This occurs between 47 and 48 seconds in the example below.
Is there something wrong with my CZML document?
{
"id": "document",
"name": "Sample CZML Path",
"version": "1.0",
"clock": {
"interval": "2023-08-30T04:53:40.000Z/2023-08-30T04:53:49.000Z",
"currentTime": "2023-08-30T04:53:40.000Z",
"range": "LOOP_STOP"
}
},
{
"id": "point",
"position": {
"interpolationAlgorithm": "LINEAR",
"referenceFrame": "INERTIAL",
"epoch": "2023-08-30T04:53:40.000Z",
"cartesian": [
0,
-490613.8372204524,
6794566.550194831,
1197650.7113752512,
1,
-497815.03522416315,
6794057.648305954,
1197570.0578453701,
2,
-505595.45068733126,
6793499.357190209,
1197481.4231604887,
3,
-513187.0977687081,
6792946.443721257,
1197393.4960502556,
4,
-520583.5334425842,
6792399.645610031,
1197306.3985633762,
5,
-528558.321575489,
6791801.325908834,
1197210.942111075,
6,
-535911.9353152977,
6791241.671116686,
1197121.518384873,
7,
-543209.3039414389,
6790678.406434525,
1197031.3847062124,
8,
-551387.6752833569,
6790038.172367605,
1196928.7851794073,
9,
-558775.8923013632,
6789451.627420369,
1196834.6555180284
]
},
"point": {
"color": {
"rgba": [255, 255, 255, 128]
},
"outlineColor": {
"rgba": [255, 0, 0, 128]
},
"outlineWidth": 3,
"pixelSize": 15
}
}
];
const viewer = new Cesium.Viewer("cesiumContainer", {
shouldAnimate: true,
});
const dataSource = new Cesium.CzmlDataSource();
dataSource.load(czml).then(function () {
viewer.trackedEntity = dataSource.entities.getById("point");
});
viewer.dataSources.add(dataSource);